Hypotheses (two-sided). Let \(\mu_n, \mu_s\) = mean birth weight for all U.S. babies born to nonsmoking / smoking mothers.
\(H_0: \mu_n - \mu_s = 0\) (no difference in mean birth weights)
\(H_A: \mu_n - \mu_s \neq 0\) (a difference exists)
EDA: Birth Weights
Group
n
\(\bar{x}\) (lbs)
\(s\) (lbs)
Nonsmoker
867
7.27
1.23
Smoker
114
6.68
1.6
Observed difference:\(\bar{x}_n - \bar{x}_s = 7.27 - 6.68 \approx 0.59\) lbs. Babies born to nonsmokers weigh a little over half a pound more on average. Real shift, or sampling noise?
A New CLT Result: Difference in Means
When conditions are met, the sampling distribution of \(\bar{x}_1 - \bar{x}_2\) is approximately normal with:
Mean:\(\mu_1 - \mu_2\) (the true difference)
Standard Error: depends on two sample standard deviations
Another CLT result. Just like \(\bar{x}\) in topic 11 and \(\hat{p}_1 - \hat{p}_2\) in topic 10, the difference of two sample means becomes approximately normal under independence + adequate sample sizes.
Same catch as topic 11: we don’t know the population SDs \(\sigma_1, \sigma_2\). We estimate from the sample SDs \(s_1, s_2\) — then use a t-distribution to account for the extra uncertainty.
Pooled SD and SE for the Difference
When the two groups have similar SDs, treat them as sharing a common population SD. Estimate it by pooling the two sample SDs:
And use a t-distribution with \(df = n_1 + n_2 - 2\).
“Pooled” parallel. Same idea as the pooled \(\hat{p}\) in topic 10 — combine information from both groups to estimate a common population value.
Technical Conditions: Two Means
Three conditions for inference about \(\mu_1 - \mu_2\) from two independent samples:
Condition
Rule
Independence
Observations independent within and across groups — typically from random samples (each \(n < 10\%\) of population) or random assignment, otherwise justified from study context
Normality
Each group: \(n \geq 30\) → sample data may show mild skew, but no extreme outliers. If \(n < 30\), group data should look roughly normal.
Equal variance
Group SDs similar (within a factor of \(\approx\) 2) — used for the pooled SE
Try it: do all three conditions hold for the Birth Weights sample?
Independence: random sample of 2014 U.S. births (well under 10% of all 2014 U.S. births) ✓. Normality:\(n_n = 867\), \(n_s = 114\) — both well above 30, no extreme outliers in the histograms ✓. Equal variance:\(s_n \approx 1.23\), \(s_s \approx 1.6\) — within a factor of 2 ✓. All three met.
Test Statistic for Two Means
The T-statistic measures how far the observed difference is from the null value, in SE units:
Compare to a t-distribution with \(df = n_1 + n_2 - 2\)
Same formula structure as Z and the one-mean T — observed minus null over SE. Because we estimate \(\sigma_1, \sigma_2\) from samples, the reference distribution is a t-distribution (with \(df = n_1 + n_2 - 2\) here) — coming up next.
The t-Distribution (Again)
Under \(H_0\), \(T = (\bar{x}_1 - \bar{x}_2)/SE\) follows a t-distribution with \(df = n_1 + n_2 - 2\).
Bell-shaped and symmetric like the normal
Thicker tails (extra uncertainty from estimating \(\sigma_1, \sigma_2\) from samples)
Smaller total \(n\) → thicker tails
As \(df\) grows, t approaches the normal
For Birth Weights, \(df = 979\) — the t curve is essentially normal here.
Statistic & Test Statistic
For each scenario, identify the statistic of interest and the test statistic (\(Z\) or \(T\)).
A campus survey asks 600 students whether they have used a generative AI tool. Is the rate different from 50%?Statistic:\(\hat{p}\) (single proportion). Test statistic:\(Z\) — normal model (topic 6).
50 plots are randomly assigned to two fertilizer treatments. Do the mean yields differ?Statistic:\(\bar{x}_1 - \bar{x}_2\) (difference of means). Test statistic:\(T\) — t-distribution with \(df = n_1 + n_2 - 2\) (today).
A nutrition study measures sodium in 40 fast-food burgers. Is the mean sodium different from 1200 mg?Statistic:\(\bar{x}\) (single mean). Test statistic:\(T\) — t-distribution with \(df = n - 1\) (topic 11).
Conclusion: Convincing evidence that mean birth weight differs between U.S. babies born to nonsmoking vs. smoking mothers.
In plain terms: nonsmokers’ babies averaged about 0.59 pounds heavier in the sample; a gap this large is extremely unlikely if the population means were equal.
Scope: random sample of 2014 U.S. births → conclusion generalizes to all 2014 U.S. births. Observational data → cannot conclude that smoking causes lower birth weight (third-variable explanations like prenatal care, nutrition, alcohol use, age remain possible).
Mario Kart Auctions
You’ve been collecting copies of Mario Kart for the Nintendo Wii and decide to sell them on eBay. Should you bother photographing each disc yourself, or just use a stock photo of the box? Does using a stock photo affect the selling price?
Data (Diez et al., OpenIntro):
Photo
\(n\)
\(\bar{x}\) ($)
\(s\) ($)
Stock (yes)
105
48.50
9.47
No stock (no)
36
44.33
7.25
State \(H_0\) and \(H_A\) for \(\mu_y - \mu_n\) (two-sided). \(H_0: \mu_y - \mu_n = 0\)\(H_A: \mu_y - \mu_n \neq 0\).
What’s the observed difference? \(48.50 - 44.33 = \$4.17\) — stock-photo auctions averaged about four dollars more in the sample.
EDA: Mario Kart
Take a moment with the shapes and spreads of each group — you’ll use what you see on the next slide.
Check independence, normality, and equal variance. Independence: auctions are separate listings, reasonably independent ✓. Normality: both group sizes \(\geq 30\), so CLT applies; histograms showed no extreme outliers ✓. Equal variance:\(s_y \approx 9.47\) vs. \(s_n \approx 7.25\) — within a factor of two, consistent with the similar spreads in the histograms ✓. Conditions met.
Two-sided p-value \(\approx\)0.017. State your conclusion at \(\alpha = 0.05\), including scope of inference. p-value \(< 0.05\) → reject \(H_0\). Convincing evidence that stock-photo and no-stock auctions have different mean prices (and stock-photo auctions sell for more on average). Scope: sample of eBay Mario Kart Wii auctions from a specific window — not a random sample of any wider population — so the conclusion is most defensible for similar listings. Observational (sellers chose how to photograph), so we can’t claim using a stock photo causes higher prices — it may reflect product condition, bundling, or listing style.
Looking Ahead
We’ve tested “Are the two means different?” using the t-distribution with \(df = n_1 + n_2 - 2\).
Next time: a confidence interval for \(\mu_1 - \mu_2\) — “By how much do the two means differ?” — using the same machinery.