Carrying Out a Test for the Difference Between Two Population Means
AP Statistics· AP Statistics CED, Effective Fall 2026: Unit 4, Topic 4.10 — Carrying Out a Test for the Difference Between Two Population Means· 12 min read
1. Step 1: State Hypotheses and Define Parameters★★☆☆☆⏱ 8 min
The first formal step of any two-sample t-test is to clearly define the population parameters you are comparing, then state your null and alternative hypotheses using correct notation. The null hypothesis for a two-sample test almost always assumes there is no difference between the two population means, so .
Two-Sample Hypothesis Notation
Null hypothesis claims no difference between the two population means; alternative hypothesis claims a non-zero difference, greater than zero, or less than zero, aligned exactly to the stated research question.
A researcher claims that 10th graders sleep more on average than 9th graders. State the correct hypotheses for this test.
- 1
First define parameters explicitly:
- 2
= true mean hours of sleep per night for all 10th graders, = true mean hours of sleep per night for all 9th graders
- 3
Null hypothesis (no difference between population means):
- 4
- 5
One-sided alternative hypothesis aligned to the researcher's claim:
- 6
2. Step 2: Verify Inference Conditions★★★☆☆⏱ 10 min
All two-sample t-tests require three mandatory conditions to be satisfied before proceeding with calculations: Random, Independent, and Normal/Large Sample. The random condition requires both samples to be randomly selected from their respective populations, or groups randomly assigned in a controlled experiment.
Independent: The groups are independent and observations within each group can be treated as independent. For random sampling without replacement, check that each sample is no more than 10% of its population. This 10% condition is not required for a randomized experiment.
Normal/Large Sample: For each sample, if n < 30, you must confirm no strong skewness or outliers in the sample distribution. If n ≥ 30, the Central Limit Theorem applies and the sampling distribution of is approximately normal.
You are comparing mean commute time for 50 urban workers and 42 suburban workers. Both samples are random. Confirm the normal condition for this test.
- 1
Sample 1 (urban workers): n1 = 50 ≥ 30, so sampling distribution for is approximately normal by CLT.
- 2
Sample 2 (suburban workers): n2 = 42 ≥ 30, so sampling distribution for is approximately normal by CLT.
- 3
The difference of two approximately normal distributions is also approximately normal, so the normal condition is fully satisfied.
3. Step 3: Calculate Test Statistic and P-Value★★★★☆⏱ 12 min
The unpooled two-sample t procedure does not require equal population variances. Use the Welch-Satterthwaite degrees of freedom supplied by technology, or the conservative df = min(n1 - 1, n2 - 1) when using a t-table. Match the p-value tail or tails to the alternative hypothesis.
Sample 1: n1=25, x̄1=18.2, s1=3.1; Sample 2: n2=30, x̄2=15.7, s2=2.8. Calculate the t-statistic for a test of H0: μ1 - μ2 = 0.
- 1
Plug values into the test statistic formula:
- 2
- 3
Simplify denominator first:
- 4
- 5
Final t-statistic:
- 6
Test your understanding of the calculation rules:
What is the correct conservative degrees of freedom for n1=25, n2=30?
24
29
53
54
Reveal answer
24 —Conservative df is min(n1-1, n2-1) = min(24, 29) = 24.
P-value interpretation (CED 4.10.B.1): assuming the null hypothesis of no difference is true, the p-value is the probability of obtaining a difference in sample means at least as extreme as the observed difference, in the direction or directions of the alternative. It is not the probability that the null hypothesis is true.
4. Step 4: Make a Contextual Conclusion★★★☆☆⏱ 7 min
A clear conclusion compares the p-value with the significance level, states whether to reject the null hypothesis, and answers the research question in context. Reject when p ≤ α; otherwise, fail to reject. Keep the scope of the conclusion consistent with the study design.
Your p-value for the earlier sleep difference test is 0.023, with α = 0.05. Write a full valid conclusion.
- 1
- Compare p-value to α: 0.023 < 0.05
- 2
- State formal decision: We reject the null hypothesis.
- 3
- Link to full context: There is convincing evidence that the true mean hours of sleep for 10th graders is greater than the true mean hours of sleep for 9th graders.
5. Common Pitfalls
Wrong move:
Using a pooled two-sample t-test by default
Why:
A pooled t-test introduces an equal-population-variance assumption that the unpooled procedure does not need.
Correct move:
Use the unpooled two-sample t procedure taught here; do not introduce an unsupported equal-variance assumption.
Wrong move:
Combining n1 and n2 to check the n ≥ 30 normal condition
Why:
CLT applies to each individual sampling distribution, not the combined sample
Correct move:
Verify the normal/large sample condition separately for each of the two groups.
Wrong move:
Writing a conclusion that refers to the sample difference instead of the population difference
Why:
Hypothesis tests make claims about population parameters, not observed sample results
Correct move:
Explicitly reference 'true population mean' in every part of your conclusion.
Wrong move:
Using a paired t-test for two independent samples
Why:
Paired tests are for matched observations, not separate independent groups
Correct move:
Confirm the two samples are independent before selecting a two-sample t-test.
Wrong move:
Stating that you 'accept the null hypothesis' when the p-value is large
Why:
We never have evidence to prove the null is 100% true, only that we cannot reject it
Correct move:
Use the exact phrasing 'fail to reject the null hypothesis' for non-significant results.
6. Quick Reference Cheatsheet
Component | Formula / Requirement |
|---|---|
Hypotheses | , |
Conditions | Random sampling or assignment; independent groups/observations (10% check only for sampling without replacement); each group n≥30 or no strong skewness/outliers |
t-statistic | |
Conservative df | |
Conclusion Structure | p ≤ α → Reject H0; p > α → Fail to reject H0; state a contextual conclusion |
What's Next
Use the same hypothesis-test reasoning when comparing two population proportions, while choosing the method and conditions appropriate to the data. Continue practicing how study design determines whether a conclusion can be generalized to a population or support a causal claim.
