Setting Up a Two-Mean Test
The two-mean hypotheses
- To compare two means, test whether they're equal.
- Null: $H_0: \mu_1 = \mu_2$ (equivalently $\mu_1 - \mu_2 = 0$).
- Alternative: $H_a: \mu_1 \ne \mu_2$, or one-sided $\mu_1 > \mu_2$ / $\mu_1 < \mu_2$.
- Choose the alternative from the question, before the data.
The two-sample t-test
- For independent samples, use the two-sample $t$-test for a difference of means.
- It uses the $t$-distribution — $\sigma_1$ and $\sigma_2$ are unknown, estimated by $s_1, s_2$.
- No pooling of variances is required (unlike the two-proportion test).
- The paired design instead uses a one-sample $t$-test on the differences (next lesson).
Conditions for both groups
- Check random, 10%, and normal/large sample for each group.
- Normality per group: normal population, or $n \ge 30$, or no strong skew/outliers.
- Independence: the two samples are independent of each other.
- Verify separately for group $1$ and group $2$.
The test statistic
- The test statistic uses the standard error of $\bar{x}_1 - \bar{x}_2$:
-
$$t = \frac{(\bar{x}_1 - \bar{x}_2) - 0}{\sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}}$$
- The "$-0$" is the null value ($\mu_1 - \mu_2 = 0$).
- Variances add under the root; there's no pooling.
The two-mean test does NOT pool — unlike the two-proportion test. Keep each group's own $s^2$: $SE=\sqrt{\frac{s_1^2}{n_1}+\frac{s_2^2}{n_2}}$. Variances add even for a difference. And it's a $t$ statistic, read against a $t$-distribution (technology gives the $df$; it's not simply $n_1+n_2-2$ unless you assume equal variances, which AP doesn't require).
Group $1$: $\bar{x}_1 = 52$, $s_1 = 6$, $n_1 = 25$. Group $2$: $\bar{x}_2 = 48$, $s_2 = 8$, $n_2 = 25$.
- $H_0: \mu_1 = \mu_2$, $H_a: \mu_1 \ne \mu_2$.
- SE: $\sqrt{\dfrac{36}{25} + \dfrac{64}{25}} = \sqrt{1.44 + 2.56} = \sqrt{4} = 2$.
- Test statistic: $t = \dfrac{52 - 48}{2} = 2$.
A two-mean test states $H_0: \mu_1 = \mu_2$ vs. a one- or two-sided $H_a$, using the two-sample $t$-test (no pooling) after checking random, 10%, and normal/large sample for both groups. The test statistic is $t = \frac{\bar{x}_1 - \bar{x}_2}{\sqrt{s_1^2/n_1 + s_2^2/n_2}}$.
The null model: μ1 = μ2
Under H0 the means are equal; t measures the observed gap in SEs.
s1=6,n1=25 and s2=8,n2=25. Compute SE = √(36/25 + 64/25).
√(1.44 + 2.56) = √4 = 2.
x̄1=52, x̄2=48, SE=2. Compute t = (x̄1−x̄2)/SE.
(52−48)/2 = 4/2 = 2.
The two-sample t-test for means pools the two variances, like the two-proportion test.
The two-mean test does NOT pool — keep each s² separate.
The null hypothesis for a two-mean test is...
H0 says the two population means are equal.
Under the null, the numerator of the two-sample t is (x̄1 − x̄2) − 0.
The null value μ1 − μ2 = 0 is subtracted.