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 exam scores are normally distributed with mean 65 points and standard deviation 10 points. What fraction lies between 49.5 and 67.5 points? Give P as a decimal.
μ = 65σ = 10x1 = 49.5x2 = 67.5
P =
2.Normal distributionHard
The mass X of a product from line 1 and Y from line 2 are independent and normal: X has mean 500 g and standard deviation 8 g, Y has mean 490 g and standard deviation 6 g. Find the probability P that X is greater than Y. Round z to two decimals.
μX = 500 g, σX = 8 gμY = 490 g, σY = 6 g
P =
3.Confidence intervalsMedium
A 95% confidence interval for a mean, based on 25 observations and a known σ, has a margin of error of 10.7. What is the margin of error E₂ of a 90% interval based on 225 observations?
95%n₁ = 25E₁ = 10.790%n₂ = 225
E₂ =
4.Confidence intervalsHard
The population standard deviation is 32. 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 5?
σ = 32E = 599%
n =
5.Hypothesis tests & confidence intervalsMedium
12 employees take a typing test before and after a training course. For each person the difference d = after − before (words per minute) is recorded. The mean difference is 6.14 and the standard deviation of the differences is 5.6. Find the paired test statistic t for H₀: μd = 0.
n = 12d̄ = 6.14sd = 5.6
t =
6.Hypothesis tests & confidence intervalsHard
In a trial, 55 of 100 patients on treatment A recover, and 72 of 150 patients on treatment B. Using the pooled proportion, find the test statistic z for H₀: p₁ = p₂.
x₁ = 55n₁ = 100x₂ = 72n₂ = 150
z =
7.Linear regression & correlationMedium
The table gives 6 paired observations of x = car age in years and y = price in k€. 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 = load in kN and y = extension in mm. Use the least-squares line ŷ = a + b·x. For which value x does the line predict ŷ = 32?
n = 6ŷ = 32
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 “day shift, no defect”.
row total = 90column total = 81N = 175
E =
10.Chi-square testsHard
A chi-square test of independence is carried out on a contingency table with 2 rows and 2 columns (not counting the totals). Using the table, find the critical value χ²crit at significance level α = 0.05.
α = 0.05
χ²crit =
3Solutions
1.Normal distribution
Answer: P = 0.5381
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.
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
μ = 500 − 490 = 10 g, σ = 10 g
Standardise
z = (0 − 10)/10 = −1
Probability
P = 1 − Φ(−1) = 0.8413
Answer
P = 0.8413
3.Confidence intervals
Answer: E₂ = 2.993
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/1.96)·√(25/225) = 0.2798
New margin
E₂ = 10.7·0.2798 = 2.993
Answer
E₂ = 2.993
4.Confidence intervals
Answer: n = 272
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·32/5)² = 271.8
Round up
A sample size is a whole number, and rounding down would make the margin too large.
n = 272
Answer
n = 272
5.Hypothesis tests & confidence intervals
Answer: t = 3.798
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 of the mean difference
SE = 5.6/√12 = 1.617
Test statistic
t = 6.14/1.617 = 3.798
Answer
t = 3.798
With df = 11, the two-sided 5% critical value is 2.201; |t| is larger, so H₀ is rejected.
6.Hypothesis tests & confidence intervals
Answer: z = 1.085
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 ≤ α.
Sample proportions
p̂₁ = 55/100 = 0.55
p̂₂ = 72/150 = 0.48
p̂ = 127/250 = 0.508
Standard error under H₀
SE = √(0.508·0.492·(1/100 + 1/150)) = 0.06454
Test statistic
z = (0.55 − 0.48)/0.06454 = 1.085
Answer
z = 1.085
|z| < 1.96, so H₀ is not rejected at the 5% level (two-sided).
7.Linear regression & correlation
Answer: r² = 0.8156
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
ȳ = 143/6 = 23.83
Sums of squares and products
Sxx = Σ(x − x̄)² = 17.5
Sxy = Σ(x − x̄)(y − ȳ) = −15.5
Syy = Σ(y − ȳ)² = 16.83
Coefficient of determination
r² = −15.5²/(17.5·16.83) = 0.8156
Answer
r² = 0.8156
About 81.56% of the variation in y is explained by the line.
8.Linear regression & correlation
Answer: x = 8.888
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̄ = 42/6 = 7
ȳ = 153/6 = 25.5
Sums of squares and products
Sxx = Σ(x − x̄)² = 70
Sxy = Σ(x − x̄)(y − ȳ) = 241
Regression line
b = 241/70 = 3.443
a = 25.5 − 3.443·7 = 1.4
ŷ = 1.4 + 3.443·x
Solve for x
x = (32 − 1.4)/3.443 = 8.888
Answer
x = 8.888
9.Chi-square tests
Answer: E = 41.66
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 = 90·81/175 = 41.66
Answer
E = 41.66
10.Chi-square tests
Answer: χ²crit = 3.841
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 = (2 − 1)·(2 − 1) = 1
Table
χ²crit(df = 1, α = 0.05) = 3.841
Answer
χ²crit = 3.841
Reject H₀ if the computed χ² is larger than this value.