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 248.5 and 259.25 g? Give P as a decimal.
μ = 250σ = 5x1 = 248.5x2 = 259.25
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 sample of 6 items has mean 67.5 and standard deviation s = 12. The population is roughly normal. Find the upper limit of the 99% confidence interval for the mean.
n = 6x̄ = 67.5s = 1299%t(5) = 4.032
upper limit =
4.Confidence intervalsHard
The population standard deviation is 14. How large a sample n do you need so that a 90% confidence interval for the mean has a margin of error of at most 2?
σ = 14E = 290%
n =
5.Hypothesis tests & confidence intervalsMedium
Two teaching methods are compared. Group 1: 20 students, mean score 102.5, standard deviation 8. Group 2: 6 students, mean score 93.2, standard deviation 9.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₁ = 20x̄₁ = 102.5s₁ = 8n₂ = 6x̄₂ = 93.2s₂ = 9.5
t =
6.Hypothesis tests & confidence intervalsHard
A one-sided z test of H₀: μ = 100 against H₁: μ > 100 is done at α = 0.01 with a sample of 64; the standard deviation is known to be 16. In reality the mean is 105.4. Find the probability of a Type II error β in percent.
μ₀ = 100μ = 105.4σ = 16n = 64α = 0.01
β = %
7.Linear regression & correlationMedium
The table gives 5 paired observations of x = hours studied and y = exam score. Their sums are given. Find Pearson's correlation coefficient r from these sums.
The table gives 5 paired observations of x = load in kN and y = extension in mm. Use the least-squares line ŷ = a + b·x. Predict ŷ for x = 5.
n = 5x = 5
ŷ =
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 = 1202 × 3
χ² =
10.Chi-square testsHard
A chi-square goodness-of-fit test checks whether counts in 8 categories follow a Poisson distribution whose mean is estimated from the same data. Using the table, find the critical value χ²crit at significance level α = 0.01.
α = 0.01
χ²crit =
3Solutions
1.Normal distribution
Answer: P = 0.5858
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₁ = (248.5 − 250)/5 = −0.3
z₂ = (259.25 − 250)/5 = 1.85
Area between
P = Φ(1.85) − Φ(−0.3) = 0.9678 − 0.3821 = 0.5858
Answer
P = 0.5858
2.Normal distribution
Answer: P = 0.8413
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: upper limit = 87.25
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 = 5, t = 4.032
Margin of error
E = 4.032·12/√6 = 19.75
Interval
67.5 ± 19.75 → [47.75, 87.25]
Answer
upper limit = 87.25
4.Confidence intervals
Answer: n = 133
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 = (1.645·14/2)² = 132.6
Round up
A sample size is a whole number, and rounding down would make the margin too large.
n = 133
Answer
n = 133
5.Hypothesis tests & confidence intervals
Answer: t = 2.397
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² = (19·8² + 5·9.5²)/24 = 69.47
sp = 8.335
Standard error
SE = 8.335·√(1/20 + 1/6) = 3.88
Test statistic
t = (102.5 − 93.2)/3.88 = 2.397
Answer
t = 2.397
With df = 24, the two-sided 5% critical value is 2.064; |t| is larger, so H₀ is rejected.
6.Hypothesis tests & confidence intervals
Answer: β = 35.42 %
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 = 16/√64 = 2
x̄c = 100 + 2.326·2 = 104.7
z under the true mean
z = (104.7 − 105.4)/2 = −0.374
Type II error
power = P(Z > −0.374) = 64.58%
β = 100% − 64.58% = 35.42%
Answer
β = 35.42%
7.Linear regression & correlation
Answer: r = 0.9757
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.
Centred sums
Sxy = 2311 − 35·307/5 = 162
Sxx = 285 − 35²/5 = 40
Syy = 19539 − 307²/5 = 689.2
Correlation coefficient
r = 162/√(40·689.2) = 0.9757
Answer
r = 0.9757
8.Linear regression & correlation
Answer: ŷ = 21.85
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
ȳ = 128/5 = 25.6
Sums of squares and products
Sxx = Σ(x − x̄)² = 40
Sxy = Σ(x − x̄)(y − ȳ) = 150
Regression line
b = 150/40 = 3.75
a = 25.6 − 3.75·6 = 3.1
ŷ = 3.1 + 3.75·x
Prediction
ŷ = 3.1 + 3.75·5 = 21.85
Answer
ŷ = 21.85
9.Chi-square tests
Answer: χ² = 3.733
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 = 2. At α = 0.05 the critical value is 5.991, so H₀ (independence) is not rejected.
10.Chi-square tests
Answer: χ²crit = 16.81
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 = 8 − 1 − 1 = 6
Table
χ²crit(df = 6, α = 0.01) = 16.812
Answer
χ²crit = 16.812
Reject H₀ if the computed χ² is larger than this value.