Hypothesis Tests for a Population Mean

A2 · S2 · 13 min

Is the mean mass of bags of sugar really 10001000 g? Has a new training programme reduced the mean time to complete a task? Claims about a population mean are tested using the mean of a random sample. Under the null hypothesis the sample mean has a normal distribution, either exactly (normal population, known variance) or approximately (large sample, by the Central Limit Theorem), so the test is a zz-test using the normal tables. This is one of the most frequently examined tests on Paper 6, often combined with unbiased estimates from summarised data and followed by Type I and Type II errors.

The test statistic

To test H0:μ=μ0H_0: \mu = \mu_0, take a random sample of size nn and calculate xˉ\bar{x}. If H0H_0 is true, then from the distribution of the sample mean

Xˉ∼N(μ0,σ2n),\bar{X} \sim N\left(\mu_0, \frac{\sigma^2}{n}\right),

and the standardised test statistic is

z=xˉ−μ0σ/n.z = \frac{\bar{x} - \mu_0}{\sigma/\sqrt{n}}.

A large positive zz is evidence that μ>μ0\mu > \mu_0; a large negative zz is evidence that μ<μ0\mu < \mu_0.

The syllabus covers the same two situations as for confidence intervals.

SituationDistribution of Xˉ\bar{X} under H0H_0What to say
Population normal, σ\sigma knownN(μ0,σ2n)N\left(\mu_0, \dfrac{\sigma^2}{n}\right) exactly, any nn"XX is normal, so Xˉ\bar{X} is normal"
Large sample, any populationN(μ0,σ2n)N\left(\mu_0, \dfrac{\sigma^2}{n}\right) approximately; use s2s^2 if σ2\sigma^2 is unknown"nn is large, so by the Central Limit Theorem Xˉ\bar{X} is approximately normal"

In the second case, s2=1n−1(∑x2−(∑x)2n)s^2 = \dfrac{1}{n - 1}\left(\sum x^2 - \dfrac{(\sum x)^2}{n}\right) is the unbiased estimate of σ2\sigma^2.

Critical values for a $z$-test
Significance level10%10\%5%5\%2.5%2.5\%1%1\%0.5%0.5\%
One-tailed1.2821.2821.6451.6451.961.962.3262.3262.5762.576
Two-tailed1.6451.6451.961.962.2412.2412.5762.5762.8072.807

For a lower-tail test, the critical value is negative: reject H0H_0 if z<−1.645z < -1.645 at 5%5\%, for example. For a two-tailed test, reject if ∣z∣|z| exceeds the critical value.

These values are printed under the normal table in the formula booklet. There is no continuity correction in a test for a mean: Xˉ\bar{X} is already continuous (or treated as such through the Central Limit Theorem).

Two equivalent decisions

As with every test, you can decide in two ways.

Compare zz with the critical value. This is the most common approach for a mean.

Compare a probability with the significance level. For a lower-tail test, find P(Xˉ≤xˉ)=Φ(z)P(\bar{X} \le \bar{x}) = \Phi(z) and compare it with α\alpha; for an upper-tail test, P(Xˉ≥xˉ)=1−Φ(z)P(\bar{X} \ge \bar{x}) = 1 - \Phi(z).

The critical region for xˉ\bar{x}

Sometimes you are asked for the critical region in terms of the sample mean itself, for example before a sample is taken, or as the first step in finding the probability of a Type II error. Rearrange the critical zz-value:

lower tail: reject if xˉ<μ0−zσn,upper tail: reject if xˉ>μ0+zσn.\text{lower tail: reject if } \bar{x} < \mu_0 - z\frac{\sigma}{\sqrt{n}}, \qquad \text{upper tail: reject if } \bar{x} > \mu_0 + z\frac{\sigma}{\sqrt{n}}.

The graph shows Xˉ∼N(1000,22)\bar{X} \sim N(1000, 2^2), the distribution of the mean mass of 1616 bags when H0:μ=1000H_0: \mu = 1000 is true and σ=8\sigma = 8 g. For a lower-tail test at 5%5\%, the critical region is xˉ<1000−1.645×2=996.71\bar{x} < 1000 - 1.645 \times 2 = 996.71, shaded.

