14.3 Normal tests for a mean — Learn
Prerequisites: the Normal distribution and standardising from earlier in this book, and the language of hypothesis testing from Section 14.1.
By the end of this section you can: carry out a hypothesis test for the mean of a Normal distribution when the variance is known, given or assumed; interpret the result in context; and explain how the significance level controls the risk of a wrong decision.
1. Testing a mean instead of a proportion
The voucher test counted how many packets contained a voucher. A different kind of claim is about an average. A machine is set to fill each packet with 500 g of cereal. A sample of packets is weighed, and the sample mean is compared with 500.
The test statistic is now the sample mean . The claim gives a value for the population mean, written . The hypotheses are
The alternative decides the tail, exactly as it did for a proportion.
2. The standard error
A sample mean varies from sample to sample. If the population has mean and standard deviation , and the sample has size , then the sample mean has mean and standard deviation
This quantity is called the standard error of the mean. It measures how far a sample mean is likely to lie from the population mean.
A larger sample gives a smaller standard error, so a large sample mean is more reliable than a small one.
To test the claim, standardise the sample mean:
Under , this value is a standard Normal variable:
The p-value is the area in the tail beyond , read from the Normal distribution.
3. The variance must be known
The test needs the population standard deviation . It must be known from long records, given in the question, or assumed. This chapter never uses the sample standard deviation in place of . If is unknown, the test in this book is not the right one.
The test also assumes that the sample mean is Normal. That holds if the population is Normal. It also holds approximately if the sample is large, from the result that a large sample mean is close to Normal whatever the population shape.
4. The five steps for a mean
- Write , and the significance level .
- Find the standard error .
- Calculate the test statistic .
- Find the p-value from the standard Normal distribution, or compare with the critical value.
- Compare with , decide, and write the conclusion in context.
The critical values for a standard Normal test are worth remembering:
| Test | 5% level | 1% level |
|---|---|---|
| One-tailed | ||
| Two-tailed |
For a lower-tail test, reject when is below the negative of the value in the table.
5. Worked examples
Example 1 — a lower-tail test. A machine fills packets with a mean of 500 g. From long records the standard deviation is known to be 4 g. A sample of 16 packets has a mean mass of 497 g. Test at the 5% level whether the machine is underfilling the packets.
The concern is underfilling, so the test is one-tailed:
The standard error is
The test statistic is
The lower-tail probability is
Since , the test rejects . There is sufficient evidence at the 5% level that the mean mass is below 500 g. The same result rejects at the 1% level, because .
Example 2 — the same data, two tails. Test the same machine at the 5% level for any change in the mean, in either direction.
Now the hypotheses are
The value of is still . The two-tailed p-value doubles the smaller tail:
Since , the test again rejects . The conclusion is now about a change in either direction, not only a fall.
Example 3 — a retained test. A second machine is set to a mean of 100 ml. The standard deviation is known to be 15 ml. A sample of 25 bottles has a mean of 104 ml. Test at the 5% level whether the mean has changed.
A change in either direction matters, so the test is two-tailed:
The standard error is
The test statistic is
The upper-tail probability is , so the two-tailed p-value is
Since , the test retains . There is not sufficient evidence at the 5% level that the mean has changed.
Example 4 — the effect of the sample size. Suppose the bottle factory in Example 3 takes a sample of 100 bottles instead of 25, and the mean is again 104 ml.
The standard error is now
The test statistic is
The two-tailed p-value is
Now , so the test rejects . The same sample mean gives a different decision, because a larger sample makes the same gap more convincing.
6. The significance level as the probability of a wrong rejection
The significance level is the probability of rejecting when is true. For a Normal test the critical value is chosen so that the tail area matches the level exactly.
At the 5% level, a two-tailed test rejects when or . If is true, the probability of a value beyond either boundary is . So a true claim is wrongly rejected in 5% of samples.
A smaller level lowers that risk. At the 1% level the boundaries move out to , so a sample mean must be more extreme before the test rejects. The cost is a greater chance of missing a real change.
7. Try it: how far is far enough?
Predict first. The figure draws the sampling distribution of the sample mean and shades the critical region for a 5% test. Before you move a control, predict what happens to the shaded area when the sample size rises from 16 to 64. Write down whether the shaded region grows, shrinks or stays the same, and why.
Test. Set the sample mean to 497, the standard deviation to 4 and the sample size to 16. Read the test statistic and the p-value. Now raise the sample size to 64 and watch both values. Then change the tail to "two tails" and compare the p-value.
Explain. Write two sentences. The first explains why a larger sample makes the same sample mean give a more extreme test statistic. The second explains why the two-tailed p-value is twice the one-tailed value.
Watch out. Four traps appear with a Normal test.
Using where the standard error belongs. The statistic divides by , not by . Forgetting the square root understates the test statistic badly.
Using the sample standard deviation. When is not known, the standard Normal test is not the right tool. This chapter only tests a mean when is known, given or assumed.
Doubling a one-tailed p-value. Only a test with uses two tails. A test with or uses one.
Concluding about individual values. The test is about the mean of the population. A rejection does not say that every packet is underweight. It says the average is not the claimed value.
Re-check: after the decision, write in words. "The mean mass" is a different claim from "a packet's mass".
Progress check
- A machine is set to fill bottles with a mean of 330 ml. The standard deviation is known to be 6 ml. A sample of 36 bottles has a mean of 328 ml. Write and for a test of underfilling.
- Find the standard error for question 1.
- Find the test statistic for question 1, and the p-value.
- Decide the test at the 5% level and write the conclusion in context.
You should now be able to
- write a null hypothesis and an alternative hypothesis for a population mean;
- find the standard error of a sample mean;
- calculate the test statistic and read a p-value from the standard Normal distribution;
- use the critical values and at the 5% level;
- state the assumption that the population standard deviation is known, given or assumed;
- explain the significance level as the probability of wrongly rejecting a true ;
- write a conclusion about the mean that names the significance level.