In short
The two-sample t statistic is . Find the p-value from a t-distribution with the calculator's df (2-SampTTest, unpooled) or the conservative smaller n − 1. Compare with α and conclude in context, with a scope statement based on random assignment or random sampling.
What you need to know
- Calculate the two-sample t statistic.
- Find the p-value using an appropriate df.
- Carry out a complete two-sample t-test in four steps.
- State the scope of the conclusion from the study design.
Worked example: an experiment
Teaching experiment (topics 4.7–4.9): random assignment of volunteers; Method A n = 25, x̄ = 78.4, s = 8.2; Method B n = 22, x̄ = 72.9, s = 9.6; both dotplots without strong skew or outliers. Do the methods give different mean scores? α = 0.05.
State. H₀: μ_A − μ_B = 0; Hₐ: μ_A − μ_B ≠ 0, where μ_A and μ_B are the true mean scores for students like these taught by each method.
Plan. Two-sample t-test for μ_A − μ_B. Random assignment; both groups small but with no strong skew or outliers.
Conclude. Because 0.042 < 0.05, we reject H₀. There is convincing evidence that the two methods produce different mean test scores for students like these; the data suggest Method A gives higher scores. Because of random assignment, the method is the likely cause of the difference.
At α = 0.01 the same result would not be significant, which matches the 99% interval in topic 4.8 containing 0. With the conservative df = 21, the p-value is a little larger, about 0.048, and the decision at α = 0.05 is the same.
Worked example: two random samples
Independent random samples of commuters: City A (n = 40) x̄ = 34.2, s = 9.1; City B (n = 35) x̄ = 29.5, s = 7.4. Is there a difference in mean commute times? H₀: μ_A − μ_B = 0, Hₐ: μ_A − μ_B ≠ 0, α = 0.05.
Conditions: independent random samples; each sample is less than 10% of its city's commuters; both n ≥ 30. The test gives t = 4.7/1.91 ≈ 2.47 with df ≈ 72.6 and a two-sided p-value of about 0.016. Because 0.016 < 0.05, reject H₀: there is convincing evidence that the mean commute time differs between all commuters in the two cities. With random samples but no random assignment, we cannot say what causes the difference (city size, transport, jobs, and so on).
A quick self-check
- Is the design two separate groups? (If paired, use topic 4.5.)
- Are both parameters defined, with the order of subtraction?
- Did you check normality for each group?
- Did you report t, df and the p-value?
- Does the conclusion mention α, Hₐ and context, plus scope?
Key terms
- Two-sample t statistic
- (x̄₁ − x̄₂)/√(s₁²/n₁ + s₂²/n₂) when H₀: μ₁ − μ₂ = 0.
- 2-SampTTest
- Calculator routine giving t, df and the p-value for a two-sample t-test.
- Scope of inference
- Whether a conclusion generalises (random sampling) and supports causation (random assignment).
- Statistically significant
- A p-value below α, meaning chance alone is an unlikely explanation for the observed difference.
Common mistakes
Using pooled standard deviation.
Use the unpooled standard error √(s₁²/n₁ + s₂²/n₂).
Reporting only 'reject H₀'.
Finish with a sentence about the two population means in context.
Claiming causation from observational samples.
Only random assignment justifies cause and effect.
How this topic is tested
- Write t, df and the p-value together.
- Include the scope sentence when the question describes the design.
- If you use conservative df, say so.
Practice questions
Original AP-style multiple-choice questions. Pick an answer to see the explanation.
Question 1 · SP 3 · Analyze Data
x̄₁ − x̄₂ = 6 and the standard error is 2.5. The two-sample t statistic is:
Question 2 · SP 3 · Analyze Data
A two-sided two-sample t-test gives t = −2.40 with df = 20. The p-value is about:
Question 3 · SP 4 · Interpret Results
A two-sample t-test from random samples of two schools gives p = 0.21. The best conclusion is:
Question 4 · SP 4 · Interpret Results
In an experiment with random assignment, a two-sample t-test gives p = 0.003. What can be concluded?
Question 5 · SP 3 · Analyze Data
Which input setting should be used on 2-SampTTest for AP Statistics?
Free-response practice
Write your answer first, then mark it against the scoring guide.
Inference (full test) · 5 points
Customers were randomly assigned to a new (n = 30) or old (n = 30) website layout. Mean purchase times: new 6.8 min (s = 2.1); old 8.1 min (s = 2.6). Do the data give convincing evidence that the new layout reduces mean purchase time? α = 0.05.
- (a) State hypotheses and check conditions.
- (b) Calculate t and the p-value.
- (c) Conclude in context, including scope.
Scoring guide: one point for each of the following
Part (a)
- H₀: μ_new − μ_old = 0; Hₐ: μ_new − μ_old < 0, true mean purchase times for customers like these.
- Random assignment; both groups have n = 30.
Part (b)
- t = (6.8 − 8.1)/√(2.1²/30 + 2.6²/30) ≈ −2.13, df ≈ 55.5.
- p-value ≈ 0.019.
Part (c)
- Because 0.019 < 0.05, reject H₀: convincing evidence the new layout causes a lower mean purchase time for customers like these.
Connected topics
Frequently asked questions
What df do I report?
The calculator's (possibly a decimal) or the conservative smaller n − 1; both are accepted.
Do I need to check equal variances?
No. The unpooled test doesn't assume them.
How is this different from the paired test?
Here the groups are independent; a paired test analyses differences within linked pairs.