AP-STATS-7.7-7.8

U7.7 Two-Sample t-CI for Difference of Means

Master the two-sample t confidence interval for μ₁−μ₂: check independence conditions, use the formula, and tell independent samples from matched pairs.

What you'll do in this lesson

A voice-first session with the Crimsora tutor on U7.7 Two-Sample t-CI for Difference of Means, then targeted practice and FRQs — with the tutor adapting to where you get stuck.

What this lesson covers

When you want to compare two groups—say, the mean battery life of two brands or the average test scores of two classes—you estimate the difference between their population means, μ1μ2\mu_1 - \mu_2. The two-sample tt confidence interval gives you a range of plausible values for that difference from independent samples. This lesson shows you how to check conditions in both samples, build the interval, and interpret it. Critically, you'll also learn to spot when data are actually matched pairs, which is not a two-sample problem at all—it collapses into a one-sample tt interval on the differences. Confusing these two designs is one of the most common ways students lose points, so we'll make the distinction crystal clear.

The Structure of a Two-Sample t Interval

When two samples are drawn independently from two populations, the point estimate for μ1μ2\mu_1 - \mu_2 is simply the difference of sample means, xˉ1xˉ2\bar{x}_1 - \bar{x}_2. The confidence interval takes the familiar form of estimate plus-or-minus margin of error:(xˉ1xˉ2)±ts12n1+s22n2(\bar{x}_1 - \bar{x}_2) \pm t^* \sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}The standard error combines the variability from both samples by adding the two variances (each divided by its own sample size) under the square root. You add the variances because the two samples are independent; variances of independent quantities add.

The critical value tt^* comes from a tt distribution. The degrees of freedom are messy: technology (a calculator's 2-SampTInt) uses the Welch-Satterthwaite formula, which usually gives a non-integer value. If you compute by hand, the conservative approach uses df=min(n11,n21)df = \min(n_1 - 1, n_2 - 1), which yields a slightly wider (safer) interval. On the AP exam, you may report either, but state which you used.

A common misconception is pooling the two sample variances. Do not pool unless a problem explicitly justifies equal population variances—the unpooled procedure above is the standard AP approach and is always defensible.

Checking Conditions in Both Samples

Before computing, you must verify three conditions, and the second and third apply to each sample separately.
ConditionWhat to check
RandomBoth samples were randomly selected, or subjects randomly assigned to two treatment groups
Independence (10%)Each sample is less than 10% of its population, and the two samples are independent of each other
Normal/LargeFor each sample: population normal, OR n30n \geq 30 (CLT), OR small-sample graph shows no strong skew or outliers
The biggest exam trap is checking Normality for only one sample. If n1=40n_1 = 40 and n2=12n_2 = 12, you cite the CLT for sample 1 but must examine a dotplot, boxplot, or stemplot of sample 2 for skewness and outliers. State your reasoning for each group.

Also confirm the two samples are independent of one another—this is what separates a two-sample design from matched pairs. If the same subjects appear in both groups, or if there is a natural pairing, independence fails and the two-sample procedure is invalid.

Matched Pairs: A One-Sample Problem in Disguise

Matched-pairs data look like two columns of numbers, but they are fundamentally different from two independent samples. In a matched-pairs design, each observation in group 1 is linked to a specific observation in group 2—for example, the same person measured before and after a treatment, or twins split between two conditions.

Because the two measurements are dependent, you cannot use the two-sample formula. Instead, compute the difference for each pair, di=x1ix2id_i = x_{1i} - x_{2i}, and then run a one-sample tt interval on those differences:dˉ±tsdn\bar{d} \pm t^* \frac{s_d}{\sqrt{n}}Here nn is the number of pairs, sds_d is the standard deviation of the differences, and df=n1df = n - 1. This is the same procedure as U7.1, just applied to a derived variable.
FeatureTwo-sampleMatched pairs
Data relationshipIndependentPaired/dependent
Analyzexˉ1xˉ2\bar{x}_1 - \bar{x}_2dˉ\bar{d}
dfdfWelch or min(n11,n21)\min(n_1{-}1,n_2{-}1)n1n - 1
Ask: were subjects paired or randomly assigned in two separate groups? That single question determines the method.

Interpreting and Concluding

A correct interpretation names the parameter, the confidence level, and the context. For example: "We are 95% confident that the interval from 1.2 to 4.8 grams captures the true difference in mean weight, μ1μ2\mu_1 - \mu_2, between brand A and brand B batteries."

The interpretation of the confidence level is different: "If we repeated this sampling process many times and built an interval each time, about 95% of those intervals would capture the true difference in means."

A powerful move the exam rewards: use the interval to decide whether a difference is plausible. If the entire interval is positive, you have evidence that μ1>μ2\mu_1 > \mu_2. If it is entirely negative, μ1<μ2\mu_1 < \mu_2. If the interval contains 0, then no difference is a plausible value, so you cannot conclude the means differ. Watch the order of subtraction—μ1μ2\mu_1 - \mu_2 versus μ2μ1\mu_2 - \mu_1 flips every sign, so always define which group is 1 and which is 2 at the start.

Always round enough to be meaningful, keep units, and never say you are confident about a sample statistic—the interval estimates a population parameter.

Key terms

Two-sample t interval.
A confidence interval estimating the difference between two population means, μ1μ2\mu_1 - \mu_2, from two independent samples.
Standard error of the difference.
The estimated variability of xˉ1xˉ2\bar{x}_1 - \bar{x}_2, computed as s12n1+s22n2\sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}.
Independent samples.
Two samples in which the selection or values of one have no relationship to the other; required for the two-sample procedure.
Matched pairs.
A design where each observation in one condition is naturally linked to an observation in the other, analyzed with a one-sample t interval on the differences.
Degrees of freedom.
A parameter of the t distribution; found by technology (Welch) or conservatively as min(n11,n21)\min(n_1-1, n_2-1) for two samples.
Critical value t*.
The multiplier from the t distribution corresponding to the confidence level and degrees of freedom.
Difference of means.
The parameter μ1μ2\mu_1 - \mu_2 being estimated; its sign depends on which group is labeled 1.

