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
X is normal with mean 12 min and standard deviation 1.5 min; Y is independent and normal with mean 20 min and standard deviation 2 min. Find the probability P that X + Y is more than 30.8 min. Round z to two decimals.
μX = 12, σX = 1.5μY = 20, σY = 2X + Y > 30.8 min
P =
2.Normal distributionHard
The battery lifetimes are normally distributed with mean 500 h and standard deviation 40 h. Find the value x below which 97.5% of them lie (the 97.5th percentile).
μ = 500σ = 40P = 97.5%
x = h
3.Confidence intervalsMedium
A 99% confidence interval for a mean, based on 36 observations and a known σ, has a margin of error of 6.9. What is the margin of error E₂ of a 95% interval from the same data?
99%n₁ = 36E₁ = 6.995%
E₂ =
4.Confidence intervalsHard
The population standard deviation is 28. 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 1?
σ = 28E = 195%
n =
5.Hypothesis tests & confidence intervalsMedium
Two teaching methods are compared. Group 1: 14 students, mean score 62.5, standard deviation 9. Group 2: 12 students, mean score 65.4, standard deviation 9.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₁ = 14x̄₁ = 62.5s₁ = 9n₂ = 12x̄₂ = 65.4s₂ = 9.5
t =
6.Hypothesis tests & confidence intervalsHard
In a trial, 25 of 100 patients on treatment A recover, and 41 of 120 patients on treatment B. Using the pooled proportion, find the test statistic z for H₀: p₁ = p₂.
x₁ = 25n₁ = 100x₂ = 41n₂ = 120
z =
7.Linear regression & correlationMedium
The table gives 5 paired observations of x = advertising spend in k€ and y = sales in k€. Find the coefficient of determination r² of the least-squares line.
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. For which value x does the line predict ŷ = 61?
n = 6ŷ = 61
x =
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 = 2202 × 2
χ² =
10.Chi-square testsHard
A chi-square goodness-of-fit test compares observed counts in 5 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.01.
α = 0.01
χ²crit =
3Solutions
1.Normal distribution
Answer: P = 0.6844
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 sum
μ = 32 min, σ = √(1.5² + 2²) = 2.5 min
Standardise
z = (30.8 − 32)/2.5 = −0.48
Upper tail
P = 1 − Φ(−0.48) = 1 − 0.3156 = 0.6844
Answer
P = 0.6844
2.Normal distribution
Answer: x = 578.4 h
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 = 500 + 1.96·40 = 578.4 h
Answer
x = 578.4 h
3.Confidence intervals
Answer: E₂ = 5.25
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)·√(36/36) = 0.7609
New margin
E₂ = 6.9·0.7609 = 5.25
Answer
E₂ = 5.25
4.Confidence intervals
Answer: n = 3012
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·28/1)² = 3012
Round up
A sample size is a whole number, and rounding down would make the margin too large.
n = 3012
Answer
n = 3012
5.Hypothesis tests & confidence intervals
Answer: t = −0.7984
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² = (13·9² + 11·9.5²)/24 = 85.24
sp = 9.233
Standard error
SE = 9.233·√(1/14 + 1/12) = 3.632
Test statistic
t = (62.5 − 65.4)/3.632 = −0.7984
Answer
t = −0.7984
With df = 24, the two-sided 5% critical value is 2.064; |t| is smaller, so H₀ is not rejected.
6.Hypothesis tests & confidence intervals
Answer: z = −1.477
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̂₁ = 25/100 = 0.25
p̂₂ = 41/120 = 0.3417
p̂ = 66/220 = 0.3
Standard error under H₀
SE = √(0.3·0.7·(1/100 + 1/120)) = 0.06205
Test statistic
z = (0.25 − 0.3417)/0.06205 = −1.477
Answer
z = −1.477
|z| < 1.96, so H₀ is not rejected at the 5% level (two-sided).
7.Linear regression & correlation
Answer: r² = 0.9803
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
ȳ = 250/5 = 50
Sums of squares and products
Sxx = Σ(x − x̄)² = 40
Sxy = Σ(x − x̄)(y − ȳ) = 176
Syy = Σ(y − ȳ)² = 790
Coefficient of determination
r² = 176²/(40·790) = 0.9803
Answer
r² = 0.9803
About 98.03% of the variation in y is explained by the line.
8.Linear regression & correlation
Answer: x = 5.517
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
ȳ = 292/6 = 48.67
Sums of squares and products
Sxx = Σ(x − x̄)² = 17.5
Sxy = Σ(x − x̄)(y − ȳ) = 107
Regression line
b = 107/17.5 = 6.114
a = 48.67 − 6.114·3.5 = 27.27
ŷ = 27.27 + 6.114·x
Solve for x
x = (61 − 27.27)/6.114 = 5.517
Answer
x = 5.517
9.Chi-square tests
Answer: χ² = 4.278
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 = 1. At α = 0.05 the critical value is 3.841, so H₀ (independence) is rejected.
10.Chi-square tests
Answer: χ²crit = 13.28
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 = 5 − 1 = 4
Table
χ²crit(df = 4, α = 0.01) = 13.277
Answer
χ²crit = 13.277
Reject H₀ if the computed χ² is larger than this value.