Two Population Inference
Is Method A better than Method B? Do men earn more than women? We compare two groups to find out.
Comparing Two Means
We are testing the difference between two population means ($\mu_1 - \mu_2$). Usually, our Null Hypothesis is that there is no difference.
$H_0: \mu_1 - \mu_2 = 0$ (or $\mu_1 = \mu_2$)
Case 1: $\sigma_1$ and $\sigma_2$ Known
We use the Z-test. This is rare in practice but good for understanding.
Case 2: $\sigma_1, \sigma_2$ Unknown but Equal
If we assume the variances are equal ($\sigma_1^2 = \sigma_2^2$), we pool the sample variances.
Where $s_p^2 = \frac{(n_1-1)s_1^2 + (n_2-1)s_2^2}{n_1 + n_2 - 2}$
Degrees of freedom: $df = n_1 + n_2 - 2$.
Case 3: $\sigma_1, \sigma_2$ Unknown and Unequal
We use the unpooled t-test (Welch's t-test). The formula for degrees of freedom is complex, but software handles it.
Test Yourself
Q1: When comparing two means with unknown but equal variances, we calculate a ______ variance.