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 bags of cement are independent and normal with mean 25 kg and standard deviation 0.5 kg. Find the probability P that the total mass of 9 of them exceeds 228 kg. Round z to two decimals.
μ = 25 kgσ = 0.5 kgn = 9> 228 kg
P =
2.Normal distributionHard
Hole diameters D are normal with mean 25.03 mm and standard deviation 0.02 mm. Shaft diameters d are independent and normal with mean 25 mm and standard deviation 0.01 mm. A randomly chosen shaft fits when D − d > 0. Find the probability P that it fits. Round z to two decimals.
hole: μ = 25.03 mm, σ = 0.02 mmshaft: μ = 25 mm, σ = 0.01 mm
P =
3.Confidence intervalsMedium
A 99% confidence interval for a mean, based on 64 observations and a known σ, has a margin of error of 11.7. What is the margin of error E₂ of a 95% interval from the same data?
99%n₁ = 64E₁ = 11.795%
E₂ =
4.Confidence intervalsHard
The population standard deviation is 26. How large a sample n do you need so that a 90% confidence interval for the mean has a margin of error of at most 2?
σ = 26E = 290%
n =
5.Hypothesis tests & confidence intervalsMedium
A sample of 36 students has a mean score of 504.3 and a sample standard deviation of 15. Find the test statistic t for H₀: μ = 500.
μ₀ = 500x̄ = 504.3s = 15n = 36
t =
6.Hypothesis tests & confidence intervalsHard
In a trial, 195 of 300 patients on treatment A recover, and 216 of 300 patients on treatment B. Using the pooled proportion, find the test statistic z for H₀: p₁ = p₂.
x₁ = 195n₁ = 300x₂ = 216n₂ = 300
z =
7.Linear regression & correlationMedium
The table gives 6 paired observations of x = advertising spend in k€ and y = sales in k€. Their sums are given. Find Pearson's correlation coefficient r from these sums.
The table gives 6 paired observations of x = hours studied and y = exam score. Use the least-squares line ŷ = a + b·x. Predict ŷ for x = 11.
n = 6x = 11
ŷ =
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 “urban, low”.
row total = 77column total = 44N = 146
E =
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 = 2603 × 2α = 0.01
χ² =
3Solutions
1.Normal distribution
Answer: P = 0.02275
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 = 225 kg, σT = 0.5·√9 = 1.5 kg
Standardise
z = (228 − 225)/1.5 = 2
Probability
P = 1 − Φ(2) = 0.02275
Answer
P = 0.02275
2.Normal distribution
Answer: P = 0.9099
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 difference
μ = 25.03 − 25 = 0.03 mm, σ = 0.02236 mm
Standardise
z = (0 − 0.03)/0.02236 = −1.34
Probability
P = 1 − Φ(−1.34) = 0.9099
Answer
P = 0.9099
3.Confidence intervals
Answer: E₂ = 8.902
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)·√(64/64) = 0.7609
New margin
E₂ = 11.7·0.7609 = 8.902
Answer
E₂ = 8.902
4.Confidence intervals
Answer: n = 458
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.645·26/2)² = 457.3
Round up
A sample size is a whole number, and rounding down would make the margin too large.
n = 458
Answer
n = 458
5.Hypothesis tests & confidence intervals
Answer: t = 1.72
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 = 15/√36 = 15/6 = 2.5
Test statistic
t = (504.3 − 500)/2.5 = 1.72
Answer
t = 1.72
t0.025; df = 35 = 2.03
|t| < 2.03, so H₀ is not rejected at the 5% level (two-sided).
6.Hypothesis tests & confidence intervals
Answer: z = −1.846
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̂₁ = 195/300 = 0.65
p̂₂ = 216/300 = 0.72
p̂ = 411/600 = 0.685
Standard error under H₀
SE = √(0.685·0.315·(1/300 + 1/300)) = 0.03793
Test statistic
z = (0.65 − 0.72)/0.03793 = −1.846
Answer
z = −1.846
|z| < 1.96, so H₀ is not rejected at the 5% level (two-sided).
7.Linear regression & correlation
Answer: r = 0.9957
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.
Centred sums
Sxy = 2572 − 36·368/6 = 364
Sxx = 286 − 36²/6 = 70
Syy = 24480 − 368²/6 = 1909
Correlation coefficient
r = 364/√(70·1909) = 0.9957
Answer
r = 0.9957
8.Linear regression & correlation
Answer: ŷ = 88.07
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̄ = 42/6 = 7
ȳ = 441/6 = 73.5
Sums of squares and products
Sxx = Σ(x − x̄)² = 70
Sxy = Σ(x − x̄)(y − ȳ) = 255
Regression line
b = 255/70 = 3.643
a = 73.5 − 3.643·7 = 48
ŷ = 48 + 3.643·x
Prediction
ŷ = 48 + 3.643·11 = 88.07
Answer
ŷ = 88.07
9.Chi-square tests
Answer: E = 23.21
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 = 77·44/146 = 23.21
Answer
E = 23.21
10.Chi-square tests
Answer: χ² = 15.37
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 α.