E = row total × column total / grand total, df = (r − 1)(c − 1)
Critical values (α = 0.05)
df 1: 3.841, 2: 5.991, 3: 7.815, 4: 9.488
Decision
reject H0 if χ² > χ²crit
2Practice problems
1.Normal distributionMedium
X is normal with mean 12 min and standard deviation 1.5 min; Y is independent and normal with mean 20 min and standard deviation 2 min. Find the probability P that X + Y is more than 34.5 min. Round z to two decimals.
μX = 12, σX = 1.5μY = 20, σY = 2X + Y > 34.5 min
P =
2.Normal distributionHard
The battery lifetimes are normally distributed with mean 500 h and standard deviation 40 h. Find the value x below which 90% of them lie (the 90th percentile).
μ = 500σ = 40P = 90%
x = h
3.Confidence intervalsMedium
A sample of 7 items has mean 47 and standard deviation s = 2. The population is roughly normal. Find the lower limit of the 95% confidence interval for the mean.
n = 7x̄ = 47s = 295%t(6) = 2.447
lower limit =
4.Confidence intervalsHard
The diameters of 16 machined shafts have a sample standard deviation of 9.6 µm. Assuming the diameters are normally distributed, find the upper limit σ of the 95% confidence interval for the population standard deviation. With df = 15, 2.5% of the χ² distribution lies below 6.262 and 2.5% lies above 27.488.
n = 16s = 9.6 µmχ² = 6.262, 27.488
σ = µm
5.Hypothesis tests & confidence intervalsMedium
A sample of 81 students has a mean score of 52.8 and a sample standard deviation of 12. Find the test statistic t for H₀: μ = 50.
μ₀ = 50x̄ = 52.8s = 12n = 81
t =
6.Hypothesis tests & confidence intervalsHard
A sample of 36 measurements has mean 103.6. The population standard deviation is 8. Find the upper limit U of the 99% confidence interval for the mean.
x̄ = 103.6σ = 8n = 3699%
U =
7.Linear regression & correlationMedium
The table gives 5 paired observations of x = hours studied and y = exam score. Find Pearson's correlation coefficient r.
n = 5
r =
8.Linear regression & correlationHard
The table gives 6 paired observations of x = car age in years and y = price in k€. Use the least-squares line ŷ = a + b·x. Predict ŷ for x = 4.5.
n = 6x = 4.5
ŷ =
9.Chi-square testsMedium
The contingency table shows observed counts. Compute the chi-square statistic χ² for the test of independence between the row and column variables. Do not use a continuity correction.
N = 2002 × 3
χ² =
10.Chi-square testsHard
A chi-square goodness-of-fit test compares observed counts in 6 categories with fully specified expected proportions (no parameters are estimated from the data). How many degrees of freedom df does the test have?
k = 6
df =
3Solutions
1.Normal distribution
Answer: P = 0.1587
Sums and differences of normal variables: if X and Y are independent and normal, X + Y and X − Y are normal too. Means add or subtract: E(X ± Y) = μX ± μY. Variances always add, also for a difference: Var(X ± Y) = σX² + σY², so σ = √(σX² + σY²). Standard deviations never add directly. The total of n independent items with the same distribution has mean n·μ and standard deviation σ·√n. Then standardise as usual: z = (x − mean)/σ and read Φ(z).
Distribution of the sum
μ = 32 min, σ = √(1.5² + 2²) = 2.5 min
Standardise
z = (34.5 − 32)/2.5 = 1
Upper tail
P = 1 − Φ(1) = 1 − 0.8413 = 0.1587
Answer
P = 0.1587
2.Normal distribution
Answer: x = 551.3 h
Normal distribution: convert a value x to a z-score, z = (x − μ)/σ, which counts standard deviations from the mean. A z-table (or Φ(z)) gives the area to the left of z, which is P(X < x). The area to the right is 1 − Φ(z), and the area between two values is the difference of their two areas.
z for the percentile
Φ(z) = 0.9 → z = 1.282
Back to x
x = 500 + 1.282·40 = 551.26 h
Answer
x = 551.26 h
3.Confidence intervals
Answer: lower limit = 45.15
Confidence interval for a mean: x̄ ± margin of error. With a known population σ the margin is z·σ/√n; with only the sample standard deviation s, use t with n − 1 degrees of freedom: t·s/√n. Critical values: z = 1.645 (90%), 1.96 (95%), 2.576 (99%). To get a margin E or smaller, you need n ≥ (z·σ/E)², rounded up.
Critical value
df = n − 1 = 6, t = 2.447
Margin of error
E = 2.447·2/√7 = 1.85
Interval
47 ± 1.85 → [45.15, 48.85]
Answer
lower limit = 45.15
4.Confidence intervals
Answer: σ = 14.86 µm
Interval for a variance: (n − 1)s²/σ² has a χ² distribution with n − 1 degrees of freedom. The 95% interval for σ² runs from (n − 1)s² divided by the upper χ² value (2.5% above it) to (n − 1)s² divided by the lower χ² value (2.5% below it); the interval for σ is the square root of both limits. It is not symmetric around s.
Sum of squares
(n − 1)s² = 15·9.6² = 1382
Limits for σ²
1382/27.488 = 50.29
1382/6.262 = 220.8
Limit for σ
σ = √220.8 = 14.86 µm
Answer
σ = 14.86 µm
95% interval for σ: [7.092, 14.86] µm.
5.Hypothesis tests & confidence intervals
Answer: t = 2.1
Testing a mean: the test statistic measures how many standard errors the sample mean lies from the value claimed in H₀: z = (x̄ − μ₀)/(σ/√n) when σ is known, t = (x̄ − μ₀)/(s/√n) when it is estimated from the sample. A confidence interval is x̄ ± (critical value)·(standard error).
Standard error
SE = 12/√81 = 12/9 = 1.333
Test statistic
t = (52.8 − 50)/1.333 = 2.1
Answer
t = 2.1
t0.025; df = 80 = 1.99
|t| > 1.99, so H₀ is rejected at the 5% level (two-sided).
6.Hypothesis tests & confidence intervals
Answer: U = 107
Testing a mean: the test statistic measures how many standard errors the sample mean lies from the value claimed in H₀: z = (x̄ − μ₀)/(σ/√n) when σ is known, t = (x̄ − μ₀)/(s/√n) when it is estimated from the sample. A confidence interval is x̄ ± (critical value)·(standard error).
Margin of error
E = 2.576·8/√36 = 3.435
Interval limit
U = 103.6 + 3.435 = 107
Answer
U = 107
7.Linear regression & correlation
Answer: r = 0.9707
Least-squares regression: with x̄ and ȳ the means, Sxx = Σ(x − x̄)², Syy = Σ(y − ȳ)² and Sxy = Σ(x − x̄)(y − ȳ), the line ŷ = a + b·x has slope b = Sxy/Sxx and intercept a = ȳ − b·x̄, so it always passes through (x̄, ȳ). Pearson's correlation coefficient r = Sxy/√(Sxx·Syy) lies between −1 and 1; r² is the fraction of the variation in y explained by the line.
Means
x̄ = 35/5 = 7
ȳ = 387/5 = 77.4
Sums of squares and products
Sxx = Σ(x − x̄)² = 40
Sxy = Σ(x − x̄)(y − ȳ) = 154
Syy = Σ(y − ȳ)² = 629.2
Correlation coefficient
r = 154/√(40·629.2) = 0.9707
Answer
r = 0.9707
8.Linear regression & correlation
Answer: ŷ = 15.2
Least-squares regression: with x̄ and ȳ the means, Sxx = Σ(x − x̄)², Syy = Σ(y − ȳ)² and Sxy = Σ(x − x̄)(y − ȳ), the line ŷ = a + b·x has slope b = Sxy/Sxx and intercept a = ȳ − b·x̄, so it always passes through (x̄, ȳ). Pearson's correlation coefficient r = Sxy/√(Sxx·Syy) lies between −1 and 1; r² is the fraction of the variation in y explained by the line.
Means
x̄ = 21/6 = 3.5
ȳ = 108/6 = 18
Sums of squares and products
Sxx = Σ(x − x̄)² = 17.5
Sxy = Σ(x − x̄)(y − ȳ) = −49
Regression line
b = −49/17.5 = −2.8
a = 18 − (−2.8)·3.5 = 27.8
ŷ = 27.8 − 2.8·x
Prediction
ŷ = 27.8 + (−2.8)·4.5 = 15.2
Answer
ŷ = 15.2
9.Chi-square tests
Answer: χ² = 7.373
Chi-square tests: compare observed counts O with the counts E expected under H₀ using χ² = Σ(O − E)²/E. Goodness of fit: E = n·p for each category, df = k − 1 (minus one more for each parameter estimated from the data). Independence in an r × c table: E = row total × column total / grand total, df = (r − 1)(c − 1). Reject H₀ when χ² exceeds the critical value for the chosen α.
df = 2. At α = 0.05 the critical value is 5.991, so H₀ (independence) is rejected.
10.Chi-square tests
Answer: df = 5
Chi-square tests: compare observed counts O with the counts E expected under H₀ using χ² = Σ(O − E)²/E. Goodness of fit: E = n·p for each category, df = k − 1 (minus one more for each parameter estimated from the data). Independence in an r × c table: E = row total × column total / grand total, df = (r − 1)(c − 1). Reject H₀ when χ² exceeds the critical value for the chosen α.