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
Drag z so that the shaded area between −z and z under the standard normal curve is 0.6265. Find z to two decimals.
A = 0.6265
z =
2.Normal distributionHard
Hole diameters D are normal with mean 25.05 mm and standard deviation 0.01 mm. Shaft diameters d are independent and normal with mean 25 mm and standard deviation 0.02 mm. A randomly chosen shaft fits when D − d > 0. Find the probability P that it fits. Round z to two decimals.
hole: μ = 25.05 mm, σ = 0.01 mmshaft: μ = 25 mm, σ = 0.02 mm
P =
3.Confidence intervalsMedium
A sample of 25 items has mean 88.5 and standard deviation s = 13.5. The population is roughly normal. Find the lower limit of the 90% confidence interval for the mean.
n = 25x̄ = 88.5s = 13.590%t(24) = 1.711
lower limit =
4.Confidence intervalsHard
The population standard deviation is 14. 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?
σ = 14E = 190%
n =
5.Hypothesis tests & confidence intervalsMedium
The mean of a population is claimed to be 250; the population standard deviation is known to be 12. A random sample of 144 observations has a mean of 247.52. Test H₀: μ = 250 against H₁: μ < 250. Find the p-value p.
μ₀ = 250σ = 12n = 144x̄ = 247.52H₁: μ < μ₀
p =
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 100; the standard deviation is known to be 10. In reality the mean is 197.8. Find the power 1 − β of the test in percent.
μ₀ = 200μ = 197.8σ = 10n = 100α = 0.05
1 − β = %
7.Linear regression & correlationMedium
The table gives 5 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.
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, 18) is made. Find its residual e = y − ŷ.
n = 6(2.5, 18)
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 = 1002 × 3
χ² =
10.Chi-square testsHard
The table shows observed counts. Test at α = 0.05 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.05
χ² =
3Solutions
1.Normal distribution
Answer: z = 0.89
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 of z
Φ(z) = (1 + 0.6265)/2 = 0.8133
Read the z-table backwards
Find 0.8133 inside the table and read off z.
z = 0.89
Answer
z = 0.89
2.Normal distribution
Answer: P = 0.9875
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 difference
μ = 25.05 − 25 = 0.05 mm, σ = 0.02236 mm
Standardise
z = (0 − 0.05)/0.02236 = −2.24
Probability
P = 1 − Φ(−2.24) = 0.9875
Answer
P = 0.9875
3.Confidence intervals
Answer: lower limit = 83.88
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 = 24, t = 1.711
Margin of error
E = 1.711·13.5/√25 = 4.62
Interval
88.5 ± 4.62 → [83.88, 93.12]
Answer
lower limit = 83.88
4.Confidence intervals
Answer: n = 531
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·14/1)² = 530.4
Round up
A sample size is a whole number, and rounding down would make the margin too large.
n = 531
Answer
n = 531
5.Hypothesis tests & confidence intervals
Answer: p = 0.006569
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 ≤ α.
Test statistic
SE = σ/√n = 12/√144 = 1
z = (247.52 − 250)/1 = −2.48
Tail area
Φ(2.48) = 0.9934
1 − Φ(2.48) = 0.0066
p-value
p = 0.006569
Answer
p = 0.006569
p ≤ 0.05, so H₀ is rejected at the 5% level.
6.Hypothesis tests & confidence intervals
Answer: 1 − β = 71.06 %
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 = 10/√100 = 1
x̄c = 200 − 1.645·1 = 198.4
z under the true mean
z = (198.4 − 197.8)/1 = 0.555
Power
power = P(Z < 0.555) = 71.06%
1 − β = 71.06%
Answer
1 − β = 71.06%
7.Linear regression & correlation
Answer: r = 0.9924
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 = 1610 − 25·276/5 = 230
Sxx = 165 − 25²/5 = 40
Syy = 16578 − 276²/5 = 1343
Correlation coefficient
r = 230/√(40·1343) = 0.9924
Answer
r = 0.9924
8.Linear regression & correlation
Answer: e = −4.49
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
ȳ = 119/6 = 19.83
Sums of squares and products
Sxx = Σ(x − x̄)² = 17.5
Sxy = Σ(x − x̄)(y − ȳ) = −46.5
Regression line
b = −46.5/17.5 = −2.657
a = 19.83 − (−2.657)·3.5 = 29.13
ŷ = 29.13 − 2.657·x
Predicted value
ŷ = 29.13 + (−2.657)·2.5 = 22.49
Residual
e = 18 − 22.49 = −4.49
Answer
e = −4.49
The point lies below the line.
9.Chi-square tests
Answer: χ² = 6.528
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 rejected.
10.Chi-square tests
Answer: χ² = 12.86
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 α.