With the hypotheses written and the conditions checked, the rest of a t test is three steps: compute a test statistic, find its p-value, and write the conclusion. Each step has a standard form that earns the points, and a classic slip that loses them.
The t statistic
Assume the null hypothesis is true: the population mean is . Then sample means vary around , with a standard error of . The question is how far the observed is from , measured in standard errors. That is the t statistic:
It has the same shape as every standardized test statistic: (statistic minus null value) divided by the standard error. Because estimates , the p-value comes from the t distribution, not the standard normal.
A complete test
Worked example 1. A company advertises a mean delivery time of 30 minutes. A random sample of 45 of last month's thousands of deliveries has minutes and minutes (invented data). Is there convincing evidence at that the true mean is longer than 30 minutes?
State. , , where is the true mean delivery time of all the company's deliveries in the city.
Plan. One-sample t test for a mean. Random: a random sample of 45 deliveries. 10%: 45 is less than 10% of last month's deliveries. Normal/large sample: .
Do.
Conclude. Because the p-value of 0.0112 is less than 0.05, we reject the null hypothesis. There is convincing evidence that the true mean delivery time of all the company's deliveries in the city is greater than 30 minutes.
Technology does the "Do" step in one command, a one-sample t test from the summary statistics, and reports , , . On the exam, still write the formula with the numbers substituted; the calculator output alone is not work.
With Table B, find the df row (44 is not listed, so use the next smaller row, 40) and locate 2.37 between two critical values: 2.123 (one-tail probability 0.02) and 2.423 (0.01). So , which is enough to decide at .
Which tail?
| Alternative | p-value |
|---|---|
| area to the right of | |
| area to the left of | |
| twice the area beyond |
Worked example 2 (two-sided). A random sample of 20 students at a large university slept a mean of 7.55 hours with hours. Test against at , where is the true mean nightly sleep of students at the university. (Assume the conditions are met.)
Because the p-value of 0.080 is greater than 0.05, we fail to reject the null hypothesis. There is not convincing evidence that the true mean nightly sleep of students at the university is different from 8 hours.
Notice what the second conclusion does not say. It does not say the mean is 8 hours, and it does not say "accept ". The sample mean was 7.55; the data simply could not rule out 8.
Paired data: the same test on the differences
Worked example 3. For 12 randomly chosen gym members who took a breathing class, the differences in resting heart rate (before minus after) have and beats per minute, with no strong skew or outliers. Test against at .
Because the p-value of 0.0004 is less than 0.05, we reject the null hypothesis. There is convincing evidence that the true mean drop in resting heart rate (before minus after) for gym members who take the class is greater than 0.
Can the gym say the class caused the drop? No. The members were sampled at random, so the result generalizes to members who take the class, but there was no random assignment and no comparison group. Something else in those four weeks could explain it.
Interpreting the p-value
The p-value is a probability computed assuming the null hypothesis is true. For the delivery test: Assuming the true mean delivery time of all the company's deliveries is 30 minutes, there is a 0.0112 probability of getting a sample mean of 32.4 minutes or more by chance in a random sample of 45 deliveries.
It is not the probability that is true, and it is not the probability that the result is due to chance. Small p-values say the data would be surprising if were true, and that is the evidence for .