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
Drag z so that the shaded area under the standard normal curve, to the right of z, is 0.8078. Find z to two decimals.
A = 0.8078
z =
2.Normal distributionHard
The heights X of men and Y of women in a group are independent and normal: X has mean 180 cm and standard deviation 10 cm, Y has mean 170 cm and standard deviation 12 cm. Find the probability P that X is greater than Y. Round z to two decimals.
μX = 180 cm, σX = 10 cmμY = 170 cm, σY = 12 cm
P =
3.Confidence intervalsMedium
A 99% confidence interval for a mean, based on 25 observations and a known σ, has a margin of error of 11.4. What is the margin of error E₂ of a 90% interval based on 50 observations?
99%n₁ = 25E₁ = 11.490%n₂ = 50
E₂ =
4.Confidence intervalsHard
The diameters of 30 machined shafts have a sample standard deviation of 5.9 µm. Assuming the diameters are normally distributed, find the upper 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 = 5.9 µmχ² = 16.047, 45.722
σ = µm
5.Hypothesis tests & confidence intervalsMedium
Two teaching methods are compared. Group 1: 6 students, mean score 119, standard deviation 4. Group 2: 8 students, mean score 116.2, standard deviation 3. 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₁ = 6x̄₁ = 119s₁ = 4n₂ = 8x̄₂ = 116.2s₂ = 3
t =
6.Hypothesis tests & confidence intervalsHard
How large must a sample be so that the 90% confidence interval for a mean has a margin of error of at most 0.5? The standard deviation is 8. Find the smallest sample size n.
σ = 8E = 0.590%
n =
7.Linear regression & correlationMedium
The table gives 5 paired observations of x = load in kN and y = extension in mm. Find the coefficient of determination r² of the least-squares line.
n = 5
r² =
8.Linear regression & correlationHard
The table gives 5 paired observations of x = car age in years and y = price in k€. Use the least-squares line ŷ = a + b·x. A new observation (4.5, 15) is made. Find its residual e = y − ŷ.
n = 5(4.5, 15)
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 “night shift, major”.
row total = 77column total = 52N = 141
E =
10.Chi-square testsHard
The table shows observed counts. Test at α = 0.01 whether the two variables are independent (no continuity correction). Compute the test statistic χ², then compare it with the critical value from the table.
N = 2003 × 2α = 0.01
χ² =
3Solutions
1.Normal distribution
Answer: z = −0.87
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 of z
Φ(z) = 1 − 0.8078 = 0.1922
Read the z-table backwards
Find 0.1922 inside the table and read off z.
z = −0.87
Answer
z = −0.87
2.Normal distribution
Answer: P = 0.7389
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
μ = 180 − 170 = 10 cm, σ = 15.62 cm
Standardise
z = (0 − 10)/15.62 = −0.64
Probability
P = 1 − Φ(−0.64) = 0.7389
Answer
P = 0.7389
3.Confidence intervals
Answer: E₂ = 5.148
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.645/2.576)·√(25/50) = 0.4515
New margin
E₂ = 11.4·0.4515 = 5.148
Answer
E₂ = 5.148
4.Confidence intervals
Answer: σ = 7.931 µ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·5.9² = 1009
Limits for σ²
1009/45.722 = 22.08
1009/16.047 = 62.91
Limit for σ
σ = √62.91 = 7.931 µm
Answer
σ = 7.931 µm
95% interval for σ: [4.699, 7.931] µm.
5.Hypothesis tests & confidence intervals
Answer: t = 1.502
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² = (5·4² + 7·3²)/12 = 11.92
sp = 3.452
Standard error
SE = 3.452·√(1/6 + 1/8) = 1.864
Test statistic
t = (119 − 116.2)/1.864 = 1.502
Answer
t = 1.502
With df = 12, the two-sided 5% critical value is 2.179; |t| is smaller, so H₀ is not rejected.
6.Hypothesis tests & confidence intervals
Answer: n = 693
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).
Solve for n
n = (1.645·8/0.5)² = 692.7
Round up
n = 693
Answer
n = 693
7.Linear regression & correlation
Answer: r² = 0.9984
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̄ = 30/5 = 6
ȳ = 131/5 = 26.2
Sums of squares and products
Sxx = Σ(x − x̄)² = 40
Sxy = Σ(x − x̄)(y − ȳ) = 172
Syy = Σ(y − ȳ)² = 740.8
Coefficient of determination
r² = 172²/(40·740.8) = 0.9984
Answer
r² = 0.9984
About 99.84% of the variation in y is explained by the line.
8.Linear regression & correlation
Answer: e = −1.95
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
ȳ = 105/5 = 21
Sums of squares and products
Sxx = Σ(x − x̄)² = 10
Sxy = Σ(x − x̄)(y − ȳ) = −27
Regression line
b = −27/10 = −2.7
a = 21 − (−2.7)·3 = 29.1
ŷ = 29.1 − 2.7·x
Predicted value
ŷ = 29.1 + (−2.7)·4.5 = 16.95
Residual
e = 15 − 16.95 = −1.95
Answer
e = −1.95
The point lies below the line.
9.Chi-square tests
Answer: E = 28.4
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 = 77·52/141 = 28.4
Answer
E = 28.4
10.Chi-square tests
Answer: χ² = 0.9841
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 α.