Hypothesis tests for a mean

Hypothesis tests for a mean

Spec 3.5–6 · Edexcel International A Level Further Maths: Revision notes

Studying this course? Keep your progress in one place.

Key facts

  • H0:μ=μ0H_0:\mu=\mu_0; H1H_1 is μ>μ0\mu>\mu_0, μ<μ0\mu<\mu_0 (one-tailed) or μ≠μ0\mu\ne\mu_0 (two-tailed). Hypotheses are about μ\mu, never xˉ\bar x.
  • Variance known: Z=Xˉ−μ0σ/n∼N(0,1)Z=\frac{\bar X-\mu_0}{\sigma/\sqrt n}\sim N(0,1) under H0H_0.
  • Critical values: 1.6451.645 (one-tailed 5%), 1.961.96 (two-tailed 5%), 2.3262.326 (one-tailed 1%), 2.5762.576 (two-tailed 1%).
  • The Central Limit Theorem lets you use the test for large nn from any population.
  • If σ\sigma is unknown and nn is large, use ss in place of σ\sigma.

The structure of a test

State the hypotheses, find the distribution under H0H_0, calculate the statistic, then conclude in context.

A hypothesis test decides whether sample data give enough evidence against a claim about a population parameter. The null hypothesis H0:μ=μ0H_0:\mu=\mu_0 is the claim; the alternative hypothesis H1H_1 says what you are looking for. The significance level is the probability of rejecting H0H_0 when it is true.

Hypotheses are always about the population mean μ\mu, never the sample mean.

  1. 1

    State the hypotheses

    H0H_0, H1H_1 and the level

  2. 2

    Give the distribution

    Of Xˉ\bar X assuming H0H_0

  3. 3

    Calculate the statistic

    Compare with the critical value

  4. 4

    Conclude

    In context

A test for a mean

Which is a correct null hypothesis for a test about a mean?

Known variance

Under H0H_0, Z=Xˉ−μ0σ/n∼N(0,1)Z=\frac{\bar X-\mu_0}{\sigma/\sqrt n}\sim N(0,1); compare it with the critical value.

If X∼N(μ,σ2)X\sim N(\mu,\sigma^2) with σ\sigma known, then under H0H_0, Xˉ∼N(μ0,σ2n)\bar X\sim N\left(\mu_0,\frac{\sigma^2}{n}\right) and the test statistic is Z=Xˉ−μ0σ/nZ=\frac{\bar X-\mu_0}{\sigma/\sqrt n}.

Critical values: one-tailed 5%5\% is ±1.645\pm1.645 and 1%1\% is 2.3262.326; two-tailed 5%5\% is ±1.96\pm1.96 and 1%1\% is ±2.576\pm2.576.

−4−3−2−112340.10.20.30.4xy1.645N(0, 1)
One-tailed 5%5\% test: reject H0H_0 if z>1.645z>1.645 (shaded).

Worked example

Lifetimes ∼N(μ,802)\sim N(\mu,80^2). H0:μ=1200H_0:\mu=1200, H1:μ<1200H_1:\mu<1200, n=16n=16, xˉ=1165\bar x=1165. Test at the 5%5\% level.

A two-tailed test at the 1% level uses critical values:

Critical regions and p-values

Reject H0H_0 if the statistic is in the critical region, or if the pp-value is below the significance level.

The critical region is the set of values of the test statistic for which H0H_0 is rejected. It can be written for Xˉ\bar X: for a two-tailed 5%5\% test with μ0=48\mu_0=48, σ=6\sigma=6, n=100n=100, reject if Xˉ<46.8\bar X<46.8 or Xˉ>49.2\bar X>49.2.

The pp-value is the probability, assuming H0H_0, of a result at least as extreme as observed. For a two-tailed test double the tail: z=2.25z=2.25 gives p=2×0.0122=0.0244<0.05p=2\times0.0122=0.0244<0.05.

