Mathematics/Lessons/The Normal Distribution/Hypothesis Testing with the Normal Distribution
Statistics · The Normal Distribution · Year 2

Hypothesis Testing with the Normal Distribution

Using the distribution of a sample mean to test a claim about an unknown population mean.

9 min read 2 worked examples

Testing a claim about the mean

You can test hypotheses about the mean of a normally distributed random variable by looking at the mean of a sample taken from the whole population.

Key fact

For a random sample of size $n$ taken from a random variable $X\sim \mathrm{N}(\mu,\sigma^2)$, the sample mean, $\overline{X}$, is normally distributed with $\overline{X}\sim \mathrm{N}\left(\mu,\dfrac{\sigma^2}{n}\right)$.

Hint

If you took lots of different random samples of size $n$ from the population, their means would be normally distributed — more tightly clustered around $\mu$ than individual observations, since dividing by $n$ shrinks the variance.

You can use the distribution of the sample mean to determine whether the mean from one particular sample, $\bar{x}$, is statistically significant.

Worked example 1

A one-tailed test of the mean
A chocolate manufacturer produces bars with mass $X$ grams, modelled as a normal distribution with standard deviation $4$g. The manufacturer claims that the mean mass per bar, $\mu$, is $100$g. A consumer group suspects the bars are being sold underweight and investigates. They take a random sample of 20 bars and find the mean mass per bar is $98.5$g. Using a 5% level of significance, and stating your hypotheses clearly, test whether or not there is evidence to uphold the consumer group's suspicion.
1
$\mathrm{H_0}: \mu=100$. $\mathrm{H_1}: \mu<100$.
The null hypothesis is that the population mean is equal to the claimed value. The consumer group is investigating whether the mean is less than $100$g, so this is a one-tailed test.
2
Let $X$ represent the mass of a bar, and assume $\mathrm{H_0}$, so that $X\sim \mathrm{N}(100, 4^2)$.
Write out the population distribution assuming $\mathrm{H_0}$ is true.
3
$\overline{X}\sim \mathrm{N}\left(100,\dfrac{4^2}{20}\right)$, or $\overline{X}\sim \mathrm{N}(100, 0.894^2)$.
The test statistic is the sample mean $\overline{X}$. It has the same mean as $X$, but the variance is divided by the sample size: $\sqrt{\dfrac{4^2}{20}}=0.894$.
97 98.5 99 100 101 102 103 X̄ ~ N(100, 0.894²)
$\mathrm{P}(\overline{X}<98.5) = 0.0468$.
4
$\mathrm{P}(\overline{X}<98.5) = 0.0468$.
Use your calculator to find $\mathrm{P}(\overline{X}<\bar{x})$.
5
$0.0468 < 0.05$, so there is sufficient evidence to reject $\mathrm{H_0}$ and conclude that the mean mass per bar in the whole population is less than $100$g.
Compare $\mathrm{P}(\overline{X}<98.5)$ with the significance level of the test. Since the probability is less than 5%, it's unlikely to have occurred by chance alone under $\mathrm{H_0}$, so you reject the null hypothesis. Always relate your conclusion back to the context.
▪ solved

Finding a critical region

If you need to find a critical region or critical value for a hypothesis test for the mean of a normal distribution, you can standardise your test statistic:

Key fact

For the sample mean of a normally distributed random variable, $\overline{X}\sim \mathrm{N}\left(\mu,\dfrac{\sigma^2}{n}\right)$, $Z=\dfrac{\overline{X}-\mu}{\sigma/\sqrt{n}}$ is a normally distributed random variable with $Z\sim \mathrm{N}(0,1)$.

Coding the test statistic this way lets you use the percentage points table to determine critical values and critical regions — or you could use the inverse normal distribution function on your calculator to determine them for $\overline{X}$ directly.

Worked example 2

A two-tailed critical region
A machine fills bottles with a liquid, with volume $V$ ml modelled as a normal distribution with mean $500$ml and standard deviation $8$ml. After the machine is serviced, a random sample of 40 bottles from the next production run is taken to test whether the mean volume has changed from $500$ml. The distribution of the volumes after the service is still normal with a standard deviation of $8$ml. a Find, at the 1% level, the critical region for this test, stating your hypotheses clearly. The mean volume of the sample of 40 bottles is calculated to be $503.5$ml. b Comment on this observation in light of the critical region.

a

1
$\mathrm{H_0}: \mu=500$, $\mathrm{H_1}: \mu\ne 500$.
You want to test whether the population mean differs from $500$, so this is a two-tailed test.
2
Assume $\mathrm{H_0}$, so that $V\sim \mathrm{N}(500, 8^2)$.
3
$\overline{V}\sim \mathrm{N}\left(500,\dfrac{8^2}{40}\right)$.
Write out the distribution of the sample means for a sample of size 40.
4
Let $Z=\dfrac{\overline{V}-500}{8/\sqrt{40}}$. $Z\sim \mathrm{N}(0,1)$.
Standardise $\overline{V}$ so you can use the percentage points table.
496.74 497 498 499 500 501 502 503.26 504 D̄ ~ N(500, 1.26²)
This is a two-tailed test with total significance 1%, so the probability in each tail is $0.5\%=0.005$.
5
$\mathrm{P}(Z<z)=0.005 \Rightarrow z=-2.5758$, and $\mathrm{P}(Z>z)=0.005 \Rightarrow z=2.5758$.
Use the percentage points table to find $z$-values corresponding to the critical value for each tail.
6
$-2.5758 = \dfrac{\bar v-500}{8/\sqrt{40}} \Rightarrow \bar v = 496.74$ (2 d.p.), and $2.5758 = \dfrac{\bar v-500}{8/\sqrt{40}} \Rightarrow \bar v = 503.26$ (2 d.p.).
Use the coding in reverse to find the corresponding values of $\bar v$.
7
The critical region is $\overline{V}\le 496.74$ or $\overline{V}\ge 503.26$.
▪ solved

b

1
The observed value $\overline{V}=503.5$ml falls inside the critical region (since $503.5\ge 503.26$), so there is sufficient evidence, at the 1% level, that the mean volume has changed from $500$ml.
Always relate your conclusion back to the context of the question, rather than just stating whether $\mathrm{H_0}$ is rejected.

Check yourself

A machine fills bags of sugar with mass $X$ grams, modelled as a normal distribution with standard deviation $2.5$g. The manufacturer claims the mean mass is $500$g. A sample of 25 bags is found to have a mean mass of $498.8$g. Test, at the 5% level, whether there is evidence that the mean mass is less than claimed.

1
$\mathrm{H_0}:\mu=500$, $\mathrm{H_1}:\mu<500$.
2
$\overline{X}\sim \mathrm{N}\left(500,\dfrac{2.5^2}{25}\right)$, so $\overline{X}\sim \mathrm{N}(500, 0.5^2)$.
3
$\mathrm{P}(\overline{X}<498.8) = 0.0082$. Since $0.0082<0.05$, reject $\mathrm{H_0}$: there is sufficient evidence that the mean mass is less than $500$g.