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 27.5 and 43.1 min? Give P as a decimal.
μ = 32σ = 6x1 = 27.5x2 = 43.1
P =
2.Normal distributionHard
The bag weights are normally distributed with mean 250 g and standard deviation 5 g. Drag the cut-off so the shaded top 15% is to the right of it. Find the cut-off x.
μ = 250 gσ = 5 g15%
x = g
3.Confidence intervalsMedium
A 95% confidence interval for a mean, based on 50 observations and a known σ, has a margin of error of 10.1. What is the margin of error E₂ of a 99% interval based on 100 observations?
95%n₁ = 50E₁ = 10.199%n₂ = 100
E₂ =
4.Confidence intervalsHard
The population standard deviation is 35. 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 1?
σ = 35E = 199%
n =
5.Hypothesis tests & confidence intervalsMedium
Two production lines make the same part. Line 1: a sample of 60 parts has mean length 58.5 mm, and the line's known standard deviation is 12 mm. Line 2: a sample of 60 parts has mean 56.3 mm, known standard deviation 12 mm. Find the test statistic z for H₀: μ₁ = μ₂, taking the difference as x̄₁ − x̄₂ (line 1 minus line 2).
A sample of 16 measurements has mean 499.5. The population standard deviation is 5. Find the lower limit L of the 95% confidence interval for the mean.
x̄ = 499.5σ = 5n = 1695%
L =
7.Linear regression & correlationMedium
The table gives 6 paired observations of x = hours studied and y = exam score. Find Pearson's correlation coefficient r.
n = 6
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 ŷ = 47?
n = 5ŷ = 47
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 “night shift, major”.
row total = 107column total = 45N = 186
E =
10.Chi-square testsHard
A chi-square goodness-of-fit test compares observed counts in 4 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.7412
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₁ = (27.5 − 32)/6 = −0.75
z₂ = (43.1 − 32)/6 = 1.85
Area between
P = Φ(1.85) − Φ(−0.75) = 0.9678 − 0.2266 = 0.7412
Answer
P = 0.7412
2.Normal distribution
Answer: x = 255.2 g
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 = 250 + 1.04·5 = 255.2 g
Answer
x = 255.2 g
3.Confidence intervals
Answer: E₂ = 9.386
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₁ = (2.576/1.96)·√(50/100) = 0.9293
New margin
E₂ = 10.1·0.9293 = 9.386
Answer
E₂ = 9.386
4.Confidence intervals
Answer: n = 8129
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·35/1)² = 8129
Round up
A sample size is a whole number, and rounding down would make the margin too large.
n = 8129
Answer
n = 8129
5.Hypothesis tests & confidence intervals
Answer: z = 1.004
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 ≤ α.
Standard error of the difference
SE = √(12²/60 + 12²/60) = √4.8 = 2.191
Test statistic
z = (58.5 − 56.3)/2.191 = 1.004
Answer
z = 1.004
|z| < 1.96, so H₀ is not rejected at the 5% level (two-sided).
6.Hypothesis tests & confidence intervals
Answer: L = 497.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).
Margin of error
E = 1.96·5/√16 = 2.45
Interval limit
L = 499.5 − 2.45 = 497.1
Answer
L = 497.1
7.Linear regression & correlation
Answer: r = 0.9569
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
ȳ = 417/6 = 69.5
Sums of squares and products
Sxx = Σ(x − x̄)² = 17.5
Sxy = Σ(x − x̄)(y − ȳ) = 104.5
Syy = Σ(y − ȳ)² = 681.5
Correlation coefficient
r = 104.5/√(17.5·681.5) = 0.9569
Answer
r = 0.9569
8.Linear regression & correlation
Answer: x = 3.866
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
ȳ = 254/5 = 50.8
Sums of squares and products
Sxx = Σ(x − x̄)² = 40
Sxy = Σ(x − x̄)(y − ȳ) = 134
Regression line
b = 134/40 = 3.35
a = 50.8 − 3.35·5 = 34.05
ŷ = 34.05 + 3.35·x
Solve for x
x = (47 − 34.05)/3.35 = 3.866
Answer
x = 3.866
9.Chi-square tests
Answer: E = 25.89
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 = 107·45/186 = 25.89
Answer
E = 25.89
10.Chi-square tests
Answer: χ²crit = 11.35
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 = 4 − 1 = 3
Table
χ²crit(df = 3, α = 0.01) = 11.345
Answer
χ²crit = 11.345
Reject H₀ if the computed χ² is larger than this value.