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 passengers with luggage are independent and normal with mean 85 kg and standard deviation 12 kg. Find the probability P that the total mass of 12 of them exceeds 1103 kg. Round z to two decimals.
μ = 85 kgσ = 12 kgn = 12> 1103 kg
P =
2.Normal distributionHard
The IQ scores are normally distributed with mean 100 points and standard deviation 15 points. Find the value x below which 97.5% of them lie (the 97.5th percentile).
μ = 100σ = 15P = 97.5%
x = points
3.Confidence intervalsMedium
A 90% confidence interval for a mean, based on 64 observations and a known σ, has a margin of error of 3.9. What is the margin of error E₂ of a 99% interval from the same data?
90%n₁ = 64E₁ = 3.999%
E₂ =
4.Confidence intervalsHard
The population standard deviation is 18. 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 1?
σ = 18E = 190%
n =
5.Hypothesis tests & confidence intervalsMedium
7 employees take a typing test before and after a training course. For each person the difference d = after − before (words per minute) is recorded. The mean difference is 8.07 and the standard deviation of the differences is 6.1. Find the paired test statistic t for H₀: μd = 0.
n = 7d̄ = 8.07sd = 6.1
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 2? The standard deviation is 10. Find the smallest sample size n.
σ = 10E = 299%
n =
7.Linear regression & correlationMedium
The table gives 5 paired observations of x = car age in years and y = price in k€. Their sums are given. Find Pearson's correlation coefficient r from these sums.
n = 5Σx = 15Σy = 91Σx² = 55Σy² = 1689Σxy = 256
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. Predict ŷ for x = 5.
n = 6x = 5
ŷ =
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 = 2002 × 2
χ² =
10.Chi-square testsHard
A chi-square goodness-of-fit test checks whether counts in 5 categories follow a Poisson distribution whose mean is estimated from the same data. How many degrees of freedom df does the test have?
k = 5
df =
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 = 1020 kg, σT = 12·√12 = 41.57 kg
Standardise
z = (1103 − 1020)/41.57 = 2
Probability
P = 1 − Φ(2) = 0.02275
Answer
P = 0.02275
2.Normal distribution
Answer: x = 129.4 points
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 = 100 + 1.96·15 = 129.4 points
Answer
x = 129.4 points
3.Confidence intervals
Answer: E₂ = 6.107
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₁ = (2.576/1.645)·√(64/64) = 1.566
New margin
E₂ = 3.9·1.566 = 6.107
Answer
E₂ = 6.107
4.Confidence intervals
Answer: n = 877
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·18/1)² = 876.8
Round up
A sample size is a whole number, and rounding down would make the margin too large.
n = 877
Answer
n = 877
5.Hypothesis tests & confidence intervals
Answer: t = 3.5
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 of the mean difference
SE = 6.1/√7 = 2.306
Test statistic
t = 8.07/2.306 = 3.5
Answer
t = 3.5
With df = 6, the two-sided 5% critical value is 2.447; |t| is larger, so H₀ is rejected.
6.Hypothesis tests & confidence intervals
Answer: n = 166
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/2)² = 165.9
Round up
n = 166
Answer
n = 166
7.Linear regression & correlation
Answer: r = −0.9387
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 = 256 − 15·91/5 = −17
Sxx = 55 − 15²/5 = 10
Syy = 1689 − 91²/5 = 32.8
Correlation coefficient
r = −17/√(10·32.8) = −0.9387
Answer
r = −0.9387
8.Linear regression & correlation
Answer: ŷ = 60.17
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
ȳ = 427/6 = 71.17
Sums of squares and products
Sxx = Σ(x − x̄)² = 70
Sxy = Σ(x − x̄)(y − ȳ) = 385
Regression line
b = 385/70 = 5.5
a = 71.17 − 5.5·7 = 32.67
ŷ = 32.67 + 5.5·x
Prediction
ŷ = 32.67 + 5.5·5 = 60.17
Answer
ŷ = 60.17
9.Chi-square tests
Answer: χ² = 5.861
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: df = 3
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 α.