4646.54747.54848.54949.5500.10.20.30.40.50.60.70.8sample meandensity46.849.2X̄ ~ N(48, 0.6²)
Distribution of X̄ under H₀ with μ₀ = 48, σ = 6, n = 100 (so sd 0.6): the shaded area is a tail of the critical region, X̄ > 49.2

Critical region

  • Find critical zz (or xˉ\bar x) values
  • Reject if the statistic is inside

p-value

  • Probability of a result at least as extreme
  • Reject if p < significance level

For a two-tailed test, z=2.25z=2.25 has tail probability 0.0122. Compare with the 5% level:

Non-Normal populations

For large nn the Central Limit Theorem makes Xˉ\bar X approximately Normal.

The Central Limit Theorem states that if XX has mean μ\mu and variance σ2\sigma^2, then for large nn (roughly n≥30n\ge30) Xˉ≈N(μ,σ2n)\bar X\approx N\left(\mu,\frac{\sigma^2}{n}\right), whatever the shape of XX. The same test statistic and confidence intervals can then be used, approximately.

Example: skewed waiting times, σ=3.5\sigma=3.5, H0:μ=5.8H_0:\mu=5.8, H1:μ>5.8H_1:\mu>5.8, n=49n=49, xˉ=6.4\bar x=6.4. Then z=0.60.5=1.2<1.645z=\frac{0.6}{0.5}=1.2<1.645: insufficient evidence at 5%5\%.

0.511.522.530.511.522.5valuedensityX: skewedX̄ for n = 30: ≈ Normal
A skewed population (exponential, mean 1) against the distribution of the mean of n = 30 samples: approximately Normal (illustrative)
  • Large n (about 30 or more)Xˉ≈N(μ,σ2n)\bar X\approx N\left(\mu,\frac{\sigma^2}{n}\right)

Waiting times are skewed with n=49n=49. Can you use a Normal test for the mean?

Unknown variance

With a large sample, use the unbiased estimate ss in place of σ\sigma.

When σ2\sigma^2 is unknown, use the unbiased estimate s2=1n−1(∑x2−nxˉ2)s^2=\frac{1}{n-1}\left(\sum x^2-n\bar x^2\right). If nn is large, treat Xˉ−μS/n\frac{\bar X-\mu}{S/\sqrt n} as N(0,1)N(0,1).

Example: n=100n=100, ∑x=4930\sum x=4930, ∑x2=246 613\sum x^2=246\,613, H0:μ=48H_0:\mu=48, H1:μ≠48H_1:\mu\ne48. Then xˉ=49.3\bar x=49.3, s2=36s^2=36 and z=1.36/10=2.17>1.96z=\frac{1.3}{6/10}=2.17>1.96, so reject H0H_0. For small samples this approximation is not reliable, so say that nn is large.

  1. 1

    Mean

    x̄ = 4930 ÷ 100 = 49.3

  2. 2

    Unbiased variance

    s² = (246 613 − 100 × 49.3²) ÷ 99 = 36

  3. 3

    Test statistic

    z = 1.3 ÷ (6 ÷ 10) = 2.17

  4. 4

    Compare

    2.17 > 1.96, so reject H₀ at the 5% level

Testing H₀: μ = 48 against H₁: μ ≠ 48 with unknown variance (n = 100, Σx = 4930, Σx² = 246 613)
  • Unknown σ, large nz=xˉ−μ0s/nz=\dfrac{\bar x-\mu_0}{s/\sqrt n}

σ2\sigma^2 is unknown and n=100n=100. What do you do?

Try an exam question

Bottles are filled with a mean volume of 500500 ml and a known standard deviation of 66 ml. A random sample of 3636 bottles has mean volume 498.2498.2 ml. Test, at the 5%5\% level, whether the mean volume has changed.

[5 marks]

That's the notes covered.

Carry on to the next subtopic.

Try a question

Which pair of hypotheses should the consumer group use?

1 mark, marked against the mark scheme

Revision notes