AP Statistics · Topic 4.10 · Unit 4

AP Stats 4.10: Carrying Out a Two-Sample t-Test

By Jude Wallis · Published

Topic 4.10 carries out the two-sample t-test: t equals the difference in sample means minus 0, divided by the square root of s-1 squared over n-1 plus s-2 squared over n-2. Technology gives the p-value and degrees of freedom. Reject the null if the p-value is at most alpha, then conclude in context.

AP Statistics: Unit 4 (topics 4.10). Topic 4.10 (Carrying Out a Test for the Difference Between Two Population Means) in the Fall 2026 AP Statistics course.

What topic 4.10 covers

Topic 4.10 finishes the two-sample test you set up in topic 4.9. You calculate the test statistic and p-value, interpret the p-value, and justify a conclusion about the difference between two population means, μ1μ2\mu_1 - \mu_2. It closes Unit 4 and is a common setting for free-response question 3.

The logic is identical to the one-sample test in topic 4.5; only the standard error and degrees of freedom change to handle two independent samples.

The test statistic and p-value

Under the null hypothesis the two means are equal, so the hypothesized difference is 0. The two-sample t-statistic is

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

where the denominator is the standard error of the difference; when the null hypothesis is true, this statistic follows a t-distribution. As in topic 4.7, the degrees of freedom fall between the smaller of n11n_1 - 1 and n21n_2 - 1 and the value n1+n22n_1 + n_2 - 2, and you read the exact df and p-value from technology. Match the tail direction to the alternative. The two-sample t-test calculator and the p-value calculator confirm the numbers.

The standard error uses each sample's own standard deviation and size, so the two groups are not pooled. Because the exact degrees of freedom come from a formula best handled by technology, report the calculator value; by hand, using the smaller of n11n_1 - 1 and n21n_2 - 1 is a valid conservative choice that yields a slightly larger p-value.

Interpreting the p-value and concluding

The p-value is the probability of a test statistic as extreme or more extreme than the one observed, in the direction of the alternative, assuming the null hypothesis is true, that is assuming the two population means are equal. See what does a p-value mean for the careful reading.

Make the formal decision by comparing to the significance level α\alpha (alpha): if the p-value α\le \alpha, reject H0H_0; if the p-value >α> \alpha, fail to reject H0H_0. Write the conclusion in context, in terms of the alternative, using non-definitive language, and refer to the parameters and both populations. You never prove that the means are equal.

The test and the two-sample interval from topic 4.7 agree: a two-sided test that rejects at level α\alpha matches a 100(1α)%100(1-\alpha)\% interval that excludes 0, and a test that fails to reject matches an interval that contains 0.

Two-sample t-test for a difference of means

Students are randomly assigned to a new lesson method (group 1) or the standard method (group 2), 36 in each. Group 1 has xˉ1=82\bar{x}_1 = 82, s1=6s_1 = 6; group 2 has xˉ2=78\bar{x}_2 = 78, s2=8s_2 = 8. Test H0:μ1=μ2H_0: \mu_1 = \mu_2 against Ha:μ1>μ2H_a: \mu_1 > \mu_2 at α=0.05\alpha = 0.05.

  1. Point estimate: xˉ1xˉ2=8278=4\bar{x}_1 - \bar{x}_2 = 82 - 78 = 4 points.

  2. Standard error: SE=6236+8236=3636+6436=1+1.7778=2.77781.6667SE = \sqrt{\frac{6^2}{36} + \frac{8^2}{36}} = \sqrt{\frac{36}{36} + \frac{64}{36}} = \sqrt{1 + 1.7778} = \sqrt{2.7778} \approx 1.6667.

  3. Test statistic: t=(8278)01.6667=41.6667=2.40t = \frac{(82 - 78) - 0}{1.6667} = \frac{4}{1.6667} = 2.40.

  4. Using the conservative df=35df = 35 (the smaller of 36136 - 1 and 36136 - 1), the one-sided p-value P(T>2.40)P(T > 2.40) is about 0.011 from technology.

  5. Compare to α\alpha: 0.0110.050.011 \le 0.05, so reject H0H_0.

Because the p-value of about 0.011 is at most 0.05, reject H0H_0. There is convincing evidence that the new method produces a higher mean test score than the standard method.

Frequently asked questions

Why is the hypothesized difference 0 in the test statistic?

Because the null hypothesis says the two population means are equal, so their difference mu-1 minus mu-2 is 0. That is the value you subtract in the numerator. On the rare occasion a problem tests a specific nonzero difference, you would subtract that value instead, but the AP course uses 0.

Do I need equal sample sizes or equal variances?

No. The AP two-sample t-test does not assume equal population variances and does not require equal sample sizes; it uses each sample's own standard deviation and size in the standard error. This is the unpooled procedure that technology reports by default, so you do not pool the two standard deviations.