AP Statistics · Unit 4 · Inference for Quantitative Data: Means
4.5 Carrying out a test for a mean or mean difference
Calculate a t statistic and p-value for a one-sample or paired mean test, decide using the significance level, and state the conclusion in context.
1/5A t statistic counts standard errors from the claimed mean
- A t statistic counts standard errors from the claimed mean
- A t test is trustworthy only when three conditions hold
- The p-value comes from a t distribution
- Comparing the p-value with the significance level decides the test
- A conclusion must name the parameter and the context
- Check your recall
- Practice: 10 questions
Part 1 of 5: A t statistic counts standard errors from the claimed mean
Suppose a bakery claims its loaves average 500 grams. A random sample of loaves averages 497 grams. That gap matters only when compared with how much sample means normally vary.
The test statistic converts the gap into a standard score. For a mean, it is . Here is the sample mean and is the mean claimed by the null hypothesis. The symbol is the sample standard deviation, and is the sample size.
The denominator is the standard error of the sample mean. It estimates how far sample means typically fall from the population mean. A value of places the sample mean 2 standard errors above .
Key terms · tap one for its definition
test statistic
A test statistic is a number computed from sample data that measures how far the sample result falls from the null hypothesis value.
standard error
The standard error of a sample mean is , the estimated standard deviation of the sampling distribution of .
Part 2 of 5: A t test is trustworthy only when three conditions hold
The formula always produces a number, but that number is meaningful only when the data meet certain conditions. Check them before calculating anything.
- Random: the data come from a random sample or a randomized experiment.
- Independent: when sampling without replacement, the sample is less than 10% of the population.
- Normal: the population is approximately normal, , or the sample has no strong skewness or outliers.
Sometimes each subject gives two measurements, such as a before score and an after score. These are paired data. Find each difference first, then treat the differences as one sample. The null value is usually .
Key term
paired data
Paired data are two measurements taken on the same individual or on naturally matched individuals, analyzed through the differences between them.

Quick check
One question on the part you just read
Easy
Show answer and explanation
Answer: A · Worked explanation
Part 3 of 5: The p-value comes from a t distribution
With the conditions checked, the next step is to judge how unusual the t statistic is. Assuming the null hypothesis is true, it follows a t distribution. Its degrees of freedom are .
A t distribution is centered at 0 and looks like a normal curve with heavier tails. The heavier tails allow for the extra uncertainty from estimating with .
The p-value measures how surprising the data are. It is the probability, if the null hypothesis is true, of a t statistic at least as extreme as ours. For a two-sided alternative, double the area in one tail. A calculator function such as tcdf gives that area.
Worked example
Finding a t statistic and p-value
- Standard error: .
- Test statistic: .
- Degrees of freedom: .
- Area above is about 0.0285. Double it for a two-sided test: .
Answer: with , and the p-value is about 0.057.
Key terms · tap one for its definition
degrees of freedom
The degrees of freedom of a one-sample t statistic are , which determine the exact shape of its t distribution.
p-value
The p-value is the probability, assuming the null hypothesis is true, of getting a test statistic at least as extreme as the one observed.
Part 4 of 5: Comparing the p-value with the significance level decides the test
A p-value of 0.057 is fairly small. Whether it counts as convincing depends on a cutoff chosen before the data are collected.
That cutoff is the significance level, written . Common choices are 0.10, 0.05 and 0.01. The decision rule has two outcomes.
- If , reject . The data give convincing evidence for the alternative hypothesis.
- If , fail to reject . The data do not give convincing evidence for the alternative hypothesis.
In the battery example, , so the decision is to fail to reject . With , the decision would reverse.
Key term
significance level
The significance level is the probability cutoff, chosen before collecting data, at or below which a p-value leads to rejecting .

Quick check
One question on the part you just read
Easy
Show answer and explanation
Answer: A · Worked explanation
Part 5 of 5: A conclusion must name the parameter and the context
A decision on its own is not a finished answer. The last step puts the decision into words about the real situation.
Start with the p-value. Assuming is true, a p-value of 0.057 means about a 5.7% chance of a result this extreme. Here that is a sample mean at least 2.4 hours from 50, in either direction. This is a probability about the data, not about the hypothesis.
- Compare the p-value with .
- State the decision about .
- Describe what that means for the parameter, in context.
For the batteries: because , we fail to reject . We do not have convincing evidence that the true mean battery life differs from 50 hours.
Check your recall[12 marks]
5 written questions. Answer each one in your head or on paper, then open the mark scheme.
- 1.Calculate[3 marks]
Calculate the t statistic and the degrees of freedom for a random sample with , and , testing .
Show mark schemeHide mark scheme
Model answer
Standard error is . So , with .
- 1 mark for calculating the standard error as 1.0
- 1 mark for obtaining with the correct sign
- 1 mark for stating
- 2.Describe[3 marks]
Describe the three conditions to check before carrying out a one-sample t test.
Show mark schemeHide mark scheme
Model answer
The data must come from a random sample or randomized experiment. When sampling without replacement, the sample must be less than 10% of the population. The population should be approximately normal, or the sample size at least 30, or the sample should show no strong skewness or outliers.
- 1 mark for stating the random condition
- 1 mark for stating the 10% independence condition
- 1 mark for stating the normality condition with its alternatives
- 3.Determine[2 marks]
A test gives a p-value of 0.032. Determine the decision about at and at .
Show mark schemeHide mark scheme
Model answer
At , , so reject . At , , so fail to reject .
- 1 mark for rejecting at
- 1 mark for failing to reject at
- 4.Interpret[2 marks]
Interpret a p-value of 0.032 in a test of minutes for a mean commute time.
Show mark schemeHide mark scheme
Model answer
If the true mean commute time is 30 minutes, there is about a 3.2% chance of getting a sample mean at least as far from 30 minutes as the one observed.
- 1 mark for assuming the true mean is 30 minutes
- 1 mark for giving about a 3.2% chance of a sample result at least as extreme
- 5.Justify[2 marks]
Justify why failing to reject is not the same as showing that is true.
Show mark schemeHide mark scheme
Model answer
Failing to reject means the p-value was above the significance level, so the evidence against the claim was not strong enough. Other values of the mean could also be consistent with the data.
- 1 mark for stating that the evidence was not strong enough, not that the claim was shown
- 1 mark for noting that other parameter values could also fit the data

Practice this topic
10 quick-fire multiple-choice questions, easy to hard. Tap an answer to see if you're right and the worked explanation. (The written questions with mark schemes are under “Check your recall” above.)
0 right0 of 10 answered
Includes the 2 quick checks in the note above.
EasyDetermine[1 mark]
Show answer and explanation
Answer: A · Worked explanation
MediumCalculate[2 marks]
Show answer and explanation
Answer: A · Worked explanation
MediumIdentify[1 mark]
Show answer and explanation
Answer: A · Worked explanation
MediumDetermine[1 mark]
Show answer and explanation
Answer: A · Worked explanation
MediumInterpret[1 mark]
Show answer and explanation
Answer: A · Worked explanation
HardDetermine[2 marks]
Show answer and explanation
Answer: A · Worked explanation
HardCalculate[2 marks]
Show answer and explanation
Answer: A · Worked explanation
HardIdentify[2 marks]
Show answer and explanation
Answer: A · Worked explanation