Mathematics and statistics are not for spectators. To truly understand what is going on, we should read through and work through several examples. If we know about the ideas behind hypothesis testing and seen an overview of the method, then the next step is to see an example . The following shows an example of the both traditional method of a hypothesis test and the p-value method.
A Statement of the Problem
Suppose that a doctor claims that 17 year olds have an average body temperature that is higher than the commonly accepted average human temperature of 98.6 degrees Fahrenheit. A simple random statistical sample of 25 people, each of age 17, is selected. The average temperature of the 17 year olds is found to be 98.9 degrees, with standard deviation of 0.6 degrees.
The Null and Alternative Hypotheses
The claim being investigated is that the average body temperature of 17 year olds is greater than 98.6 degrees This corresponds to the statement x ≥ 98.6. The negation of this is that the population average is not greater than 98.6 degrees. In other words the average temperature is less than or equal to 98.6 degrees. In symbols this is x < 98.6.
One of these statements must become the null hypothesis, and the other should be the alternative hypothesis. The null hypothesis contains equality. So for the above, the null hypothesis H0 : x = 98.6. It is common practice to only state the null hypothesis in terms of an equals sign, and not a greater than or equal to or less than or equal to.
The statement that does not contain equality is the alternative hypothesis, or H1 : x >98.6.
One or Two Tails?
The statement of our problem will determine which kind of test to use. If the alternative hypothesis contains a "not equals to" sign, then we have a two tailed test. In the other two cases, when the alternative hypothesis contains a strict inequality, we use a one tailed test. This is our situation, so we use a one tailed test.
Choice of a Significance Level
Here we choose the value of alpha, our significance level. It is typical to let alpha be 0.05 or 0.01. For this example we will use a 5% level and alpha will be equal to 0.05.
Choice of Test Statistic and Distribution
Now we need to determine which distribution to use. The sample is from a population that is normally distributed as the bell curve, so we can use the standard normal distribution. A table of z-scores will be necessary.
The test statistic is found by the formula for the mean of a sample, rather than the standard deviation we use the standard error of the mean. Here n=25, which has square root of 5, so the standard error is 0.6/5 = 0.12. Our test statistic is z = (98.9-98.6)/.12 = 2.5
Accepting and Rejecting
At a 5% significance level, the critical value for a one tailed test is found from the table of z-scores to be 1.645. This is illustrated in the diagram above. Since the test statistic does fall within the critical region, we reject the null hypothesis.
The p-Value Method
There is a slight variation if we conduct our test using p-values. Here we see that a z-score of 2.5 has a p-value of 0.0062. Since this is less than the significance level of 0.05, we reject the null hypothesis.
We conclude by stating the results of our hypothesis test. The statistical evidence shows that either a rare event has occurred, or that the average temperature of 17 year olds is in fact greater than 98.6 degrees.