In short
The test statistic is with df = n − 1 (for paired data use x̄_d, s_d and μ₀ = 0). The p-value is the area beyond t in the direction of Hₐ under the t-distribution. Compare with α and conclude in context, using State, Plan, Do, Conclude.
What you need to know
- Calculate the t test statistic for a one-sample or paired t-test.
- Find the p-value from a t-distribution with n − 1 df.
- Carry out a complete t-test and conclude in context.
- Connect a two-sided t-test with a confidence interval.
One-sample t-test: worked example
Last year, students at a school averaged 3.8 hours of screen time a day. This year a random sample of 20 students has x̄ = 4.2 hours and s = 1.3 hours, with a roughly symmetric dotplot. Is there convincing evidence that the mean screen time has increased? Use α = 0.05.
State. H₀: μ = 3.8; Hₐ: μ > 3.8, where μ is the mean daily screen time of all students at the school this year. α = 0.05.
Plan. One-sample t-test for μ. Random sample; 20 is less than 10% of the students; n < 30 but the dotplot shows no strong skew or outliers.
Conclude. Because 0.092 > 0.05, we fail to reject H₀. There is not convincing evidence that the mean daily screen time of all students at the school has increased above 3.8 hours.
The sample mean was higher than 3.8, but with only 20 students and a standard deviation of 1.3 hours, a difference of 0.4 hours could easily happen by chance. A larger sample would give the test more power to detect an increase of this size if it is real.
Paired t-test: worked example
The reading programme: 12 randomly selected students, differences d = after − before with x̄_d = 3.5 and s_d = 4.1 points; the dotplot of differences shows no strong skew or outliers. Test H₀: μ_d = 0 against Hₐ: μ_d > 0 at α = 0.05.
Because 0.0065 < 0.05, we reject H₀. There is convincing evidence that the mean vocabulary score increases (after − before) for students like these. As in topic 4.3, without a comparison group we cannot say the programme itself caused the gain.
Tests and intervals agree
A two-sided t-test at α = 0.05 rejects H₀: μ = μ₀ exactly when μ₀ is outside the 95% t-interval. The screen-time interval (3.59, 4.81) contains 3.8, matching the non-significant two-sided p-value of about 0.18. The reading interval (0.89, 6.11) excludes 0, matching the significant result.
Use a test when the question asks for evidence against a specific value; use an interval when it asks for an estimate. Often the best answer gives both.
Key terms
- t statistic
- (x̄ − μ₀)/(s/√n), the number of standard errors x̄ lies from μ₀.
- p-value (t-test)
- Area beyond t in the direction of Hₐ under the t-distribution with n − 1 df.
- T-Test
- Calculator routine for one-sample and paired t-tests.
- Power
- The probability of detecting a real difference; larger n increases it.
Common mistakes
Using the normal distribution for the p-value.
Use the t-distribution with n − 1 df.
Concluding the mean 'has not increased'.
Say there is not convincing evidence it has increased.
For paired data, dividing by the before or after standard deviation.
Use s_d, the standard deviation of the differences.
How this topic is tested
- Write t, df and the p-value together.
- Link the decision to α in a 'because' sentence.
- End with a conclusion about the parameter in context.
Practice questions
Original AP-style multiple-choice questions. Pick an answer to see the explanation.
Question 1 · SP 3 · Analyze Data
x̄ = 103, s = 12, n = 36, μ₀ = 100. The t statistic is:
Question 2 · SP 3 · Analyze Data
A one-sided t-test (Hₐ: μ > μ₀) gives t = 2.10 with df = 24. The p-value is closest to:
Question 3 · SP 4 · Interpret Results
A paired t-test of μ_d = 0 gives p-value 0.31. Which conclusion is correct?
Question 4 · SP 4 · Interpret Results
A 95% t-interval for μ is (48.2, 53.6). A two-sided test of H₀: μ = 55 at α = 0.05 would:
Question 5 · SP 4 · Interpret Results
Why can a sample mean above μ₀ still give a non-significant result?
Free-response practice
Write your answer first, then mark it against the scoring guide.
Inference (full test) · 5 points
A snack maker states that packets contain 300 mg of sodium on average. A random sample of 25 packets has mean 312 mg and standard deviation 18 mg; a boxplot shows no outliers. Is there convincing evidence the mean is greater than 300 mg? Use α = 0.05.
- (a) State hypotheses and check conditions.
- (b) Calculate t and the p-value.
- (c) Conclude in context.
Scoring guide: one point for each of the following
Part (a)
- H₀: μ = 300; Hₐ: μ > 300, μ = mean sodium content of all packets.
- Random sample; 25 < 10% of all packets; boxplot shows no outliers or strong skew.
Part (b)
- t = (312 − 300)/(18/√25) ≈ 3.33, df = 24.
- p-value ≈ 0.0014.
Part (c)
- Because 0.0014 < 0.05, reject H₀: convincing evidence the mean sodium content of all packets is greater than 300 mg.
Connected topics
Frequently asked questions
What if df isn't in the t-table?
Use the calculator, or the next smaller df in the table, which is conservative.
Do I have to show the formula?
It's the safest way to earn credit if the calculator entry is wrong; show it with numbers substituted.
Can a t-test be two-sided?
Yes. Double the one-tail area beyond |t|.