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 exam scores are normally distributed with mean 65 points and standard deviation 10 points. What fraction lies between 50 and 77.5 points? Give P as a decimal.
μ = 65σ = 10x1 = 50x2 = 77.5
P =
2.Normal distributionHard
Runner A's lap time X and runner B's lap time Y are independent and normal: X has mean 52 s and standard deviation 4 s, Y has mean 48 s and standard deviation 3 s. Find the probability P that X is greater than Y. Round z to two decimals.
μX = 52 s, σX = 4 sμY = 48 s, σY = 3 s
P =
3.Confidence intervalsMedium
A sample of 13 items has mean 29 and standard deviation s = 20. The population is roughly normal. Find the lower limit of the 99% confidence interval for the mean.
n = 13x̄ = 29s = 2099%t(12) = 3.055
lower limit =
4.Confidence intervalsHard
Nothing is known in advance about the proportion of defective products. 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.02?
p = 0.5E = 0.0299%
n =
5.Hypothesis tests & confidence intervalsMedium
A sample of 25 students has a mean score of 506.3 and a sample standard deviation of 15. Find the test statistic t for H₀: μ = 500.
μ₀ = 500x̄ = 506.3s = 15n = 25
t =
6.Hypothesis tests & confidence intervalsHard
In a trial, 35 of 100 patients on treatment A recover, and 45 of 100 patients on treatment B. Using the pooled proportion, find the test statistic z for H₀: p₁ = p₂.
x₁ = 35n₁ = 100x₂ = 45n₂ = 100
z =
7.Linear regression & correlationMedium
The table gives 6 paired observations of x = temperature in °C and y = ice creams sold. Their sums are given. Find Pearson's correlation coefficient r from these sums.
The table gives 6 paired observations of x = load in kN and y = extension in mm. Use the least-squares line ŷ = a + b·x. A new observation (3, 8) is made. Find its residual e = y − ŷ.
n = 6(3, 8)
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 = 802 × 3
χ² =
10.Chi-square testsHard
A chi-square goodness-of-fit test compares observed counts in 3 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.8275
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₁ = (50 − 65)/10 = −1.5
z₂ = (77.5 − 65)/10 = 1.25
Area between
P = Φ(1.25) − Φ(−1.5) = 0.8944 − 0.06681 = 0.8275
Answer
P = 0.8275
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
μ = 52 − 48 = 4 s, σ = 5 s
Standardise
z = (0 − 4)/5 = −0.8
Probability
P = 1 − Φ(−0.8) = 0.7881
Answer
P = 0.7881
3.Confidence intervals
Answer: lower limit = 12.05
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 = 12, t = 3.055
Margin of error
E = 3.055·20/√13 = 16.95
Interval
29 ± 16.95 → [12.05, 45.95]
Answer
lower limit = 12.05
4.Confidence intervals
Answer: n = 4148
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.5·0.5/0.02² = 4147
Round up
n = 4148
Answer
n = 4148
5.Hypothesis tests & confidence intervals
Answer: t = 2.1
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 = 15/√25 = 15/5 = 3
Test statistic
t = (506.3 − 500)/3 = 2.1
Answer
t = 2.1
t0.025; df = 24 = 2.064
|t| > 2.064, so H₀ is rejected at the 5% level (two-sided).
6.Hypothesis tests & confidence intervals
Answer: z = −1.443
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̂₁ = 35/100 = 0.35
p̂₂ = 45/100 = 0.45
p̂ = 80/200 = 0.4
Standard error under H₀
SE = √(0.4·0.6·(1/100 + 1/100)) = 0.06928
Test statistic
z = (0.35 − 0.45)/0.06928 = −1.443
Answer
z = −1.443
|z| < 1.96, so H₀ is not rejected at the 5% level (two-sided).
7.Linear regression & correlation
Answer: r = 0.9967
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 = 21987 − 153·829/6 = 847.5
Sxx = 4059 − 153²/6 = 157.5
Syy = 119131 − 829²/6 = 4591
Correlation coefficient
r = 847.5/√(157.5·4591) = 0.9967
Answer
r = 0.9967
8.Linear regression & correlation
Answer: e = −5.005
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
ȳ = 173/6 = 28.83
Sums of squares and products
Sxx = Σ(x − x̄)² = 70
Sxy = Σ(x − x̄)(y − ȳ) = 277
Regression line
b = 277/70 = 3.957
a = 28.83 − 3.957·7 = 1.133
ŷ = 1.133 + 3.957·x
Predicted value
ŷ = 1.133 + 3.957·3 = 13
Residual
e = 8 − 13 = −5.005
Answer
e = −5.005
The point lies below the line.
9.Chi-square tests
Answer: χ² = 3.15
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 = 9.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 α.
Degrees of freedom
df = 3 − 1 = 2
Table
χ²crit(df = 2, α = 0.01) = 9.210
Answer
χ²crit = 9.210
Reject H₀ if the computed χ² is larger than this value.