y = exp(-(x - 1000)^2 / 8) / (2 sqrt(2 pi)) fill 992 996.71 y = exp(-(x - 1000)^2 / 8) / (2 sqrt(2 pi))

A two-tailed test at the 5%5\% level rejects H0H_0 exactly when μ0\mu_0 lies outside the 95%95\% confidence interval for μ\mu. The two ideas are two views of the same calculation.

Test for a population mean
  1. Define μ\mu in context and state H0:μ=μ0H_0: \mu = \mu_0 and H1H_1.
  2. If σ\sigma is unknown, find xˉ\bar{x} and s2s^2 from the data.
  3. State the distribution of Xˉ\bar{X} under H0H_0, with the justification (normal population, or large sample and the Central Limit Theorem).
  4. Calculate z=xˉ−μ0σ/nz = \dfrac{\bar{x} - \mu_0}{\sigma/\sqrt{n}}.
  5. Compare with the critical value (or compare the tail probability with α\alpha), showing the inequality.
  6. Decide about H0H_0 and conclude in context, without certainty.
Routine: a two-tailed test with known variance

A machine cuts rods whose lengths are normally distributed with mean 120120 mm and standard deviation 1.51.5 mm. After the machine is serviced, a random sample of 2020 rods has mean length 120.8120.8 mm. Assuming the standard deviation is unchanged, test at the 5%5\% significance level whether the mean length has changed.

Solution

Let μ\mu mm be the population mean length after the service.

H0:μ=120H_0: \mu = 120, H1:μ≠120\quad H_1: \mu \ne 120.

The population is normal, so under H0H_0, Xˉ∼N(120,1.5220)\bar{X} \sim N\left(120, \dfrac{1.5^2}{20}\right).

z=120.8−1201.5/20=0.80.33541=2.385z = \frac{120.8 - 120}{1.5/\sqrt{20}} = \frac{0.8}{0.33541} = 2.385

The two-tailed critical value at 5%5\% is 1.961.96. Since 2.385>1.962.385 > 1.96, reject H0H_0.

There is evidence at the 5%5\% level that the mean length of the rods has changed.

A large sample with unknown variance

A manufacturer claims that the mean lifetime of its batteries is 4242 hours. A consumer group suspects that the mean is lower. The lifetimes, xx hours, of a random sample of 6060 batteries are summarised by

∑x=2460,∑x2=101 391.\sum x = 2460, \qquad \sum x^2 = 101\,391.

Test the consumer group's suspicion at the 1%1\% significance level.

Solutionxˉ=246060=41,s2=159(101 391−2460260)=159(101 391−100 860)=9\bar{x} = \frac{2460}{60} = 41, \qquad s^2 = \frac{1}{59}\left(101\,391 - \frac{2460^2}{60}\right) = \frac{1}{59}(101\,391 - 100\,860) = 9

Let μ\mu hours be the population mean lifetime. H0:μ=42H_0: \mu = 42, H1:μ<42\quad H_1: \mu < 42.

The distribution of lifetimes is not known, but n=60n = 60 is large, so by the Central Limit Theorem, under H0H_0,

Xˉ∼N(42,960) approximately.\bar{X} \sim N\left(42, \frac{9}{60}\right) \text{ approximately.}z=41−423/60=−10.38730=−2.582z = \frac{41 - 42}{3/\sqrt{60}} = \frac{-1}{0.38730} = -2.582

The one-tailed critical value at 1%1\% is −2.326-2.326. Since −2.582<−2.326-2.582 < -2.326, reject H0H_0.

There is evidence at the 1%1\% level that the mean lifetime of the batteries is less than 4242 hours.

Using a critical value of the sample mean

Bags of sugar have masses that are normally distributed with standard deviation 88 g. The mean is supposed to be 10001000 g. An inspector will weigh a random sample of 1616 bags and test at the 5%5\% significance level whether the mean is less than 10001000 g.

(a) Find the critical region for the sample mean.

(b) The sample mean is 997.2997.2 g. State the conclusion.

Solution

(a) H0:μ=1000H_0: \mu = 1000, H1:μ<1000\quad H_1: \mu < 1000. Under H0H_0, Xˉ∼N(1000,6416)=N(1000,4)\bar{X} \sim N\left(1000, \dfrac{64}{16}\right) = N(1000, 4).

