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.9850. Find z to two decimals.
A = 0.9850
z =
2.Normal distributionHard
The battery lifetimes are normally distributed with mean 500 h and standard deviation 40 h. Find the value x below which 97.5% of them lie (the 97.5th percentile).
μ = 500σ = 40P = 97.5%
x = h
3.Confidence intervalsMedium
A sample of 12 items has mean 99.5 and standard deviation s = 9.5. The population is roughly normal. Find the upper limit of the 95% confidence interval for the mean.
n = 12x̄ = 99.5s = 9.595%t(11) = 2.201
upper limit =
4.Confidence intervalsHard
The diameters of 10 machined shafts have a sample standard deviation of 8.5 µm. Assuming the diameters are normally distributed, find the upper limit σ of the 95% confidence interval for the population standard deviation. With df = 9, 2.5% of the χ² distribution lies below 2.7 and 2.5% lies above 19.023.
n = 10s = 8.5 µmχ² = 2.7, 19.023
σ = µm
5.Hypothesis tests & confidence intervalsMedium
A sample of 49 students has a mean score of 71.86 and a sample standard deviation of 10. Find the test statistic t for H₀: μ = 75.
μ₀ = 75x̄ = 71.86s = 10n = 49
t =
6.Hypothesis tests & confidence intervalsHard
In a trial, 65 of 100 patients on treatment A recover, and 48 of 80 patients on treatment B. Using the pooled proportion, find the test statistic z for H₀: p₁ = p₂.
x₁ = 65n₁ = 100x₂ = 48n₂ = 80
z =
7.Linear regression & correlationMedium
The table gives 5 paired observations of x = advertising spend in k€ and y = sales in k€. Find Pearson's correlation coefficient r.
n = 5
r =
8.Linear regression & correlationHard
The table gives 6 paired observations of x = car age in years and y = price in k€. Use the least-squares line ŷ = a + b·x. For which value x does the line predict ŷ = 11?
n = 6ŷ = 11
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 “urban, medium”.
row total = 36column total = 31N = 87
E =
10.Chi-square testsHard
A chi-square goodness-of-fit test checks whether counts in 7 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: z = −2.17
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.9850 = 0.0150
Read the z-table backwards
Find 0.0150 inside the table and read off z.
z = −2.17
Answer
z = −2.17
2.Normal distribution
Answer: x = 578.4 h
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.975 → z = 1.96
Back to x
x = 500 + 1.96·40 = 578.4 h
Answer
x = 578.4 h
3.Confidence intervals
Answer: upper limit = 105.5
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 = 11, t = 2.201
Margin of error
E = 2.201·9.5/√12 = 6.036
Interval
99.5 ± 6.036 → [93.46, 105.5]
Answer
upper limit = 105.5
4.Confidence intervals
Answer: σ = 15.52 µ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² = 9·8.5² = 650.3
Limits for σ²
650.3/19.023 = 34.18
650.3/2.7 = 240.8
Limit for σ
σ = √240.8 = 15.52 µm
Answer
σ = 15.52 µm
95% interval for σ: [5.847, 15.52] µm.
5.Hypothesis tests & confidence intervals
Answer: t = −2.198
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
SE = 10/√49 = 10/7 = 1.429
Test statistic
t = (71.86 − 75)/1.429 = −2.198
Answer
t = −2.198
t0.025; df = 48 = 2.011
|t| > 2.011, so H₀ is rejected at the 5% level (two-sided).
6.Hypothesis tests & confidence intervals
Answer: z = 0.6896
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̂₁ = 65/100 = 0.65
p̂₂ = 48/80 = 0.6
p̂ = 113/180 = 0.6278
Standard error under H₀
SE = √(0.6278·0.3722·(1/100 + 1/80)) = 0.07251
Test statistic
z = (0.65 − 0.6)/0.07251 = 0.6896
Answer
z = 0.6896
|z| < 1.96, so H₀ is not rejected at the 5% level (two-sided).
7.Linear regression & correlation
Answer: r = 0.9959
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
ȳ = 208/5 = 41.6
Sums of squares and products
Sxx = Σ(x − x̄)² = 40
Sxy = Σ(x − x̄)(y − ȳ) = 158
Syy = Σ(y − ȳ)² = 629.2
Correlation coefficient
r = 158/√(40·629.2) = 0.9959
Answer
r = 0.9959
8.Linear regression & correlation
Answer: x = 4.444
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
ȳ = 83/6 = 13.83
Sums of squares and products
Sxx = Σ(x − x̄)² = 17.5
Sxy = Σ(x − x̄)(y − ȳ) = −52.5
Regression line
b = −52.5/17.5 = −3
a = 13.83 − (−3)·3.5 = 24.33
ŷ = 24.33 − 3·x
Solve for x
x = (11 − 24.33)/(−3) = 4.444
Answer
x = 4.444
9.Chi-square tests
Answer: E = 12.83
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 = 36·31/87 = 12.83
Answer
E = 12.83
10.Chi-square tests
Answer: χ²crit = 15.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 = 7 − 1 − 1 = 5
Table
χ²crit(df = 5, α = 0.01) = 15.086
Answer
χ²crit = 15.086
Reject H₀ if the computed χ² is larger than this value.