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 heights of adult men are normally distributed with mean 178 cm and standard deviation 7 cm. What fraction lies between 175.9 and 190.6 cm? Give P as a decimal.
μ = 178σ = 7x1 = 175.9x2 = 190.6
P =
2.Normal distributionHard
Hole diameters D are normal with mean 25.02 mm and standard deviation 0.02 mm. Shaft diameters d are independent and normal with mean 25 mm and standard deviation 0.015 mm. A randomly chosen shaft fits when D − d > 0. Find the probability P that it fits. Round z to two decimals.
hole: μ = 25.02 mm, σ = 0.02 mmshaft: μ = 25 mm, σ = 0.015 mm
P =
3.Confidence intervalsMedium
A sample of 30 items has mean 14 and standard deviation s = 9.5. The population is roughly normal. Find the lower limit of the 95% confidence interval for the mean.
n = 30x̄ = 14s = 9.595%t(29) = 2.045
lower limit =
4.Confidence intervalsHard
The diameters of 21 machined shafts have a sample standard deviation of 11.9 µm. Assuming the diameters are normally distributed, find the lower limit σ of the 95% confidence interval for the population standard deviation. With df = 20, 2.5% of the χ² distribution lies below 9.591 and 2.5% lies above 34.17.
n = 21s = 11.9 µmχ² = 9.591, 34.17
σ = µm
5.Hypothesis tests & confidence intervalsMedium
A sample of 81 students has a mean score of 502.6 and a sample standard deviation of 8. Find the test statistic t for H₀: μ = 500.
μ₀ = 500x̄ = 502.6s = 8n = 81
t =
6.Hypothesis tests & confidence intervalsHard
In a trial, 50 of 200 patients on treatment A recover, and 83 of 250 patients on treatment B. Using the pooled proportion, find the test statistic z for H₀: p₁ = p₂.
x₁ = 50n₁ = 200x₂ = 83n₂ = 250
z =
7.Linear regression & correlationMedium
The table gives 6 paired observations of x = advertising spend in k€ and y = sales in k€. Find Pearson's correlation coefficient r.
n = 6
r =
8.Linear regression & correlationHard
The table gives 6 paired observations of x = temperature in °C and y = ice creams sold. Use the least-squares line ŷ = a + b·x. Predict ŷ for x = 18.5.
n = 6x = 18.5
ŷ =
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 = 95column total = 49N = 165
E =
10.Chi-square testsHard
A chi-square goodness-of-fit test compares observed counts in 10 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.05.
α = 0.05
χ²crit =
3Solutions
1.Normal distribution
Answer: P = 0.582
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₁ = (175.9 − 178)/7 = −0.3
z₂ = (190.6 − 178)/7 = 1.8
Area between
P = Φ(1.8) − Φ(−0.3) = 0.9641 − 0.3821 = 0.582
Answer
P = 0.582
2.Normal distribution
Answer: P = 0.7881
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.02 − 25 = 0.02 mm, σ = 0.025 mm
Standardise
z = (0 − 0.02)/0.025 = −0.8
Probability
P = 1 − Φ(−0.8) = 0.7881
Answer
P = 0.7881
3.Confidence intervals
Answer: lower limit = 10.45
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 = 29, t = 2.045
Margin of error
E = 2.045·9.5/√30 = 3.547
Interval
14 ± 3.547 → [10.45, 17.55]
Answer
lower limit = 10.45
4.Confidence intervals
Answer: σ = 9.104 µm
Interval for a variance: (n − 1)s²/σ² has a χ² distribution with n − 1 degrees of freedom. The 95% interval for σ² runs from (n − 1)s² divided by the upper χ² value (2.5% above it) to (n − 1)s² divided by the lower χ² value (2.5% below it); the interval for σ is the square root of both limits. It is not symmetric around s.
Sum of squares
(n − 1)s² = 20·11.9² = 2832
Limits for σ²
2832/34.17 = 82.89
2832/9.591 = 295.3
Limit for σ
σ = √82.89 = 9.104 µm
Answer
σ = 9.104 µm
95% interval for σ: [9.104, 17.18] µm.
5.Hypothesis tests & confidence intervals
Answer: t = 2.925
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 = 8/√81 = 8/9 = 0.8889
Test statistic
t = (502.6 − 500)/0.8889 = 2.925
Answer
t = 2.925
t0.025; df = 80 = 1.99
|t| > 1.99, so H₀ is rejected at the 5% level (two-sided).
6.Hypothesis tests & confidence intervals
Answer: z = −1.894
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 ≤ α.
Sample proportions
p̂₁ = 50/200 = 0.25
p̂₂ = 83/250 = 0.332
p̂ = 133/450 = 0.2956
Standard error under H₀
SE = √(0.2956·0.7044·(1/200 + 1/250)) = 0.04329
Test statistic
z = (0.25 − 0.332)/0.04329 = −1.894
Answer
z = −1.894
|z| < 1.96, so H₀ is not rejected at the 5% level (two-sided).
7.Linear regression & correlation
Answer: r = 0.9708
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̄ = 27/6 = 4.5
ȳ = 247/6 = 41.17
Sums of squares and products
Sxx = Σ(x − x̄)² = 17.5
Sxy = Σ(x − x̄)(y − ȳ) = 76.5
Syy = Σ(y − ȳ)² = 354.8
Correlation coefficient
r = 76.5/√(17.5·354.8) = 0.9708
Answer
r = 0.9708
8.Linear regression & correlation
Answer: ŷ = 85.06
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̄ = 129/6 = 21.5
ȳ = 618/6 = 103
Sums of squares and products
Sxx = Σ(x − x̄)² = 157.5
Sxy = Σ(x − x̄)(y − ȳ) = 942
Regression line
b = 942/157.5 = 5.981
a = 103 − 5.981·21.5 = −25.59
ŷ = −25.59 + 5.981·x
Prediction
ŷ = −25.59 + 5.981·18.5 = 85.06
Answer
ŷ = 85.06
9.Chi-square tests
Answer: E = 28.21
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 = 95·49/165 = 28.21
Answer
E = 28.21
10.Chi-square tests
Answer: χ²crit = 16.92
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 = 10 − 1 = 9
Table
χ²crit(df = 9, α = 0.05) = 16.919
Answer
χ²crit = 16.919
Reject H₀ if the computed χ² is larger than this value.