Reject H0H_0 if

xˉ<1000−1.645×2=996.71.\bar{x} < 1000 - 1.645 \times 2 = 996.71.

The critical region is xˉ<996.71\bar{x} < 996.71.

(b) 997.2>996.71997.2 > 996.71, so xˉ\bar{x} is not in the critical region. Do not reject H0H_0: there is insufficient evidence at the 5%5\% level that the mean mass of the bags is less than 10001000 g.

The set of values that lead to rejection

The marks in a national test are normally distributed with standard deviation 55. A teacher will take a random sample of 2525 students to test, at the 1%1\% significance level, whether the population mean differs from 5050. Find the set of values of xˉ\bar{x} for which H0H_0 would be rejected.

Solution

H0:μ=50H_0: \mu = 50, H1:μ≠50\quad H_1: \mu \ne 50. Under H0H_0, Xˉ∼N(50,2525)=N(50,1)\bar{X} \sim N\left(50, \dfrac{25}{25}\right) = N(50, 1).

For a two-tailed test at 1%1\%, the critical values are ±2.576\pm 2.576. Reject H0H_0 if

xˉ<50−2.576=47.424orxˉ>50+2.576=52.576.\bar{x} < 50 - 2.576 = 47.424 \quad\text{or}\quad \bar{x} > 50 + 2.576 = 52.576.
Exam-hard: coded data, a test and its sensitivity

A company states that the mean time taken to assemble a desk is 3030 minutes. A new set of instructions is introduced, and the times, tt minutes, for a random sample of 5050 customers are summarised by

∑(t−30)=−60,∑(t−30)2=1220.\sum (t - 30) = -60, \qquad \sum (t - 30)^2 = 1220.

(a) Find unbiased estimates of the population mean and variance of the assembly time.

(b) Test at the 5%5\% significance level whether the new instructions have reduced the mean assembly time.

(c) Find the smallest significance level, to the nearest 0.1%0.1\%, at which the conclusion in (b) would be reached, and state whether the conclusion would be the same at the 2.5%2.5\% level.

(d) Explain whether it was necessary to use the Central Limit Theorem.

Solution

(a)

tˉ=30+−6050=28.8,s2=149(1220−(−60)250)=149(1220−72)=23.43\bar{t} = 30 + \frac{-60}{50} = 28.8, \qquad s^2 = \frac{1}{49}\left(1220 - \frac{(-60)^2}{50}\right) = \frac{1}{49}(1220 - 72) = 23.43

(b) Let μ\mu minutes be the population mean assembly time. H0:μ=30H_0: \mu = 30, H1:μ<30\quad H_1: \mu < 30.

Under H0H_0, Tˉ∼N(30,23.4350)\bar{T} \sim N\left(30, \dfrac{23.43}{50}\right) approximately, with standard deviation 23.42950=0.68452\sqrt{\dfrac{23.429}{50}} = 0.68452.

z=28.8−300.68452=−1.753z = \frac{28.8 - 30}{0.68452} = -1.753

−1.753<−1.645-1.753 < -1.645, so reject H0H_0. There is evidence at the 5%5\% level that the new instructions have reduced the mean assembly time.

(c) P(Tˉ≤28.8)=Φ(−1.753)=1−0.9602=0.0398P(\bar{T} \le 28.8) = \Phi(-1.753) = 1 - 0.9602 = 0.0398. H0H_0 is rejected at any level above 3.98%3.98\%, so the smallest level is 4.0%4.0\%.

At 2.5%2.5\% the critical value is −1.96-1.96, and −1.753>−1.96-1.753 > -1.96, so H0H_0 would not be rejected: the conclusion would be different.

(d) Yes. The distribution of assembly times is not known (times are often skewed), so the Central Limit Theorem is needed to say that the sample mean is approximately normal. This is valid because n=50n = 50 is large. The theorem also justifies using s2s^2 in place of the unknown σ2\sigma^2, since the sample is large.

