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 delivery times are normally distributed with mean 32 min and standard deviation 6 min. What fraction lies between 29.3 and 42.8 min? Give P as a decimal.
μ = 32σ = 6x1 = 29.3x2 = 42.8
P =
2.Normal distributionHard
The battery lifetimes are normally distributed with mean 500 h and standard deviation 40 h. Drag the cut-off so the shaded top 80% is to the right of it. Find the cut-off x.
μ = 500 hσ = 40 h80%
x = h
3.Confidence intervalsMedium
A 95% confidence interval for a mean, based on 36 observations and a known σ, has a margin of error of 7.7. What is the margin of error E₂ if the same study uses 144 observations instead?
95%n₁ = 36E₁ = 7.7n₂ = 144
E₂ =
4.Confidence intervalsHard
The population standard deviation is 15. How large a sample n do you need so that a 99% confidence interval for the mean has a margin of error of at most 3?
σ = 15E = 399%
n =
5.Hypothesis tests & confidence intervalsMedium
A sample of 25 students has a mean score of 69.8 and a sample standard deviation of 10. Find the test statistic t for H₀: μ = 75.
μ₀ = 75x̄ = 69.8s = 10n = 25
t =
6.Hypothesis tests & confidence intervalsHard
A one-sided z test of H₀: μ = 500 against H₁: μ > 500 is done at α = 0.05 with a sample of 64; the standard deviation is known to be 12. In reality the mean is 503.75. Find the power 1 − β of the test in percent.
μ₀ = 500μ = 503.75σ = 12n = 64α = 0.05
1 − β = %
7.Linear regression & correlationMedium
The table gives 5 paired observations of x = car age in years and y = price in k€. Find Pearson's correlation coefficient r.
n = 5
r =
8.Linear regression & correlationHard
The table gives 5 paired observations of x = advertising spend in k€ and y = sales in k€. Use the least-squares line ŷ = a + b·x. For which value x does the line predict ŷ = 38?
n = 5ŷ = 38
x =
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 = 73column total = 48N = 140
E =
10.Chi-square testsHard
A chi-square goodness-of-fit test compares observed counts in 11 categories with fully specified expected proportions (no parameters are estimated from the data). How many degrees of freedom df does the test have?
k = 11
df =
3Solutions
1.Normal distribution
Answer: P = 0.6377
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₁ = (29.3 − 32)/6 = −0.45
z₂ = (42.8 − 32)/6 = 1.8
Area between
P = Φ(1.8) − Φ(−0.45) = 0.9641 − 0.3264 = 0.6377
Answer
P = 0.6377
2.Normal distribution
Answer: x = 466 h
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.2
z from the table
z ≈ −0.84
Back to the original units
x = 500 − 0.84·40 = 466 h
Answer
x = 466 h
3.Confidence intervals
Answer: E₂ = 3.85
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.
Ratio of margins
E₂/E₁ = (1.96/1.96)·√(36/144) = 0.5
New margin
E₂ = 7.7·0.5 = 3.85
Answer
E₂ = 3.85
4.Confidence intervals
Answer: n = 166
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 = (2.576·15/3)² = 165.9
Round up
A sample size is a whole number, and rounding down would make the margin too large.
n = 166
Answer
n = 166
5.Hypothesis tests & confidence intervals
Answer: t = −2.6
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 = 10/√25 = 10/5 = 2
Test statistic
t = (69.8 − 75)/2 = −2.6
Answer
t = −2.6
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: 1 − β = 80.37 %
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/√64 = 1.5
x̄c = 500 + 1.645·1.5 = 502.5
z under the true mean
z = (502.5 − 503.75)/1.5 = −0.855
Power
power = P(Z > −0.855) = 80.37%
1 − β = 80.37%
Answer
1 − β = 80.37%
7.Linear regression & correlation
Answer: r = −0.9774
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
ȳ = 101/5 = 20.2
Sums of squares and products
Sxx = Σ(x − x̄)² = 10
Sxy = Σ(x − x̄)(y − ȳ) = −16
Syy = Σ(y − ȳ)² = 26.8
Correlation coefficient
r = −16/√(10·26.8) = −0.9774
Answer
r = −0.9774
8.Linear regression & correlation
Answer: x = 5.981
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̄ = 25/5 = 5
ȳ = 177/5 = 35.4
Sums of squares and products
Sxx = Σ(x − x̄)² = 40
Sxy = Σ(x − x̄)(y − ȳ) = 106
Regression line
b = 106/40 = 2.65
a = 35.4 − 2.65·5 = 22.15
ŷ = 22.15 + 2.65·x
Solve for x
x = (38 − 22.15)/2.65 = 5.981
Answer
x = 5.981
9.Chi-square tests
Answer: E = 25.03
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 = 73·48/140 = 25.03
Answer
E = 25.03
10.Chi-square tests
Answer: df = 10
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 α.