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 6 of them exceeds 148.2 kg. Round z to two decimals.
μ = 25 kgσ = 0.5 kgn = 6> 148.2 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 10% of them lie (the 10th percentile).
μ = 100σ = 15P = 10%
x = points
3.Confidence intervalsMedium
A sample of 10 items has mean 73.5 and standard deviation s = 4. The population is roughly normal. Find the upper limit of the 90% confidence interval for the mean.
n = 10x̄ = 73.5s = 490%t(9) = 1.833
upper limit =
4.Confidence intervalsHard
The population standard deviation is 26. 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 2?
σ = 26E = 299%
n =
5.Hypothesis tests & confidence intervalsMedium
Two teaching methods are compared. Group 1: 20 students, mean score 25, standard deviation 8. Group 2: 6 students, mean score 20.9, standard deviation 8. 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₁ = 20x̄₁ = 25s₁ = 8n₂ = 6x̄₂ = 20.9s₂ = 8
t =
6.Hypothesis tests & confidence intervalsHard
A one-sided z test of H₀: μ = 100 against H₁: μ > 100 is done at α = 0.05 with a sample of 36; the standard deviation is known to be 15. In reality the mean is 107.5. Find the probability of a Type II error β in percent.
μ₀ = 100μ = 107.5σ = 15n = 36α = 0.05
β = %
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 = car age in years and y = price in k€. Use the least-squares line ŷ = a + b·x. A new observation (4.5, 12) is made. Find its residual e = y − ŷ.
n = 6(4.5, 12)
e =
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 = 1402 × 3
χ² =
10.Chi-square testsHard
A chi-square goodness-of-fit test compares observed counts in 4 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.9292
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 = 150 kg, σT = 0.5·√6 = 1.225 kg
Standardise
z = (148.2 − 150)/1.225 = −1.47
Probability
P = 1 − Φ(−1.47) = 0.9292
Answer
P = 0.9292
2.Normal distribution
Answer: x = 80.78 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.1 → z = −1.282
Back to x
x = 100 + −1.282·15 = 80.78 points
Answer
x = 80.78 points
3.Confidence intervals
Answer: upper limit = 75.82
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.
Critical value
df = n − 1 = 9, t = 1.833
Margin of error
E = 1.833·4/√10 = 2.319
Interval
73.5 ± 2.319 → [71.18, 75.82]
Answer
upper limit = 75.82
4.Confidence intervals
Answer: n = 1122
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·26/2)² = 1121
Round up
A sample size is a whole number, and rounding down would make the margin too large.
n = 1122
Answer
n = 1122
5.Hypothesis tests & confidence intervals
Answer: t = 1.101
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² = (19·8² + 5·8²)/24 = 64
sp = 8
Standard error
SE = 8·√(1/20 + 1/6) = 3.724
Test statistic
t = (25 − 20.9)/3.724 = 1.101
Answer
t = 1.101
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: β = 8.771 %
Power of a test: power = 1 − β is the probability of rejecting H₀ when it is false. Find the cutoff x̄c from μ₀ and z_α, then compute the probability of landing beyond x̄c using the true mean: z = (x̄c − μ)/(σ/√n).
Critical sample mean
SE = 15/√36 = 2.5
x̄c = 100 + 1.645·2.5 = 104.1
z under the true mean
z = (104.1 − 107.5)/2.5 = −1.355
Type II error
power = P(Z > −1.355) = 91.23%
β = 100% − 91.23% = 8.771%
Answer
β = 8.771%
7.Linear regression & correlation
Answer: r² = 0.8579
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
ȳ = 171/5 = 34.2
Sums of squares and products
Sxx = Σ(x − x̄)² = 40
Sxy = Σ(x − x̄)(y − ȳ) = 52
Syy = Σ(y − ȳ)² = 78.8
Coefficient of determination
r² = 52²/(40·78.8) = 0.8579
Answer
r² = 0.8579
About 85.79% of the variation in y is explained by the line.
8.Linear regression & correlation
Answer: e = −4.214
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
ȳ = 117/6 = 19.5
Sums of squares and products
Sxx = Σ(x − x̄)² = 17.5
Sxy = Σ(x − x̄)(y − ȳ) = −57.5
Regression line
b = −57.5/17.5 = −3.286
a = 19.5 − (−3.286)·3.5 = 31
ŷ = 31 − 3.286·x
Predicted value
ŷ = 31 + (−3.286)·4.5 = 16.21
Residual
e = 12 − 16.21 = −4.214
Answer
e = −4.214
The point lies below the line.
9.Chi-square tests
Answer: χ² = 2.956
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 = 2. At α = 0.05 the critical value is 5.991, so H₀ (independence) is not rejected.
10.Chi-square tests
Answer: χ²crit = 11.35
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 = 4 − 1 = 3
Table
χ²crit(df = 3, α = 0.01) = 11.345
Answer
χ²crit = 11.345
Reject H₀ if the computed χ² is larger than this value.