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 244 and 251 g? Give P as a decimal.
μ = 250σ = 5x1 = 244x2 = 251
P =
2.Normal distributionHard
The bag weights are normally distributed with mean 250 g and standard deviation 5 g. Find the value x below which 25% of them lie (the 25th percentile).
μ = 250σ = 5P = 25%
x = g
3.Confidence intervalsMedium
A sample of 21 items has mean 114.5 and standard deviation s = 19.5. The population is roughly normal. Find the margin of error E of a 95% confidence interval for the mean.
n = 21x̄ = 114.5s = 19.595%t(20) = 2.086
E =
4.Confidence intervalsHard
The diameters of 30 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 = 29, 2.5% of the χ² distribution lies below 16.047 and 2.5% lies above 45.722.
n = 30s = 11.9 µmχ² = 16.047, 45.722
σ = µm
5.Hypothesis tests & confidence intervalsMedium
Two teaching methods are compared. Group 1: 13 students, mean score 54, standard deviation 4. Group 2: 8 students, mean score 57.8, standard deviation 4.5. Assume equal population variances and use the pooled two-sample t test. Find the test statistic t for H₀: μ₁ = μ₂, taking the difference as x̄₁ − x̄₂ (group 1 minus group 2).
n₁ = 13x̄₁ = 54s₁ = 4n₂ = 8x̄₂ = 57.8s₂ = 4.5
t =
6.Hypothesis tests & confidence intervalsHard
A one-sided z test at α = 0.05 must detect a shift of the mean of 3 units with a power of 90%. The standard deviation is 14. Find the minimum sample size n.
The table gives 6 paired observations of x = hours studied and y = exam score. Find the coefficient of determination r² of the least-squares line.
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. For which value x does the line predict ŷ = 125?
n = 6ŷ = 125
x =
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 × 2
χ² =
10.Chi-square testsHard
A chi-square goodness-of-fit test compares observed counts in 9 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.4642
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₁ = (244 − 250)/5 = −1.2
z₂ = (251 − 250)/5 = 0.2
Area between
P = Φ(0.2) − Φ(−1.2) = 0.5793 − 0.1151 = 0.4642
Answer
P = 0.4642
2.Normal distribution
Answer: x = 246.6 g
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 for the percentile
Φ(z) = 0.25 → z = −0.6745
Back to x
x = 250 + −0.6745·5 = 246.63 g
Answer
x = 246.63 g
3.Confidence intervals
Answer: E = 8.876
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 = 20, t = 2.086
Margin of error
E = 2.086·19.5/√21 = 8.876
Answer
E = 8.876
4.Confidence intervals
Answer: σ = 9.477 µ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² = 29·11.9² = 4107
Limits for σ²
4107/45.722 = 89.82
4107/16.047 = 255.9
Limit for σ
σ = √89.82 = 9.477 µm
Answer
σ = 9.477 µm
95% interval for σ: [9.477, 16] µm.
5.Hypothesis tests & confidence intervals
Answer: t = −2.018
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 ≤ α.
Pooled variance
sp² = (12·4² + 7·4.5²)/19 = 17.57
sp = 4.191
Standard error
SE = 4.191·√(1/13 + 1/8) = 1.883
Test statistic
t = (54 − 57.8)/1.883 = −2.018
Answer
t = −2.018
With df = 19, the two-sided 5% critical value is 2.093; |t| is smaller, so H₀ is not rejected.
6.Hypothesis tests & confidence intervals
Answer: n = 187
Sample size for a test: to detect a true shift δ with power 1 − β in a one-sided z test at level α, the standard error must satisfy δ = (z_α + z_β)·σ/√n, so n = ((z_α + z_β)·σ/δ)², rounded up.
Solve for n
n = ((1.645 + 1.282)·14/3)² = 186.6
Round up
n = 187
Answer
n = 187
7.Linear regression & correlation
Answer: r² = 0.7582
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
ȳ = 397/6 = 66.17
Sums of squares and products
Sxx = Σ(x − x̄)² = 17.5
Sxy = Σ(x − x̄)(y − ȳ) = 59.5
Syy = Σ(y − ȳ)² = 266.8
Coefficient of determination
r² = 59.5²/(17.5·266.8) = 0.7582
Answer
r² = 0.7582
About 75.82% of the variation in y is explained by the line.
8.Linear regression & correlation
Answer: x = 23.65
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̄ = 141/6 = 23.5
ȳ = 745/6 = 124.2
Sums of squares and products
Sxx = Σ(x − x̄)² = 157.5
Sxy = Σ(x − x̄)(y − ȳ) = 898.5
Regression line
b = 898.5/157.5 = 5.705
a = 124.2 − 5.705·23.5 = −9.895
ŷ = −9.895 + 5.705·x
Solve for x
x = (125 − (−9.895))/5.705 = 23.65
Answer
x = 23.65
9.Chi-square tests
Answer: χ² = 1.648
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 = 1. At α = 0.05 the critical value is 3.841, so H₀ (independence) is not rejected.
10.Chi-square tests
Answer: χ²crit = 20.09
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 = 9 − 1 = 8
Table
χ²crit(df = 8, α = 0.01) = 20.090
Answer
χ²crit = 20.090
Reject H₀ if the computed χ² is larger than this value.