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 4 of them is below 99.5 kg. Round z to two decimals.
μ = 25 kgσ = 0.5 kgn = 4< 99.5 kg
P =
2.Normal distributionHard
The bag weights are normally distributed with mean 250 g and standard deviation 5 g. Drag the cut-off so the shaded top 95% is to the right of it. Find the cut-off x.
μ = 250 gσ = 5 g95%
x = g
3.Confidence intervalsMedium
The blood pressure of 13 patients is measured before and after a treatment. The differences d = before − after (mmHg) have mean −8.5 and standard deviation 1.8. Find the upper limit of the 95% confidence interval for the mean difference.
n = 13d̄ = −8.5sd = 1.895%t(12) = 2.179
upper limit = mmHg
4.Confidence intervalsHard
Nothing is known in advance about the proportion of defective products. How many products n must be inspected so that a 90% confidence interval for the proportion has a margin of error of at most 0.03?
p = 0.5E = 0.0390%
n =
5.Hypothesis tests & confidence intervalsMedium
A sample of 81 students has a mean score of 118.8 and a sample standard deviation of 4. Find the test statistic t for H₀: μ = 120.
μ₀ = 120x̄ = 118.8s = 4n = 81
t =
6.Hypothesis tests & confidence intervalsHard
How large must a sample be so that the 90% confidence interval for a mean has a margin of error of at most 2? The standard deviation is 12. Find the smallest sample size n.
σ = 12E = 290%
n =
7.Linear regression & correlationMedium
The table gives 5 paired observations of x = temperature in °C and y = ice creams sold. 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. A new observation (2.5, 45) is made. Find its residual e = y − ŷ.
n = 6(2.5, 45)
e =
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 “night shift, no defect”.
row total = 72column total = 50N = 129
E =
10.Chi-square testsHard
A chi-square goodness-of-fit test checks whether counts in 8 categories follow a Poisson distribution whose mean is estimated from the same data. Using the table, find the critical value χ²crit at significance level α = 0.01.
α = 0.01
χ²crit =
3Solutions
1.Normal distribution
Answer: P = 0.3085
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 = 100 kg, σT = 0.5·√4 = 1 kg
Standardise
z = (99.5 − 100)/1 = −0.5
Probability
P = Φ(−0.5) = 0.3085
Answer
P = 0.3085
2.Normal distribution
Answer: x = 241.8 g
From an area back to z: Φ(z) is the area to the left of z. For a left-tail area A, find z with Φ(z) = A in the table. A right-tail area A means Φ(z) = 1 − A. A central area A between −z and z leaves (1 − A)/2 in each tail, so Φ(z) = (1 + A)/2. For a value x, use x = μ + zσ.
Area to the left
Φ(z) = 0.05
z from the table
z ≈ −1.64
Back to the original units
x = 250 − 1.64·5 = 241.8 g
Answer
x = 241.8 g
3.Confidence intervals
Answer: upper limit = −7.412 mmHg
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.
Critical value
df = 12, t = 2.179
Margin of error
E = 2.179·1.8/√13 = 1.088
Interval
−8.5 ± 1.088 → [−9.588, −7.412]
Answer
upper limit = −7.412 mmHg
4.Confidence intervals
Answer: n = 752
Confidence interval for a proportion: p̂ ± z·√(p̂(1 − p̂)/n), where p̂ = x/n. To reach a margin E you need n ≥ z²·p(1 − p)/E², rounded up; without a prior estimate use p = 0.5, which gives the largest n.
Solve for n
n = 1.645²·0.5·0.5/0.03² = 751.7
Round up
n = 752
Answer
n = 752
5.Hypothesis tests & confidence intervals
Answer: t = −2.7
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 = 4/√81 = 4/9 = 0.4444
Test statistic
t = (118.8 − 120)/0.4444 = −2.7
Answer
t = −2.7
t0.025; df = 80 = 1.99
|t| > 1.99, so H₀ is rejected at the 5% level (two-sided).
6.Hypothesis tests & confidence intervals
Answer: n = 98
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 = (1.645·12/2)² = 97.42
Round up
n = 98
Answer
n = 98
7.Linear regression & correlation
Answer: r² = 0.9873
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
ȳ = 644/5 = 128.8
Sums of squares and products
Sxx = Σ(x − x̄)² = 90
Sxy = Σ(x − x̄)(y − ȳ) = 504
Syy = Σ(y − ȳ)² = 2859
Coefficient of determination
r² = 504²/(90·2859) = 0.9873
Answer
r² = 0.9873
About 98.73% of the variation in y is explained by the line.
8.Linear regression & correlation
Answer: e = −4.271
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
ȳ = 315/6 = 52.5
Sums of squares and products
Sxx = Σ(x − x̄)² = 17.5
Sxy = Σ(x − x̄)(y − ȳ) = 56.5
Regression line
b = 56.5/17.5 = 3.229
a = 52.5 − 3.229·3.5 = 41.2
ŷ = 41.2 + 3.229·x
Predicted value
ŷ = 41.2 + 3.229·2.5 = 49.27
Residual
e = 45 − 49.27 = −4.271
Answer
e = −4.271
The point lies below the line.
9.Chi-square tests
Answer: E = 27.91
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 = 72·50/129 = 27.91
Answer
E = 27.91
10.Chi-square tests
Answer: χ²crit = 16.81
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 = 8 − 1 − 1 = 6
Table
χ²crit(df = 6, α = 0.01) = 16.812
Answer
χ²crit = 16.812
Reject H₀ if the computed χ² is larger than this value.