After you collect data and obtain the test statistic (the sample mean, sample proportion, or other test statistic), you can determine the probability of obtaining that test statistic when the null hypothesis is true. This probability is called the *p*-value.

### Example 9.9

Suppose a baker claims that his bread height is more than 15 cm, on average. Several of his customers do not believe him. To persuade his customers that he is right, the baker decides to do a hypothesis test. He bakes 10 loaves of bread. The mean height of the sample loaves is 17 cm. The baker knows from baking hundreds of loaves of bread that the standard deviation for the height is 0.5 cm and the distribution of heights is normal.

The null hypothesis could be *H*_{0}: *μ* ≤ 15. The alternate hypothesis is *H*_{a}: *μ* > 15.

The words *is more than* translates as a ">" so "*μ* > 15" goes into the alternate hypothesis. The null hypothesis must contradict the alternate hypothesis.

Since *σ is known* (*σ* = 0.5 cm), the distribution for the population is known to be normal with mean *μ* = 15 and standard deviation $\frac{\sigma}{\sqrt{n}}=\frac{0.5}{\sqrt{10}}=0.16$.

Suppose the null hypothesis is true (which is that the mean height of the loaves is no more than 15 cm). Then is the mean height (17 cm) calculated from the sample unexpectedly large? The hypothesis test works by asking the question how *unlikely* the sample mean would be if the null hypothesis were true. The graph shows how far out the sample mean is on the normal curve. The *p*-value is the probability that, if we were to take other samples, any other sample mean would fall at least as far out as 17 cm.

*The **p*-value, then, is the probability that a sample mean is the same or greater than 17 cm when the population mean is, in fact, 15 cm. We can calculate this probability using the normal distribution for means. In Figure 9.2 below, the *p*-value is the area under the normal curve to the right of 17. Using a normal distribution table or a calculator, we can compute that this probability is practically zero.

*p*-value = *P*($\overline{x}$ > 17), which is approximately zero.

Because the *p*-value is almost 0, we conclude that obtaining a sample height of 17 cm or higher from 10 loaves of bread is very unlikely if the true mean height is 15 cm. We reject the null hypothesis and conclude that there is sufficient evidence to claim that the true population mean height of the baker’s loaves of bread is higher than 15 cm.