Common mistakes
  • Using σ\sigma instead of σn\dfrac{\sigma}{\sqrt{n}} in zz. The test is about the sample mean; standardise with its standard deviation.
  • Hypotheses about xˉ\bar{x}. "H0:xˉ=30H_0: \bar{x} = 30" is wrong. The hypotheses are about the population mean μ\mu.
  • Wrong critical value. 1.6451.645 for one-tailed 5%5\%, 1.961.96 for two-tailed 5%5\%. Check the number of tails before looking up the value.
  • Sign errors in a lower-tail test. For H1:μ<μ0H_1: \mu < \mu_0 the critical value is negative, and you reject if zz is more negative than it: −2.582<−2.326-2.582 < -2.326.
  • Dividing by nn in s2s^2. Use the unbiased estimate.
  • Adding a continuity correction. There is none in a test for a mean.
  • Quoting the Central Limit Theorem for a normal population. If XX is normal, Xˉ\bar{X} is exactly normal; the theorem is not needed.
Exam tip
  • Typical mark allocation: hypotheses (1), correct distribution or standard deviation σn\dfrac{\sigma}{\sqrt{n}} (1), correct zz (1), comparison with the correct critical value (1), conclusion in context (1). With unbiased estimates first, add one or two marks.
  • Write the comparison explicitly: "2.385>1.962.385 > 1.96". If you use probabilities instead, compare like with like: "0.0398<0.050.0398 < 0.05".
  • Keep zz to 3 or more significant figures. When zz is close to the critical value, a rounding slip can flip the conclusion.
  • "State an assumption" questions: the standard deviation is unchanged by the new process; the sample is random; or the population is normal. Choose the one relevant to the question.
  • "Is the Central Limit Theorem needed?" Yes if the population is not known to be normal (it is then needed because the sample is large enough); no if the population is normal.
  • Conclusions use "evidence" language and refer to the context: "the mean lifetime of the batteries", not just "μ\mu".
Summary
  • Under H0:μ=μ0H_0: \mu = \mu_0, Xˉ∼N(μ0,σ2n)\bar{X} \sim N\left(\mu_0, \dfrac{\sigma^2}{n}\right): exactly for a normal population, approximately for a large sample (Central Limit Theorem).
  • Test statistic z=xˉ−μ0σ/nz = \dfrac{\bar{x} - \mu_0}{\sigma/\sqrt{n}}; use ss for σ\sigma when unknown and nn is large.
  • Critical values: 1.6451.645 (one-tailed 5%5\%), 1.961.96 (two-tailed 5%5\%), 2.3262.326 (one-tailed 1%1\%), 2.5762.576 (two-tailed 1%1\%).
  • Critical region for xˉ\bar{x}: μ0±zσn\mu_0 \pm z\dfrac{\sigma}{\sqrt{n}} in the appropriate direction.
  • No continuity correction.
  • A two-tailed test at 5%5\% rejects H0H_0 exactly when μ0\mu_0 lies outside the 95%95\% confidence interval.
  • Conclude in context, without certainty.

Practice questions

Question
  1. The masses of bags of rice are normally distributed with standard deviation 66 g. A random sample of 1616 bags has mean mass 47.547.5 g. Test at the 1%1\% significance level whether the population mean is less than 5050 g.
  2. Scores on an aptitude test are normally distributed with mean 8080 and standard deviation 44. A random sample of 2525 candidates from a new school has mean score 81.781.7. Test at the 5%5\% significance level whether the mean score of candidates from this school differs from 8080.
  3. For a random sample of 100100 values of a variable XX, ∑x=5230\sum x = 5230 and ∑x2=274 900\sum x^2 = 274\,900. Test at the 5%5\% significance level whether the population mean is greater than 5252.
  4. X∼N(μ,52)X \sim N(\mu, 5^2). A test of H0:μ=50H_0: \mu = 50 against H1:μ≠50H_1: \mu \ne 50 at the 5%5\% significance level uses the mean of a random sample of 2525 observations. Find the critical region for xˉ\bar{x}.
  5. A population has standard deviation 1212. A test of H0:μ=100H_0: \mu = 100 against H1:μ>100H_1: \mu > 100 is carried out at the 5%5\% significance level, and the sample mean is 103103. Find the smallest sample size for which H0H_0 would be rejected.
  6. State, with a reason, whether the Central Limit Theorem is needed in (a) question 2, (b) question 3.
  7. In the desk-assembly example above, explain what is meant by "the 5%5\% significance level" in the context of that test.
  8. A test of H0:μ=20H_0: \mu = 20 against H1:μ>20H_1: \mu > 20 is carried out at the 5%5\% significance level, using the mean of a random sample of 3636 observations from a normal population with standard deviation 33. (a) Find the set of values of xˉ\bar{x} for which H0H_0 is rejected. (b) Two independent samples of 3636 are taken and the test is carried out on each. Given that the population mean really is 2020, find the probability that H0H_0 is rejected in exactly one of the two tests.