Worked example

A researcher compares battery life (hours) of two brands. A random sample of 15 Brand A batteries has xˉ1=42.0\bar{x}_1 = 42.0, s1=3.2s_1 = 3.2. An independent random sample of 12 Brand B batteries has xˉ2=39.5\bar{x}_2 = 39.5, s2=2.8s_2 = 2.8. Both sample dotplots are roughly symmetric with no outliers. Construct a 95% confidence interval for μ1μ2\mu_1 - \mu_2.
First, identify the procedure: two independent random samples, so this is a two-sample tt interval for μ1μ2\mu_1 - \mu_2.

Check conditions. Random: both samples are stated as random. Independence: samples are independent of each other, and it is reasonable that each brand produces more than 10×15=15010 \times 15 = 150 and 10×12=12010 \times 12 = 120 batteries. Normal: both dotplots are roughly symmetric with no outliers, so the tt procedure is appropriate for each small sample.

Point estimate: xˉ1xˉ2=42.039.5=2.5\bar{x}_1 - \bar{x}_2 = 42.0 - 39.5 = 2.5 hours.

Standard error: 3.2215+2.8212=10.2415+7.8412=0.6827+0.6533=1.3361.156\sqrt{\frac{3.2^2}{15} + \frac{2.8^2}{12}} = \sqrt{\frac{10.24}{15} + \frac{7.84}{12}} = \sqrt{0.6827 + 0.6533} = \sqrt{1.336} \approx 1.156.

