Loading…
Two-sample t-interval and t-test for the difference in two population means μ1 - μ2 using independent samples.
Learn step-by-step with practice exercises built right in.
Comparing the means of two populations—such as treatment vs. control, or two manufacturing processes—is one of the most common inference problems. We use two-sample t-procedures to estimate and test the difference .
Let and be the true means of two independent populations. We draw independent samples of sizes and , obtaining sample means and , and sample standard deviations and .
We focus on the difference .
When conditions are met:
Confidence Interval:
where and is the critical -value based on the degrees of freedom.
Degrees of Freedom (Welch's adjustment):
(Most calculators compute this automatically; always use the more conservative estimate if doing by hand.)
Null Hypothesis: (or equivalently, )
Test Statistic:
Compare to the -distribution with the appropriate df to find the p-value.
Alternative Hypotheses:
All methods require:
| Condition | Requirement |
|---|---|
| Random samples | Both samples randomly selected. |
| Independence | Samples are independent of each other; within each sample, observations are independent (10% condition if sampling without replacement). |
| Nearly Normal | Each sample is approximately Normal (large sample or no extreme outliers). For , use t-procedures even if distribution is somewhat non-normal. |
t-procedures are robust to departures from Normality, especially for large samples and balanced designs (). However:
Two high schools compare math proficiency test scores:
Construct a 95% CI for .
Standard error:
Degrees of freedom (conservative estimate: use from smaller sample): Using and 95% confidence, .
CI:
We are 95% confident that School A's mean exceeds School B's by between −2.0 and +8.0 points.
Test vs. at using the data above.
Test statistic:
p-value (two-tailed with ):
Since , we fail to reject . Insufficient evidence that the school means differ.
⚠️ Confusing SE with : is the standard error of . Do not use the sample standard deviations directly as if they were the population SDs.
⚠️ Forgetting Independence: Two-sample t-tests require independent samples. If the samples are paired (same individuals measured twice), use a paired t-test instead.
⚠️ Misinterpreting CI: A 95% CI does not mean there is a 95% probability that is in the interval for this specific data. Rather, the method has 95% long-run success rate.
💡 TI-84 / TI-Nspire: Use 2-SampTInt for confidence intervals and 2-SampTTest for hypothesis tests. Enter the summary statistics () and the alternative hypothesis. The calculator computes df and the interval or test automatically (with or without assuming equal variances).
Two basketball teams have mean shooting percentages: Team A (, , ) and Team B (, , ). Construct a 90% CI for .
Standard error:
Degrees of freedom (conservative: ): For and 90% confidence, .
CI:
We are 90% confident that Team A's mean shooting % exceeds Team B's by between −1.6% and +7.6%.
A sleep study compares two treatments: Placebo (, hours, ) and Drug (, hours, ). Test vs. at .
Standard error:
Test statistic:
Degrees of freedom (conservative: ): For one-tailed, :
Since , we reject . Significant evidence that the drug increases sleep compared to placebo.
In a quality control study, Product A (, , ) and Product B (, , ) are compared. Calculate the 99% CI for and interpret whether the products differ significantly.
Standard error:
Degrees of freedom (approximate, using Welch's formula or conservative ): For (or even for large samples) and 99% confidence, .
CI:
Interpretation: At 99% confidence, the true difference is between −9.286 and +5.286. Since 0 is in the interval, there is no significant difference between the products at the 0.01 level. The observed 2-unit difference in samples could easily be due to random variation.
Avoid these 3 frequent errors
Review key concepts with our flashcard system
Explore more AP Statistics topics