Answers
  1. H0:μ=50H_0: \mu = 50, H1:μ<50H_1: \mu < 50. Under H0H_0, Xˉ∼N(50,3616)\bar{X} \sim N\left(50, \tfrac{36}{16}\right), standard deviation 1.51.5. z=47.5−501.5=−1.667z = \dfrac{47.5 - 50}{1.5} = -1.667. Critical value −2.326-2.326; −1.667>−2.326-1.667 > -2.326. Do not reject H0H_0: there is insufficient evidence at the 1%1\% level that the mean mass is less than 5050 g.

  2. H0:μ=80H_0: \mu = 80, H1:μ≠80H_1: \mu \ne 80. Under H0H_0, Xˉ∼N(80,1625)\bar{X} \sim N\left(80, \tfrac{16}{25}\right), standard deviation 0.80.8. z=81.7−800.8=2.125>1.96z = \dfrac{81.7 - 80}{0.8} = 2.125 > 1.96. Reject H0H_0: there is evidence at the 5%5\% level that the mean score for this school differs from 8080.

  3. xˉ=52.3\bar{x} = 52.3, s2=199(274 900−273 529)=13.848s^2 = \tfrac{1}{99}(274\,900 - 273\,529) = 13.848, s=3.7214s = 3.7214. H0:μ=52H_0: \mu = 52, H1:μ>52H_1: \mu > 52. By the Central Limit Theorem, Xˉ∼N(52,13.848100)\bar{X} \sim N\left(52, \tfrac{13.848}{100}\right) approximately. z=52.3−520.37214=0.806<1.645z = \dfrac{52.3 - 52}{0.37214} = 0.806 < 1.645. Do not reject H0H_0: insufficient evidence at the 5%5\% level that the population mean is greater than 5252.

  4. Under H0H_0, Xˉ∼N(50,1)\bar{X} \sim N(50, 1). Reject if xˉ<50−1.96=48.04\bar{x} < 50 - 1.96 = 48.04 or xˉ>50+1.96=51.96\bar{x} > 50 + 1.96 = 51.96.

  5. Need 103−10012/n>1.645\dfrac{103 - 100}{12/\sqrt{n}} > 1.645, so n>1.645×123=6.58\sqrt{n} > \dfrac{1.645 \times 12}{3} = 6.58, n>43.3n > 43.3. The smallest sample size is 4444. (For this to be valid, either the population is normal or 4444 counts as large enough for the Central Limit Theorem.)

  6. (a) No: the scores are normally distributed, so Xˉ\bar{X} is exactly normal for any sample size. (b) Yes: the distribution of XX is not known, so the theorem is needed to treat Xˉ\bar{X} as approximately normal; this is valid because n=100n = 100 is large.

  7. If the new instructions really made no difference (mean 3030 minutes), there would be a probability of 0.050.05 of concluding that they had reduced the mean assembly time.

  8. (a) Under H0H_0, Xˉ∼N(20,936)\bar{X} \sim N\left(20, \tfrac{9}{36}\right), standard deviation 0.50.5. Reject if xˉ>20+1.645×0.5=20.82\bar{x} > 20 + 1.645 \times 0.5 = 20.82 (to 4 s.f.; more precisely 20.822520.8225). (b) Each test rejects a true H0H_0 with probability 0.050.05, independently. P(exactly one)=2×0.05×0.95=0.095P(\text{exactly one}) = 2 \times 0.05 \times 0.95 = 0.095.

How well do you know this?

Builds on

Where this leads

Console

Search notes, courses and tools, or run an action