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 bag weights are normally distributed with mean 250 g and standard deviation 5 g. What fraction lies between 245.25 and 251 g? Give P as a decimal.
μ = 250σ = 5x1 = 245.25x2 = 251
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
A sample of 12 items has mean 43.5 and standard deviation s = 10.5. The population is roughly normal. Find the upper limit of the 95% confidence interval for the mean.
n = 12x̄ = 43.5s = 10.595%t(11) = 2.201
upper limit =
4.Confidence intervalsHard
A pilot study suggests that about 0.6 of products are defective. How many products n must be inspected so that a 99% confidence interval for the proportion has a margin of error of at most 0.01?
p ≈ 0.6E = 0.0199%
n =
5.Hypothesis tests & confidence intervalsMedium
Two teaching methods are compared. Group 1: 6 students, mean score 101, standard deviation 11.5. Group 2: 8 students, mean score 92.1, standard deviation 10.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₁ = 6x̄₁ = 101s₁ = 11.5n₂ = 8x̄₂ = 92.1s₂ = 10.5
t =
6.Hypothesis tests & confidence intervalsHard
A one-sided z test of H₀: μ = 200 against H₁: μ < 200 is done at α = 0.05 with a sample of 25; the standard deviation is known to be 12.5. In reality the mean is 196.25. Find the power 1 − β of the test in percent.
μ₀ = 200μ = 196.25σ = 12.5n = 25α = 0.05
1 − β = %
7.Linear regression & correlationMedium
The table gives 6 paired observations of x = advertising spend in k€ and y = sales in k€. Their sums are given. Find Pearson's correlation coefficient r from these sums.
n = 6Σx = 21Σy = 260Σx² = 91Σy² = 11910Σxy = 1013
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 (2.5, 24) is made. Find its residual e = y − ŷ.
n = 6(2.5, 24)
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 = 1602 × 2
χ² =
10.Chi-square testsHard
The table shows observed counts. Test at α = 0.01 whether the two variables are independent (no continuity correction). Compute the test statistic χ², then compare it with the critical value from the table.
N = 1803 × 2α = 0.01
χ² =
3Solutions
1.Normal distribution
Answer: P = 0.4082
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-scores
z₁ = (245.25 − 250)/5 = −0.95
z₂ = (251 − 250)/5 = 0.2
Area between
P = Φ(0.2) − Φ(−0.95) = 0.5793 − 0.1711 = 0.4082
Answer
P = 0.4082
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: upper limit = 50.17
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 = 11, t = 2.201
Margin of error
E = 2.201·10.5/√12 = 6.671
Interval
43.5 ± 6.671 → [36.83, 50.17]
Answer
upper limit = 50.17
4.Confidence intervals
Answer: n = 15926
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 = 2.576²·0.6·0.4/0.01² = 15926
Round up
n = 15926
Answer
n = 15926
5.Hypothesis tests & confidence intervals
Answer: t = 1.508
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² = (5·11.5² + 7·10.5²)/12 = 119.4
sp = 10.93
Standard error
SE = 10.93·√(1/6 + 1/8) = 5.902
Test statistic
t = (101 − 92.1)/5.902 = 1.508
Answer
t = 1.508
With df = 12, the two-sided 5% critical value is 2.179; |t| is smaller, so H₀ is not rejected.
6.Hypothesis tests & confidence intervals
Answer: 1 − β = 44.24 %
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 = 12.5/√25 = 2.5
x̄c = 200 − 1.645·2.5 = 195.9
z under the true mean
z = (195.9 − 196.25)/2.5 = −0.145
Power
power = P(Z < −0.145) = 44.24%
1 − β = 44.24%
Answer
1 − β = 44.24%
7.Linear regression & correlation
Answer: r = 0.9707
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 = 1013 − 21·260/6 = 103
Sxx = 91 − 21²/6 = 17.5
Syy = 11910 − 260²/6 = 643.3
Correlation coefficient
r = 103/√(17.5·643.3) = 0.9707
Answer
r = 0.9707
8.Linear regression & correlation
Answer: e = 2.043
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
ȳ = 123/6 = 20.5
Sums of squares and products
Sxx = Σ(x − x̄)² = 17.5
Sxy = Σ(x − x̄)(y − ȳ) = −25.5
Regression line
b = −25.5/17.5 = −1.457
a = 20.5 − (−1.457)·3.5 = 25.6
ŷ = 25.6 − 1.457·x
Predicted value
ŷ = 25.6 + (−1.457)·2.5 = 21.96
Residual
e = 24 − 21.96 = 2.043
Answer
e = 2.043
The point lies above the line.
9.Chi-square tests
Answer: χ² = 4.571
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: χ² = 3.214
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 α.