Degrees of freedom (conservative): min(151,121)=11\min(15-1, 12-1) = 11, giving t2.201t^* \approx 2.201 for 95% confidence. (Technology's Welch df24.7df \approx 24.7 gives t2.06t^* \approx 2.06.)

Margin of error (conservative): 2.201×1.1562.5452.201 \times 1.156 \approx 2.545.

Interval: 2.5±2.5452.5 \pm 2.545, or about (0.05,5.05)(-0.05, 5.05) hours.

Conclusion: We are 95% confident that the true difference in mean battery life (μAμB\mu_A - \mu_B) is between 0.05-0.05 and 5.055.05 hours. Because the interval contains 0, we do not have convincing evidence that the mean lives differ.

Practice questions

A study measures each of 20 volunteers' blood pressure before and after a meditation program. Which procedure correctly estimates the mean change?
  1. Two-sample t interval with dfdf from technology
  2. One-sample t interval on the 20 differences
  3. Two-sample t interval using min(19,19)\min(19,19) degrees of freedom
  4. Two separate one-sample t intervals compared by overlap

Answer: One-sample t interval on the 20 differences

Each volunteer is measured twice, so the before and after values are paired, not independent. The correct approach computes each person's difference and builds a one-sample tt interval on those 20 differences with df=19df = 19. Using a two-sample procedure would wrongly treat dependent data as independent.
A 90% two-sample t confidence interval for μ1μ2\mu_1 - \mu_2 (treatment minus control) is (1.4,6.8)(1.4, 6.8). What can you conclude about the treatment effect, and why?

Answer: Because the entire interval is positive (does not contain 0), there is convincing evidence at this confidence level that the treatment mean is greater than the control mean.

The interval estimates μtreatmentμcontrol\mu_{treatment} - \mu_{control}. Since every plausible value is above 0, a difference of zero is not plausible, and all plausible differences favor the treatment being larger. If the interval had contained 0, we could not conclude the means differ. The sign convention (treatment minus control) tells us the direction of the effect.
Two independent samples have n1=45n_1 = 45 and n2=9n_2 = 9. Explain how you should check the Normal/Large condition for constructing a two-sample t interval.

Answer: For sample 1, cite the Central Limit Theorem since n1=4530n_1 = 45 \geq 30; for sample 2, examine a graph of the data (dotplot, boxplot, or stemplot) for strong skewness or outliers since n2=9<30n_2 = 9 < 30.

The Normal condition must be verified for each sample separately. A large sample size lets you invoke the CLT, but a small sample requires graphical evidence that the population could plausibly be Normal—specifically, no strong skew and no outliers. Checking only the large sample is a frequent error.

FAQ

When do I use a two-sample t interval versus a matched-pairs interval?
Use a two-sample tt interval when the two groups are independent—different subjects randomly sampled or randomly assigned to two groups. Use a matched-pairs (one-sample) interval when each observation in one group is naturally linked to a specific observation in the other, such as before/after measurements on the same people or paired twins. Ask whether the data come in meaningful pairs; if so, analyze the differences.
Should I pool the variances in a two-sample t interval?
For AP Statistics, no. The standard, always-valid procedure uses the unpooled standard error s12n1+s22n2\sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}. Pooling assumes the two populations have equal variances, which is rarely justified and not required. Stick with the unpooled formula and let technology handle the degrees of freedom.
What degrees of freedom should I report?
You may report either the calculator's Welch value (usually a decimal) or the conservative min(n11,n21)\min(n_1 - 1, n_2 - 1). The conservative option gives a slightly wider interval and is safe to compute by hand. Just state which method you used so your critical value tt^* is consistent with it.
How do I know if the difference in means is significant from a confidence interval?
Check whether the interval contains 0. If the whole interval is above or below 0, then 0 is not a plausible difference, giving evidence that the means differ. If the interval includes 0, no difference is plausible and you cannot conclude the means are different at that confidence level.

Learn this with a teacher, not a page

The Crimsora tutor teaches U7.7 Two-Sample t-CI for Difference of Means live — explaining on a whiteboard, asking you questions, and adapting to where you get stuck.