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 10 of them is below 248.4 kg. Round z to two decimals.
μ = 25 kgσ = 0.5 kgn = 10< 248.4 kg
P =
2.Normal distributionHard
The heights of adult men are normally distributed with mean 178 cm and standard deviation 7 cm. Drag the cut-off so the shaded top 90% is to the right of it. Find the cut-off x.
μ = 178 cmσ = 7 cm90%
x = cm
3.Confidence intervalsMedium
The battery life of two phone models is compared. Model 1: 80 phones, mean 124.5 h, known standard deviation 9 h. Model 2: 60 phones, mean 125.5 h, known standard deviation 20 h. Find the lower limit of the 95% confidence interval for μ₁ − μ₂.
The population standard deviation is 27. How large a sample n do you need so that a 99% confidence interval for the mean has a margin of error of at most 3?
σ = 27E = 399%
n =
5.Hypothesis tests & confidence intervalsMedium
A sample of 16 students has a mean score of 117.8 and a sample standard deviation of 4. Find the test statistic t for H₀: μ = 120.
μ₀ = 120x̄ = 117.8s = 4n = 16
t =
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 3? The standard deviation is 10. Find the smallest sample size n.
σ = 10E = 399%
n =
7.Linear regression & correlationMedium
The table gives 5 paired observations of x = advertising spend in k€ and y = sales in k€. Find Pearson's correlation coefficient r.
n = 5
r =
8.Linear regression & correlationHard
The table gives 5 paired observations of x = car age in years and y = price in k€. Use the least-squares line ŷ = a + b·x. A new observation (3.5, 13) is made. Find its residual e = y − ŷ.
n = 5(3.5, 13)
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 “staff, bus”.
row total = 109column total = 63N = 188
E =
10.Chi-square testsHard
A chi-square test of independence is carried out on a contingency table with 3 rows and 4 columns (not counting the totals). How many degrees of freedom df does the test have?
3 × 4
df =
3Solutions
1.Normal distribution
Answer: P = 0.1562
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 = 250 kg, σT = 0.5·√10 = 1.581 kg
Standardise
z = (248.4 − 250)/1.581 = −1.01
Probability
P = Φ(−1.01) = 0.1562
Answer
P = 0.1562
2.Normal distribution
Answer: x = 169 cm
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.1
z from the table
z ≈ −1.28
Back to the original units
x = 178 − 1.28·7 = 169 cm
Answer
x = 169 cm
3.Confidence intervals
Answer: lower limit = −6.431 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̄₂ = 124.5 − 125.5 = −1
Standard error
SE = √(9²/80 + 20²/60) = 2.771
Margin of error
E = 1.96·2.771 = 5.431
Interval
−1 ± 5.431 → [−6.431, 4.431]
Answer
lower limit = −6.431 h
The interval contains 0, so the data do not show a significant difference.
4.Confidence intervals
Answer: n = 538
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 = (2.576·27/3)² = 537.5
Round up
A sample size is a whole number, and rounding down would make the margin too large.
n = 538
Answer
n = 538
5.Hypothesis tests & confidence intervals
Answer: t = −2.2
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/√16 = 4/4 = 1
Test statistic
t = (117.8 − 120)/1 = −2.2
Answer
t = −2.2
t0.025; df = 15 = 2.131
|t| > 2.131, so H₀ is rejected at the 5% level (two-sided).
6.Hypothesis tests & confidence intervals
Answer: n = 74
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·10/3)² = 73.73
Round up
n = 74
Answer
n = 74
7.Linear regression & correlation
Answer: r = 0.9843
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̄ = 15/5 = 3
ȳ = 193/5 = 38.6
Sums of squares and products
Sxx = Σ(x − x̄)² = 10
Sxy = Σ(x − x̄)(y − ȳ) = 31
Syy = Σ(y − ȳ)² = 99.2
Correlation coefficient
r = 31/√(10·99.2) = 0.9843
Answer
r = 0.9843
8.Linear regression & correlation
Answer: e = −5.4
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̄ = 15/5 = 3
ȳ = 96/5 = 19.2
Sums of squares and products
Sxx = Σ(x − x̄)² = 10
Sxy = Σ(x − x̄)(y − ȳ) = −16
Regression line
b = −16/10 = −1.6
a = 19.2 − (−1.6)·3 = 24
ŷ = 24 − 1.6·x
Predicted value
ŷ = 24 + (−1.6)·3.5 = 18.4
Residual
e = 13 − 18.4 = −5.4
Answer
e = −5.4
The point lies below the line.
9.Chi-square tests
Answer: E = 36.53
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 = 109·63/188 = 36.53
Answer
E = 36.53
10.Chi-square tests
Answer: df = 6
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 α.