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 .
μ1−μ2
Setting Up the Problem
Let μ1 and μ2 be the true means of two independent populations. We draw independent samples of sizes n1 and n2, obtaining sample means xˉ1 and xˉ2, and sample standard deviations s1 and s2.
We focus on the difference xˉ1−xˉ2.
Sampling Distribution of xˉ1−xˉ2
When conditions are met:
Mean:μxˉ1−xˉ2=μ1−μ2
Standard error:SE=n1
Distribution: Approximately t with complicated degrees of freedom (calculator handles this)
Two-Sample t-Interval for μ1−μ2
Confidence Interval:(xˉ1−xˉ2)±t∗⋅SE
where SE=n1s12+n2s22 and t∗ is the critical t-value based on the degrees of freedom.
Degrees of Freedom (Welch's adjustment):df=n1−1(s12/n1)2+n2−1(s22/n2)(n1s12+
(Most calculators compute this automatically; always use the more conservative estimate if doing by hand.)
Compare to the t-distribution with the appropriate df to find the p-value.
Alternative Hypotheses:
Two-tailed: Ha:μ1=μ2
One-tailed: Ha:μ1>μ2 or
Conditions for Two-Sample t-Procedures
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 n≥30, use t-procedures even if distribution is somewhat non-normal.
Robustness of t-Tests
t-procedures are robust to departures from Normality, especially for large samples and balanced designs (n1≈n2). However:
With very small samples (n<15) and skewed data, be cautious.
With very large samples (n>100), slight departures from Normality are not a concern.
Worked Example 1: Two-Sample t-Interval
Two high schools compare math proficiency test scores:
School A: n1=25, xˉ1=78, s1=8
School B: n2=30, xˉ2,
Construct a 95% CI for μA−μB.
Standard error:SE=2582+30102=2564+301002.56+3.333=5.893≈2.427
Degrees of freedom (conservative estimate: use n−1=24 from smaller sample):
Using df=24 and 95% confidence, t∗≈2.064.
CI:(78−75)±2.064(2.427)=3±5.008=(−2.008,8.008)
We are 95% confident that School A's mean exceeds School B's by between −2.0 and +8.0 points.
Worked Example 2: Two-Sample t-Test
Test H0:μ1=μ2 vs. Ha:μ1=μ2 at α=0.05 using the data above.
Test statistic:t=2.4273−0≈1.236
p-value (two-tailed with df≈24):p-value=2×P(T>1.236)≈2(0.114)≈0.228
Since p-value=0.228>0.05, we fail to rejectH0. Insufficient evidence that the school means differ.
Common Pitfalls
⚠️ Confusing SE with s: SE=s12/n1+s22/n2 is the standard error of xˉ1−xˉ2. 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 μ1−μ2 is in the interval for this specific data. Rather, the method has 95% long-run success rate.
Calculator Tip
💡 TI-84 / TI-Nspire: Use 2-SampTInt for confidence intervals and 2-SampTTest for hypothesis tests. Enter the summary statistics (xˉ1,s1,n1,xˉ2,s2,n2) and the alternative hypothesis. The calculator computes df and the interval or test automatically (with or without assuming equal variances).
📚 Practice Problems
1Problem 1easy
❓ Question:
Two basketball teams have mean shooting percentages: Team A (n=20, xˉ=45%, s=8%) and Team B (n=25, xˉ=42%, s=10%). Construct a 90% CI for μA−μB.
💡 Show Solution
Standard error:SE=20
2Problem 2medium
❓ Question:
A sleep study compares two treatments: Placebo (n=15, xˉ=6.2 hours, ) and Drug (, hours, ). Test vs. at .
3Problem 3hard
❓ Question:
In a quality control study, Product A (n1=50, , ) and Product B (, , ) are compared. Calculate the 99% CI for and interpret whether the products differ significantly.
Explain using:
⚠️ Common Mistakes: Inference for Two Sample Means (CI and Test)
What is Inference for Two Sample Means (CI and Test)?▾
Two-sample t-interval and t-test for the difference in two population means μ1 - μ2 using independent samples.
How can I study Inference for Two Sample Means (CI and Test) effectively?▾
Start by reading the study notes and working through the examples on this page. Then use the flashcards to test your recall. Practice with the 3 problems provided, checking solutions as you go. Regular review and active practice are key to retention.
Is this Inference for Two Sample Means (CI and Test) study guide free?▾
Yes — all study notes, flashcards, and practice problems for Inference for Two Sample Means (CI and Test) on Study Mondo are 100% free. No account is needed to access the content.
What course covers Inference for Two Sample Means (CI and Test)?▾
Inference for Two Sample Means (CI and Test) is part of the AP Statistics course on Study Mondo, specifically in the Unit 7: Inference for Quantitative Data — Means section. You can explore the full course for more related topics and practice resources.
Are there practice problems for Inference for Two Sample Means (CI and Test)?▾
Yes, this page includes 3 practice problems with detailed solutions. Each problem includes a step-by-step explanation to help you understand the approach.
s
12
+
n2s22
2
n2
s22
)
2
Ha:μ1<μ2
=
75
s2=10
=
82
+
25102
=
2064+25100=
3.2+4=
7.2≈
2.683
Degrees of freedom (conservative: min(n1−1,n2−1)=19):
For df=19 and 90% confidence, t∗≈1.729.
CI:(45−42)±1.729(2.683)=3±4.637=(−1.637,7.637)
We are 90% confident that Team A's mean shooting % exceeds Team B's by between −1.6% and +7.6%.
s=1.1
n=15
xˉ=7.4
s=1.3
H0:μplacebo=μdrug
Ha:μplacebo<μdrug
α=0.05
💡 Show Solution
Standard error:SE=151.12+151.32=151.21+151.69152.9≈0.440
Test statistic:t=0.440(6.2−7.4)−0=
Degrees of freedom (conservative: df=14):
For one-tailed, Ha:μ1:
Since p-value≈0.008<0.05, we rejectH0. Significant evidence that the drug increases sleep compared to placebo.
x
ˉ
1
=
100
s1=12
n2=50
xˉ2=102
s2=15
μA−μB
💡 Show Solution
Standard error:SE=50122+50152=50144+5022550369=7.38≈2.717
Degrees of freedom (approximate, using Welch's formula or conservative df=49):
For df=49 (or even ∞ for large samples) and 99% confidence, t.
CI:(100−102)±2.681(2.717)=−2±7.286=(−9.286,5.286)
Interpretation: At 99% confidence, the true difference μA−μB 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.