Statistical Inference: Estimation and Testing of Hypotheses

Inference is how a sample speaks for a population. This chapter covers point and interval estimation, the properties of a good estimator, the methods of moments, maximum likelihood and least squares, and the logic of testing a hypothesis — null and alternative hypotheses, the two types of error, level of significance and power — followed by the large-sample Z test and the small-sample t, chi-square and F tests, with their degrees of freedom and confidence intervals.

Point and interval estimation; properties of a good estimator

An estimator is a statistic used to guess a parameter; its value in a given sample is the estimate. A point estimate is one number (x̄ = 52.3); an interval estimate is a range with a stated confidence (48.0 to 56.6 with 95% confidence).

Four properties of a good estimator T of θ
PropertyMeaningExample
UnbiasednessE(T) = θx̄ for μ; s² with divisor n − 1 for σ²
ConsistencyT → θ in probability as n growsx̄ for μ
Efficiencysmallest variance among unbiased estimatorsfor a normal mean, x̄ beats the median
Sufficiencyuses all the information the sample has about θΣx for a Poisson λ
⚠️ Exam trap
The sample variance with divisor n is a biased estimator of σ²; dividing by n − 1 makes it unbiased. 'Which estimator of σ² is unbiased?' is asking for the n − 1 version.

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%.

The two errors
DecisionH₀ trueH₀ false
Reject H₀Type I error (probability α)correct decision (power 1 − β)
Accept H₀correct decisionType 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).

🧠 Memory trick
Type I = Innocent convicted (true H₀ rejected); Type II = guilty set free (false H₀ accepted).

Z, t, chi-square and F tests

Which test, and its degrees of freedom
TestUsed forStatistic / d.f.
Z (large sample)mean or proportion, n ≥ 30 or σ knownZ = (x̄ − μ₀)/(σ/√n)
t, one samplemean, n small, σ unknownt = (x̄ − μ₀)/(s/√n), d.f. n − 1
t, two samplesdifference of two means, common varianced.f. n₁ + n₂ − 2
t, pairedbefore–after on the same unitsd.f. n − 1 (n pairs)
χ², goodness of fitobserved vs expected frequenciesΣ(O − E)²/E, d.f. k − 1 − (parameters estimated)
χ², independencer × c contingency tabled.f. (r − 1)(c − 1)
χ², varianceσ² = σ₀²(n − 1)s²/σ₀², d.f. n − 1
Fequality of two variances; ANOVAF = 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 trap
χ² and F are never negative, so their tests are normally one-tailed in the upper tail; and in the F test the larger sample variance goes in the numerator so that F ≥ 1.

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.

  1. An estimator T of a parameter θ is unbiased if:

    1. T = θ in every sample
    2. T → θ as n → ∞
    3. Var(T) = 0
    4. E(T) = θ
    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.
  2. Which of the following is an unbiased estimator of the population variance σ²?

    1. √(Σ(x − x̄)²/n)
    2. Σ(x − x̄)/n
    3. Σ(x − x̄)²/n
    4. Σ(x − x̄)²/(n − 1)
    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.
  3. A Type I error is committed when:

    1. a true null hypothesis is accepted
    2. a true null hypothesis is rejected
    3. a false null hypothesis is rejected
    4. a false null hypothesis is accepted
    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.
  4. The power of a test is:

    1. α, the level of significance
    2. 1 − α, the probability of accepting a true H₀
    3. β, the probability of a Type II error
    4. 1 − β, the probability of rejecting H₀ when it is false
    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.
  5. A random sample of 100 has mean 50; the population SD is 10. The 95% confidence interval for the population mean is:

    1. 48.04 to 51.96
    2. 30.4 to 69.6
    3. 49.80 to 50.20
    4. 47.42 to 52.58
    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.
  6. A t-test is applied to test the mean of a single sample of 15 observations. The degrees of freedom are:

    1. 15
    2. 13
    3. 14
    4. 16
    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.
  7. For a chi-square test of independence in a 3 × 4 contingency table, the degrees of freedom are:

    1. 11
    2. 6
    3. 12
    4. 7
    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.
  8. The F statistic used to test the equality of two population variances is computed as:

    1. the larger sample variance divided by the smaller
    2. the product of the two sample SDs
    3. the ratio of the two sample means
    4. the difference of the two sample variances
    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.
  9. For a random sample x₁, …, xₙ from a Poisson distribution with parameter λ, the maximum likelihood estimator of λ is:

    1. the sample median
    2. the sample variance
    3. the sample mean x̄
    4. the largest observation
    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.
  10. A sample of 64 has mean 52. Testing H₀: μ = 50 against H₁: μ ≠ 50 with known σ = 8, the correct conclusion is:

    1. Z = 0.25: accept H₀ at both levels
    2. Z = 2: reject H₀ at both 5% and 1%
    3. Z = 2: reject H₀ at 5% but not at 1%
    4. Z = 16: reject H₀ at both levels
    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.