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 heights of adult men are normally distributed with mean 178 cm and standard deviation 7 cm. What fraction lies between 171.35 and 192 cm? Give P as a decimal.
μ = 178σ = 7x1 = 171.35x2 = 192
P =
2.Normal distributionHard
The delivery times are normally distributed with mean 32 min and standard deviation 6 min. Find the value x below which 97.5% of them lie (the 97.5th percentile).
μ = 32σ = 6P = 97.5%
x = min
3.Confidence intervalsMedium
A 99% confidence interval for a mean, based on 50 observations and a known σ, has a margin of error of 9.5. What is the margin of error E₂ of a 95% interval based on 200 observations?
99%n₁ = 50E₁ = 9.595%n₂ = 200
E₂ =
4.Confidence intervalsHard
Two fertilisers are tested. Plot group 1: 5 plots, mean yield 62.5 kg, standard deviation 8.5 kg. Plot group 2: 7 plots, mean 52.5 kg, standard deviation 3.5 kg. Assume equal variances (pooled t, df = n₁ + n₂ − 2). Find the margin of error E of the 95% confidence interval for μ₁ − μ₂.
The mean of a population is claimed to be 120; the population standard deviation is known to be 18. A random sample of 36 observations has a mean of 116.1. Test H₀: μ = 120 against H₁: μ < 120. Find the p-value p.
μ₀ = 120σ = 18n = 36x̄ = 116.1H₁: μ < μ₀
p =
6.Hypothesis tests & confidence intervalsHard
How large must a sample be so that the 99% confidence interval for a mean has a margin of error of at most 2.5? The standard deviation is 4. Find the smallest sample size n.
σ = 4E = 2.599%
n =
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 5 paired observations of x = temperature in °C and y = ice creams sold. Use the least-squares line ŷ = a + b·x. A new observation (22.5, 81) is made. Find its residual e = y − ŷ.
n = 5(22.5, 81)
e =
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 = 1602 × 3
χ² =
10.Chi-square testsHard
A chi-square test of independence is carried out on a contingency table with 2 rows and 11 columns (not counting the totals). How many degrees of freedom df does the test have?
2 × 11
df =
3Solutions
1.Normal distribution
Answer: P = 0.8062
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-scores
z₁ = (171.35 − 178)/7 = −0.95
z₂ = (192 − 178)/7 = 2
Area between
P = Φ(2) − Φ(−0.95) = 0.9772 − 0.1711 = 0.8062
Answer
P = 0.8062
2.Normal distribution
Answer: x = 43.76 min
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.975 → z = 1.96
Back to x
x = 32 + 1.96·6 = 43.76 min
Answer
x = 43.76 min
3.Confidence intervals
Answer: E₂ = 3.614
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.
Ratio of margins
E₂/E₁ = (1.96/2.576)·√(50/200) = 0.3804
New margin
E₂ = 9.5·0.3804 = 3.614
Answer
E₂ = 3.614
4.Confidence intervals
Answer: E = 7.855 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² = (4·8.5² + 6·3.5²)/10 = 36.25
sp = 6.021
Margin of error
E = 2.228·6.021·√(1/5 + 1/7) = 7.855
Answer
E = 7.855 kg
5.Hypothesis tests & confidence intervals
Answer: p = 0.0968
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 = 18/√36 = 3
z = (116.1 − 120)/3 = −1.3
Tail area
Φ(1.3) = 0.9032
1 − Φ(1.3) = 0.0968
p-value
p = 0.0968
Answer
p = 0.0968
p > 0.05, so H₀ is not rejected at the 5% level.
6.Hypothesis tests & confidence intervals
Answer: n = 17
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).
Solve for n
n = (2.576·4/2.5)² = 16.99
Round up
n = 17
Answer
n = 17
7.Linear regression & correlation
Answer: r = 0.9845
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̄ = 25/5 = 5
ȳ = 352/5 = 70.4
Sums of squares and products
Sxx = Σ(x − x̄)² = 40
Sxy = Σ(x − x̄)(y − ȳ) = 282
Syy = Σ(y − ȳ)² = 2051
Correlation coefficient
r = 282/√(40·2051) = 0.9845
Answer
r = 0.9845
8.Linear regression & correlation
Answer: e = −1.9
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
ȳ = 447/5 = 89.4
Sums of squares and products
Sxx = Σ(x − x̄)² = 90
Sxy = Σ(x − x̄)(y − ȳ) = 390
Regression line
b = 390/90 = 4.333
a = 89.4 − 4.333·24 = −14.6
ŷ = −14.6 + 4.333·x
Predicted value
ŷ = −14.6 + 4.333·22.5 = 82.9
Residual
e = 81 − 82.9 = −1.9
Answer
e = −1.9
The point lies below the line.
9.Chi-square tests
Answer: χ² = 11.98
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 = 10
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 α.