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
The masses of passengers with luggage are independent and normal with mean 85 kg and standard deviation 12 kg. Find the probability P that the total mass of 8 of them exceeds 713.9 kg. Round z to two decimals.
μ = 85 kgσ = 12 kgn = 8> 713.9 kg
P =
2.Normal distributionHard
The exam scores are normally distributed with mean 65 points and standard deviation 10 points. Drag the cut-off so the shaded bottom 40% is to the left of it. Find the cut-off x.
μ = 65 pointsσ = 10 points40%
x = points
3.Confidence intervalsMedium
A sample of 12 items has mean 78.5 and standard deviation s = 2.5. The population is roughly normal. Find the margin of error E of a 90% confidence interval for the mean.
n = 12x̄ = 78.5s = 2.590%t(11) = 1.796
E =
4.Confidence intervalsHard
Two fertilisers are tested. Plot group 1: 9 plots, mean yield 28 kg, standard deviation 2 kg. Plot group 2: 17 plots, mean 30.5 kg, standard deviation 2 kg. Assume equal variances (pooled t, df = n₁ + n₂ − 2). Find the lower limit of the 99% confidence interval for μ₁ − μ₂.
Two teaching methods are compared. Group 1: 9 students, mean score 27.5, standard deviation 9.5. Group 2: 12 students, mean score 36.4, standard deviation 7.5. Assume equal population variances and use the pooled two-sample t test. Find the test statistic t for H₀: μ₁ = μ₂, taking the difference as x̄₁ − x̄₂ (group 1 minus group 2).
n₁ = 9x̄₁ = 27.5s₁ = 9.5n₂ = 12x̄₂ = 36.4s₂ = 7.5
t =
6.Hypothesis tests & confidence intervalsHard
A one-sided z test at α = 0.01 must detect a shift of the mean of 2 units with a power of 90%. The standard deviation is 14. Find the minimum sample size n.
The table gives 5 paired observations of x = temperature in °C and y = ice creams sold. Find Pearson's correlation coefficient r.
n = 5
r =
8.Linear regression & correlationHard
The table gives 6 paired observations of x = advertising spend in k€ and y = sales in k€. Use the least-squares line ŷ = a + b·x. A new observation (1.5, 28) is made. Find its residual e = y − ŷ.
n = 6(1.5, 28)
e =
9.Chi-square testsMedium
The contingency table shows observed counts. For a chi-square test of independence, find the expected count E for the cell “night shift, no defect”.
row total = 90column total = 29N = 183
E =
10.Chi-square testsHard
A chi-square goodness-of-fit test compares observed counts in 10 categories with fully specified expected proportions (no parameters are estimated from the data). Using the table, find the critical value χ²crit at significance level α = 0.05.
α = 0.05
χ²crit =
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 total
μT = 680 kg, σT = 12·√8 = 33.94 kg
Standardise
z = (713.9 − 680)/33.94 = 1
Probability
P = 1 − Φ(1) = 0.1587
Answer
P = 0.1587
2.Normal distribution
Answer: x = 62.5 points
From an area back to z: Φ(z) is the area to the left of z. For a left-tail area A, find z with Φ(z) = A in the table. A right-tail area A means Φ(z) = 1 − A. A central area A between −z and z leaves (1 − A)/2 in each tail, so Φ(z) = (1 + A)/2. For a value x, use x = μ + zσ.
Area to the left
Φ(z) = 0.4
z from the table
z ≈ −0.25
Back to the original units
x = 65 − 0.25·10 = 62.5 points
Answer
x = 62.5 points
3.Confidence intervals
Answer: E = 1.296
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 = 11, t = 1.796
Margin of error
E = 1.796·2.5/√12 = 1.296
Answer
E = 1.296
4.Confidence intervals
Answer: lower limit = −4.806 kg
Interval for a difference: estimate ± critical value × standard error. For two independent means with known σ: SE = √(σ₁²/n₁ + σ₂²/n₂) and z. With equal unknown variances: pooled s_p and t with n₁ + n₂ − 2 degrees of freedom. For paired data, work with the differences: d̄ ± t·s_d/√n.
Pooled standard deviation
sp² = (8·2² + 16·2²)/24 = 4
sp = 2
Margin of error
E = 2.797·2·√(1/9 + 1/17) = 2.306
Interval
−2.5 ± 2.306 → [−4.806, −0.194]
Answer
lower limit = −4.806 kg
5.Hypothesis tests & confidence intervals
Answer: t = −2.403
Hypothesis test: the test statistic = (estimate − value under H₀)/(standard error under H₀). The p-value is the probability, assuming H₀ is true, of a statistic at least as extreme as the one observed: the area in one tail for a one-sided H₁, twice the tail area for a two-sided H₁. Reject H₀ when p ≤ α.
Pooled variance
sp² = (8·9.5² + 11·7.5²)/19 = 70.57
sp = 8.4
Standard error
SE = 8.4·√(1/9 + 1/12) = 3.704
Test statistic
t = (27.5 − 36.4)/3.704 = −2.403
Answer
t = −2.403
With df = 19, the two-sided 5% critical value is 2.093; |t| is larger, so H₀ is rejected.
6.Hypothesis tests & confidence intervals
Answer: n = 638
Sample size for a test: to detect a true shift δ with power 1 − β in a one-sided z test at level α, the standard error must satisfy δ = (z_α + z_β)·σ/√n, so n = ((z_α + z_β)·σ/δ)², rounded up.
Solve for n
n = ((2.326 + 1.282)·14/2)² = 637.9
Round up
n = 638
Answer
n = 638
7.Linear regression & correlation
Answer: r = 0.9895
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̄ = 120/5 = 24
ȳ = 420/5 = 84
Sums of squares and products
Sxx = Σ(x − x̄)² = 90
Sxy = Σ(x − x̄)(y − ȳ) = 402
Syy = Σ(y − ȳ)² = 1834
Correlation coefficient
r = 402/√(90·1834) = 0.9895
Answer
r = 0.9895
8.Linear regression & correlation
Answer: e = 2.09
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
ȳ = 199/6 = 33.17
Sums of squares and products
Sxx = Σ(x − x̄)² = 17.5
Sxy = Σ(x − x̄)(y − ȳ) = 63.5
Regression line
b = 63.5/17.5 = 3.629
a = 33.17 − 3.629·3.5 = 20.47
ŷ = 20.47 + 3.629·x
Predicted value
ŷ = 20.47 + 3.629·1.5 = 25.91
Residual
e = 28 − 25.91 = 2.09
Answer
e = 2.09
The point lies above the line.
9.Chi-square tests
Answer: E = 14.26
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 α.
Expected count
E = 90·29/183 = 14.26
Answer
E = 14.26
10.Chi-square tests
Answer: χ²crit = 16.92
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 α.
Degrees of freedom
df = 10 − 1 = 9
Table
χ²crit(df = 9, α = 0.05) = 16.919
Answer
χ²crit = 16.919
Reject H₀ if the computed χ² is larger than this value.