This course has been archived. The College Board updated AP Statistics for the 2026–27 school year, and the units and topics changed.
Go to the new AP® Statistics
6m left·0%
Reading Time: 6 min
Last Updated: March 23, 2026
Main Ideas: 8
Reading Time: 6 min
Last Updated: March 23, 2026
Main Ideas: 8

Topic 7.9 Notes – Carrying Out a Test for the Difference of Two Population Means

Read aloud
This topic is where you actually carry out the two-sample t-test for a difference in population means. You calculate the test statistic, find the p-value from a t-distribution, and use that to justify a claim about whether two population means differ. Everything centers on modeling the difference in sample means with a t-distribution.

The Two-Sample t-Test for μ₁ − μ₂

This test is used when you have:

  • Two independent groups
    • Independent random samples
    • or two groups from a randomized experiment
  • A quantitative response variable
  • A claim about μ₁ − μ₂ (usually whether it equals 0)

The big question is:

Is the observed difference in sample means large enough, relative to natural variability, to suggest the population means are different?

If H0H_0 is true and μ1=μ2μ_1 = μ_2, then any difference we see in xˉ1−xˉ2\bar{x}_1 - \bar{x}_2 should just be random sampling variability.

Hypotheses in Context

You must define the parameters clearly.

  • H0:μ1−μ2=0H_0: μ_1 - μ_2 = 0
  • Ha:μ1−μ2≠0H_a: μ_1 - μ_2 \neq 0, >0> 0, or <0< 0

Example setup:

Suppose we compare mean exam scores of students who studied with flashcards vs. those who used practice tests.

  • μ1μ_1: true mean exam score for students using flashcards
  • μ2μ_2: true mean exam score for students using practice tests

Then:

  • H0:μ1−μ2=0H_0: μ_1 - μ_2 = 0
  • Ha:μ1−μ2≠0H_a: μ_1 - μ_2 \neq 0

Be precise. On FRQs, vague definitions of μ₁ and μ₂ lose points fast.

The Test Statistic

Here is the formula from the formula sheet:

t=(xˉ1−xˉ2)−(μ1−μ2)s12n1+s22n2 t = \frac{(\bar{x}_1 - \bar{x}_2) - (μ_1 - μ_2)}{\sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}}

Under the null (difference = 0), this simplifies to:

t=xˉ1−xˉ2s12n1+s22n2 t = \frac{\bar{x}_1 - \bar{x}_2}{\sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}}

Break it down:

  • Numerator → observed difference − expected difference (usually 0)
  • Denominator → standard error of the difference

SE=s12n1+s22n2 \text{SE} = \sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}

So the t-statistic measures:

How many standard errors the observed difference is from 0.

Large ∣t∣|t| means stronger evidence against H0H_0.

Why a t-Distribution

The sampling distribution of

(xˉ1−xˉ2)−(μ1−μ2)s12n1+s22n2 \frac{(\bar{x}_1 - \bar{x}_2) - (μ_1 - μ_2)}{\sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}}

is approximately t-distributed, assuming:

  • Independent random samples or random assignment
  • Nearly normal populations or large samples

The t-model accounts for extra uncertainty because we use sample standard deviations s1,s2s_1, s_2, not population σ’s.

Degrees of Freedom

Technology gives the exact df. On your calculator (2-SampTTest), it’s reported automatically.

The df will fall between:

  • smaller of n1−1n_1 - 1 and n2−1n_2 - 1
  • and n1+n2−2n_1 + n_2 - 2

If you must approximate by hand on the AP exam:

df=smaller sample size−1 \text{df} = \text{smaller sample size} - 1

Always report:

  • t statistic
  • df
  • p-value

Students often forget df on FRQs. That costs points.

Visualizing the p-Value

Suppose you compute t=2.4t = 2.4 for a two-sided test.

Here’s what that means visually. The shaded regions in both tails beyond −2.4-2.4 and 2.42.4 represent the p-value:

Two-sided p-value on a t-distribution (df = 10)

The p-value is the probability, assuming H0H_0 is true, of getting a difference in sample means at least as extreme as the one observed.

That phrase “assuming H0H_0 is true” must appear in your interpretation.

Correct interpretation example:

If the true mean exam scores for the two study methods are equal, the probability of observing a difference in sample means as large as the one found (or larger) is 0.018.

It is not the probability that H0H_0 is true.

Decision and Conclusion

Formal decision rule:

  • If p≤αp \le α → Reject H0H_0
  • If p>αp > α → Fail to reject H0H_0

Never say “accept H0H_0.”

Full conclusion structure:

  1. Compare p to α
  2. State reject/fail to reject
  3. State evidence about HaH_a
  4. Refer to population means in context

Example ending:

Since p = 0.018 is less than α = 0.05, we reject H0H_0. There is convincing evidence that the true mean exam scores differ between students who used flashcards and those who used practice tests.

Notice it’s about population means, not sample means.

How This Supports a Research Question

The result of the test becomes your statistical reasoning.

If the research question was:

Do the two study methods lead to different average exam scores?

Your test provides the evidence to answer that question about the populations those students represent.

You are never proving a difference. You are assessing whether the sample provides convincing evidence of one.

Key Takeaways

The two-sample t-test models (xˉ1−xˉ2)(\bar{x}_1 - \bar{x}_2) with a t-distribution because σ’s are unknown and estimated with s1s_1 and s2s_2.
The t-statistic is (observed difference−0)/SE(\text{observed difference} - 0)/\text{SE}, which measures how many standard errors from 0 the result is.
The p-value is calculated assuming μ1=μ2μ_1 = μ_2; always say that in words.
Degrees of freedom come from technology; by hand use smaller n−1\text{smaller } n - 1.
Conclusions must refer to the population means in context, not the samples.

AP® is a trademark registered by the College Board, which is not affiliated with, and does not endorse this website.

Notes

1 credit used · 5/5 remaining