Statistical Inference: Estimation and Testing of Hypotheses
Methods of estimation
- Method of moments: equate the first few sample moments to the corresponding population moments and solve for the parameters. For a Poisson, setting x̄ = λ gives λ̂ = x̄.
- Maximum likelihood (MLE): choose the parameter value that makes the observed sample most probable — maximise L(θ) = Πf(xᵢ; θ), usually through log L. The MLE of a Poisson λ is x̄, of a binomial p is x/n, and of a normal μ is x̄.
- Least squares: choose the parameters that minimise the sum of squared residuals Σ(y − ŷ)² — the method behind regression lines and trend lines.
Confidence interval for a mean. With σ known (or n large), x̄ ± z·σ/√n, where z = 1.96 for 95% and 2.576 for 99%. With x̄ = 50, σ = 10 and n = 100, the 95% interval is 50 ± 1.96 × 1 = 48.04 to 51.96. With σ unknown and n small, use s and t with n − 1 degrees of freedom instead of z.
The logic of testing a hypothesis
A test starts from a null hypothesis H₀ (no difference, no effect) and an alternative H₁. A test statistic is computed; if it falls in the critical (rejection) region, H₀ is rejected. The level of significance α is the probability of the critical region when H₀ is true — the risk of a false alarm we agree to run, usually 5% or 1%.
| Decision | H₀ true | H₀ false |
|---|---|---|
| Reject H₀ | Type I error (probability α) | correct decision (power 1 − β) |
| Accept H₀ | correct decision | Type II error (probability β) |
A two-tailed test (H₁: μ ≠ μ₀) splits α between both tails; a one-tailed test (H₁: μ > μ₀ or μ < μ₀) puts it all in one. Critical values of Z: ±1.96 (5%, two-tailed), 1.645 (5%, one-tailed), ±2.58 (1%, two-tailed), 2.33 (1%, one-tailed).
Z, t, chi-square and F tests
| Test | Used for | Statistic / d.f. |
|---|---|---|
| Z (large sample) | mean or proportion, n ≥ 30 or σ known | Z = (x̄ − μ₀)/(σ/√n) |
| t, one sample | mean, n small, σ unknown | t = (x̄ − μ₀)/(s/√n), d.f. n − 1 |
| t, two samples | difference of two means, common variance | d.f. n₁ + n₂ − 2 |
| t, paired | before–after on the same units | d.f. n − 1 (n pairs) |
| χ², goodness of fit | observed vs expected frequencies | Σ(O − E)²/E, d.f. k − 1 − (parameters estimated) |
| χ², independence | r × c contingency table | d.f. (r − 1)(c − 1) |
| χ², variance | σ² = σ₀² | (n − 1)s²/σ₀², d.f. n − 1 |
| F | equality of two variances; ANOVA | F = s₁²/s₂² (larger on top), d.f. (n₁ − 1, n₂ − 1) |
Worked: a sample of 64 has mean 52; is the population mean 50, given σ = 8? Z = (52 − 50)/(8/√64) = 2/1 = 2. Since |Z| = 2 > 1.96, reject H₀ at the 5% level (two-tailed); but 2 < 2.58, so H₀ is not rejected at 1%. The verdict depends on α, which is why it must be fixed before looking at the data.
Exam traps and a quick revision
- Unbiased: E(T) = θ; s² with n − 1 is unbiased for σ².
- MLE of Poisson λ = x̄; of binomial p = x/n.
- Type I = reject a true H₀ (α); Type II = accept a false H₀ (β); power = 1 − β.
- 5% two-tailed: ±1.96; 1% two-tailed: ±2.58.
- d.f.: t one-sample n − 1, two-sample n₁ + n₂ − 2; χ² table (r − 1)(c − 1); F (n₁ − 1, n₂ − 1).
Key takeaways
- A good estimator is unbiased, consistent, efficient and sufficient.
- Moments, maximum likelihood and least squares are the three methods of estimation in the syllabus.
- A 95% confidence interval for μ is x̄ ± 1.96σ/√n.
- α is the probability of a Type I error; power 1 − β is the probability of rejecting a false H₀.
- Z for large samples; t, χ² and F for small samples, each with its own degrees of freedom.
Practice questions (10)
Attempt each one before opening the answer. Every explanation names the tempting wrong option as well as the right one, because that is where marks are lost.
An estimator T of a parameter θ is unbiased if:
Show answer
Answer: D — E(T) = θ
Unbiasedness is about the average of T over all samples: E(T) = θ. Approaching θ as n grows is consistency, a different property.Which of the following is an unbiased estimator of the population variance σ²?
Show answer
Answer: D — Σ(x − x̄)²/(n − 1)
Dividing by n underestimates σ² on average because x̄ is closer to the sample than μ is; the divisor n − 1 corrects this. Σ(x − x̄)/n is always zero.A Type I error is committed when:
Show answer
Answer: B — a true null hypothesis is rejected
Type I is the false alarm: rejecting H₀ when it is true, with probability α. Accepting a false H₀ is the Type II error; the other two are correct decisions.The power of a test is:
Show answer
Answer: D — 1 − β, the probability of rejecting H₀ when it is false
Power measures how well the test detects a false H₀: 1 − β. 1 − α is the confidence of accepting a true H₀, which is not power.A random sample of 100 has mean 50; the population SD is 10. The 95% confidence interval for the population mean is:
Show answer
Answer: A — 48.04 to 51.96
SE = 10/√100 = 1, so 50 ± 1.96 × 1 = 48.04 to 51.96. Using σ instead of SE gives the much wider 30.4 to 69.6, and 2.58 gives the 99% interval.A t-test is applied to test the mean of a single sample of 15 observations. The degrees of freedom are:
Show answer
Answer: C — 14
One-sample t has n − 1 = 14 degrees of freedom, one being used up in estimating the mean. n₁ + n₂ − 2 applies only to two samples.For a chi-square test of independence in a 3 × 4 contingency table, the degrees of freedom are:
Show answer
Answer: B — 6
d.f. = (r − 1)(c − 1) = 2 × 3 = 6. 12 is the number of cells and 11 is cells minus one.The F statistic used to test the equality of two population variances is computed as:
Show answer
Answer: A — the larger sample variance divided by the smaller
F = s₁²/s₂² with the larger estimate on top, so that F ≥ 1 and the upper-tail table can be used, with (n₁ − 1, n₂ − 1) degrees of freedom.For a random sample x₁, …, xₙ from a Poisson distribution with parameter λ, the maximum likelihood estimator of λ is:
Show answer
Answer: C — the sample mean x̄
log L = −nλ + Σxᵢ log λ − Σ log xᵢ!; setting d(log L)/dλ = −n + Σxᵢ/λ = 0 gives λ̂ = Σxᵢ/n = x̄. The method of moments gives the same estimate here.A sample of 64 has mean 52. Testing H₀: μ = 50 against H₁: μ ≠ 50 with known σ = 8, the correct conclusion is:
Show answer
Answer: C — Z = 2: reject H₀ at 5% but not at 1%
Z = (52 − 50)/(8/√64) = 2/1 = 2. It exceeds 1.96 but not 2.58, so H₀ is rejected at 5% and retained at 1%. Forgetting the √n gives 0.25.