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 248.5 and 259 g? Give P as a decimal.
μ = 250σ = 5x1 = 248.5x2 = 259
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 15% is to the right of it. Find the cut-off x.
μ = 178 cmσ = 7 cm15%
x = cm
3.Confidence intervalsMedium
A sample of 16 items has mean 16.5 and standard deviation s = 1.5. The population is roughly normal. Find the lower limit of the 99% confidence interval for the mean.
n = 16x̄ = 16.5s = 1.599%t(15) = 2.947
lower limit =
4.Confidence intervalsHard
The population standard deviation is 20. How large a sample n do you need so that a 95% confidence interval for the mean has a margin of error of at most 4?
σ = 20E = 495%
n =
5.Hypothesis tests & confidence intervalsMedium
A sample of 49 students has a mean score of 105 and a sample standard deviation of 12. Find the test statistic t for H₀: μ = 100.
μ₀ = 100x̄ = 105s = 12n = 49
t =
6.Hypothesis tests & confidence intervalsHard
A sample of 100 measurements has mean 98.8. The population standard deviation is 15. Find the lower limit L of the 95% confidence interval for the mean.
x̄ = 98.8σ = 15n = 10095%
L =
7.Linear regression & correlationMedium
The table gives 6 paired observations of x = car age in years and y = price in k€. Find Pearson's correlation coefficient r.
n = 6
r =
8.Linear regression & correlationHard
The table gives 5 paired observations of x = hours studied and y = exam score. Use the least-squares line ŷ = a + b·x. A new observation (2.5, 55) is made. Find its residual e = y − ŷ.
n = 5(2.5, 55)
e =
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 “urban, high”.
row total = 86column total = 45N = 132
E =
10.Chi-square testsHard
A chi-square goodness-of-fit test compares observed counts in 7 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.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₁ = (248.5 − 250)/5 = −0.3
z₂ = (259 − 250)/5 = 1.8
Area between
P = Φ(1.8) − Φ(−0.3) = 0.9641 − 0.3821 = 0.582
Answer
P = 0.582
2.Normal distribution
Answer: x = 185.3 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.85
z from the table
z ≈ 1.04
Back to the original units
x = 178 + 1.04·7 = 185.3 cm
Answer
x = 185.3 cm
3.Confidence intervals
Answer: lower limit = 15.39
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 = 15, t = 2.947
Margin of error
E = 2.947·1.5/√16 = 1.105
Interval
16.5 ± 1.105 → [15.39, 17.61]
Answer
lower limit = 15.39
4.Confidence intervals
Answer: n = 97
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.96·20/4)² = 96.04
Round up
A sample size is a whole number, and rounding down would make the margin too large.
n = 97
Answer
n = 97
5.Hypothesis tests & confidence intervals
Answer: t = 2.917
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 = 12/√49 = 12/7 = 1.714
Test statistic
t = (105 − 100)/1.714 = 2.917
Answer
t = 2.917
t0.025; df = 48 = 2.011
|t| > 2.011, so H₀ is rejected at the 5% level (two-sided).
6.Hypothesis tests & confidence intervals
Answer: L = 95.86
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).
Margin of error
E = 1.96·15/√100 = 2.94
Interval limit
L = 98.8 − 2.94 = 95.86
Answer
L = 95.86
7.Linear regression & correlation
Answer: r = −0.9606
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
ȳ = 137/6 = 22.83
Sums of squares and products
Sxx = Σ(x − x̄)² = 17.5
Sxy = Σ(x − x̄)(y − ȳ) = −27.5
Syy = Σ(y − ȳ)² = 46.83
Correlation coefficient
r = −27.5/√(17.5·46.83) = −0.9606
Answer
r = −0.9606
8.Linear regression & correlation
Answer: e = 1.75
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̄ = 15/5 = 3
ȳ = 279/5 = 55.8
Sums of squares and products
Sxx = Σ(x − x̄)² = 10
Sxy = Σ(x − x̄)(y − ȳ) = 51
Regression line
b = 51/10 = 5.1
a = 55.8 − 5.1·3 = 40.5
ŷ = 40.5 + 5.1·x
Predicted value
ŷ = 40.5 + 5.1·2.5 = 53.25
Residual
e = 55 − 53.25 = 1.75
Answer
e = 1.75
The point lies above the line.
9.Chi-square tests
Answer: E = 29.32
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 = 86·45/132 = 29.32
Answer
E = 29.32
10.Chi-square tests
Answer: χ²crit = 16.81
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 = 7 − 1 = 6
Table
χ²crit(df = 6, α = 0.01) = 16.812
Answer
χ²crit = 16.812
Reject H₀ if the computed χ² is larger than this value.