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 delivery times are normally distributed with mean 32 min and standard deviation 6 min. What fraction lies between 22.7 and 38.3 min? Give P as a decimal.
μ = 32σ = 6x1 = 22.7x2 = 38.3
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: 100 phones, mean 141 h, known standard deviation 9 h. Model 2: 80 phones, mean 154.5 h, known standard deviation 16 h. Find the margin of error E of the 95% confidence interval for μ₁ − μ₂.
The population standard deviation is 24. How large a sample n do you need so that a 95% confidence interval for the mean has a margin of error of at most 5?
σ = 24E = 595%
n =
5.Hypothesis tests & confidence intervalsMedium
Two production lines make the same part. Line 1: a sample of 100 parts has mean length 114 mm, and the line's known standard deviation is 14 mm. Line 2: a sample of 40 parts has mean 115.7 mm, known standard deviation 13 mm. Find the test statistic z for H₀: μ₁ = μ₂, taking the difference as x̄₁ − x̄₂ (line 1 minus line 2).
In a trial, 45 of 300 patients on treatment A recover, and 13 of 120 patients on treatment B. Using the pooled proportion, find the test statistic z for H₀: p₁ = p₂.
x₁ = 45n₁ = 300x₂ = 13n₂ = 120
z =
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 = hours studied and y = exam score. Use the least-squares line ŷ = a + b·x. A new observation (5.5, 65) is made. Find its residual e = y − ŷ.
n = 5(5.5, 65)
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
The table shows observed counts. Test at α = 0.01 whether the two variables are independent (no continuity correction). Compute the test statistic χ², then compare it with the critical value from the table.
N = 2803 × 2α = 0.01
χ² =
3Solutions
1.Normal distribution
Answer: P = 0.7926
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.
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: E = 3.925 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̄₂ = 141 − 154.5 = −13.5
Standard error
SE = √(9²/100 + 16²/80) = 2.002
Margin of error
E = 1.96·2.002 = 3.925
Answer
E = 3.925 h
The interval does not contain 0, so the means differ significantly.
4.Confidence intervals
Answer: n = 89
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.
Solve for n
n = (1.96·24/5)² = 88.51
Round up
A sample size is a whole number, and rounding down would make the margin too large.
n = 89
Answer
n = 89
5.Hypothesis tests & confidence intervals
Answer: z = −0.6836
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 ≤ α.
Standard error of the difference
SE = √(14²/100 + 13²/40) = √6.185 = 2.487
Test statistic
z = (114 − 115.7)/2.487 = −0.6836
Answer
z = −0.6836
|z| < 1.96, so H₀ is not rejected at the 5% level (two-sided).
6.Hypothesis tests & confidence intervals
Answer: z = 1.118
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 ≤ α.
Sample proportions
p̂₁ = 45/300 = 0.15
p̂₂ = 13/120 = 0.1083
p̂ = 58/420 = 0.1381
Standard error under H₀
SE = √(0.1381·0.8619·(1/300 + 1/120)) = 0.03726
Test statistic
z = (0.15 − 0.1083)/0.03726 = 1.118
Answer
z = 1.118
|z| < 1.96, so H₀ is not rejected at the 5% level (two-sided).
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̄ = 35/5 = 7
ȳ = 410/5 = 82
Sums of squares and products
Sxx = Σ(x − x̄)² = 40
Sxy = Σ(x − x̄)(y − ȳ) = 210
Syy = Σ(y − ȳ)² = 1126
Correlation coefficient
r = 210/√(40·1126) = 0.9895
Answer
r = 0.9895
8.Linear regression & correlation
Answer: e = −3
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̄ = 20/5 = 4
ȳ = 301/5 = 60.2
Sums of squares and products
Sxx = Σ(x − x̄)² = 10
Sxy = Σ(x − x̄)(y − ȳ) = 52
Regression line
b = 52/10 = 5.2
a = 60.2 − 5.2·4 = 39.4
ŷ = 39.4 + 5.2·x
Predicted value
ŷ = 39.4 + 5.2·5.5 = 68
Residual
e = 65 − 68 = −3
Answer
e = −3
The point lies below the line.
9.Chi-square tests
Answer: χ² = 17.07
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: χ² = 6.927
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 α.