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 bolts are independent and normal with mean 40 g and standard deviation 1.2 g. Find the probability P that the total mass of 4 of them is below 164.8 g. Round z to two decimals.
μ = 40 gσ = 1.2 gn = 4< 164.8 g
P =
2.Normal distributionHard
The bag weights are normally distributed with mean 250 g and standard deviation 5 g. Find the value x below which 99% of them lie (the 99th percentile).
μ = 250σ = 5P = 99%
x = g
3.Confidence intervalsMedium
The battery life of two phone models is compared. Model 1: 40 phones, mean 113.5 h, known standard deviation 12 h. Model 2: 40 phones, mean 115 h, known standard deviation 12 h. Find the upper limit of the 99% confidence interval for μ₁ − μ₂.
Two fertilisers are tested. Plot group 1: 14 plots, mean yield 11 kg, standard deviation 2.5 kg. Plot group 2: 7 plots, mean 6 kg, standard deviation 8 kg. Assume equal variances (pooled t, df = n₁ + n₂ − 2). Find the upper limit of the 90% confidence interval for μ₁ − μ₂.
The mean of a population is claimed to be 250; the population standard deviation is known to be 15. A random sample of 100 observations has a mean of 248.02. Test H₀: μ = 250 against H₁: μ ≠ 250. Find the p-value p.
μ₀ = 250σ = 15n = 100x̄ = 248.02H₁: μ ≠ μ₀
p =
6.Hypothesis tests & confidence intervalsHard
A one-sided z test of H₀: μ = 500 against H₁: μ > 500 is done at α = 0.05 with a sample of 36; the standard deviation is known to be 6. In reality the mean is 502.9. Find the probability of a Type II error β in percent.
μ₀ = 500μ = 502.9σ = 6n = 36α = 0.05
β = %
7.Linear regression & correlationMedium
The table gives 6 paired observations of x = hours studied and y = exam score. Find Pearson's correlation coefficient r.
n = 6
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 = 2.5.
n = 6x = 2.5
ŷ =
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 “rural, low”.
row total = 84column total = 66N = 143
E =
10.Chi-square testsHard
A chi-square goodness-of-fit test compares observed counts in 8 categories with fully specified expected proportions (no parameters are estimated from the data). How many degrees of freedom df does the test have?
k = 8
df =
3Solutions
1.Normal distribution
Answer: P = 0.9772
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 = 160 g, σT = 1.2·√4 = 2.4 g
Standardise
z = (164.8 − 160)/2.4 = 2
Probability
P = Φ(2) = 0.9772
Answer
P = 0.9772
2.Normal distribution
Answer: x = 261.6 g
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.99 → z = 2.326
Back to x
x = 250 + 2.326·5 = 261.63 g
Answer
x = 261.63 g
3.Confidence intervals
Answer: upper limit = 5.412 h
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.
Point estimate
x̄₁ − x̄₂ = 113.5 − 115 = −1.5
Standard error
SE = √(12²/40 + 12²/40) = 2.683
Margin of error
E = 2.576·2.683 = 6.912
Interval
−1.5 ± 6.912 → [−8.412, 5.412]
Answer
upper limit = 5.412 h
The interval contains 0, so the data do not show a significant difference.
4.Confidence intervals
Answer: upper limit = 8.961 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² = (13·2.5² + 6·8²)/19 = 24.49
sp = 4.948
Margin of error
E = 1.729·4.948·√(1/14 + 1/7) = 3.961
Interval
5 ± 3.961 → [1.039, 8.961]
Answer
upper limit = 8.961 kg
5.Hypothesis tests & confidence intervals
Answer: p = 0.1868
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 ≤ α.
Test statistic
SE = σ/√n = 15/√100 = 1.5
z = (248.02 − 250)/1.5 = −1.32
Tail area
Φ(1.32) = 0.9066
1 − Φ(1.32) = 0.0934
p-value
p = 2·0.0934 = 0.1868
Answer
p = 0.1868
p > 0.05, so H₀ is not rejected at the 5% level.
6.Hypothesis tests & confidence intervals
Answer: β = 10.47 %
Power of a test: power = 1 − β is the probability of rejecting H₀ when it is false. Find the cutoff x̄c from μ₀ and z_α, then compute the probability of landing beyond x̄c using the true mean: z = (x̄c − μ)/(σ/√n).
Critical sample mean
SE = 6/√36 = 1
x̄c = 500 + 1.645·1 = 501.6
z under the true mean
z = (501.6 − 502.9)/1 = −1.255
Type II error
power = P(Z > −1.255) = 89.53%
β = 100% − 89.53% = 10.47%
Answer
β = 10.47%
7.Linear regression & correlation
Answer: r = 0.9968
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̄ = 36/6 = 6
ȳ = 477/6 = 79.5
Sums of squares and products
Sxx = Σ(x − x̄)² = 70
Sxy = Σ(x − x̄)(y − ȳ) = 467
Syy = Σ(y − ȳ)² = 3136
Correlation coefficient
r = 467/√(70·3136) = 0.9968
Answer
r = 0.9968
8.Linear regression & correlation
Answer: ŷ = 23.98
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
ȳ = 136/6 = 22.67
Sums of squares and products
Sxx = Σ(x − x̄)² = 17.5
Sxy = Σ(x − x̄)(y − ȳ) = −23
Regression line
b = −23/17.5 = −1.314
a = 22.67 − (−1.314)·3.5 = 27.27
ŷ = 27.27 − 1.314·x
Prediction
ŷ = 27.27 + (−1.314)·2.5 = 23.98
Answer
ŷ = 23.98
9.Chi-square tests
Answer: E = 38.77
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 = 84·66/143 = 38.77
Answer
E = 38.77
10.Chi-square tests
Answer: df = 7
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 α.