Interval for a difference of means

Section of Confidence intervals, part of Statistical inference

Interval for a difference of means

Type Section
Taught in Confidence intervals
Part Statistical inference

The construction is like the one-sample case, with one extra assumption: the two variances are equal, \sigma_1^2=\sigma_2^2=\sigma^2. Then

\frac{(\overline X_1-\overline X_2)-(\mu_1-\mu_2)}{\sigma\sqrt{1/n_1+1/n_2}}

is standard normal, and the common variance is estimated by pooling.

Definition 1 (Pooled variance) For two independent samples assumed to share a variance \sigma^2, the pooled sample variance is

s_p^2=\frac{(n_1-1)s_1^2+(n_2-1)s_2^2}{n_1+n_2-2}.

It is unbiased for \sigma^2, and (n_1+n_2-2)s_p^2/\sigma^2 is \chi^2_{n_1+n_2-2}.

Article: Pooled variance →

The pooled variance weights each sample variance by its degrees of freedom. The chi-squared statement holds because (n_1-1)s_1^2/\sigma^2 and (n_2-1)s_2^2/\sigma^2 are independent \chi^2_{n_1-1} and \chi^2_{n_2-1} variables, and independent chi-squared variables add their degrees of freedom.

Theorem 1 (Two-sample t pivot) For two independent normal samples with a common variance,

T=\frac{(\overline X_1-\overline X_2)-(\mu_1-\mu_2)}{s_p\sqrt{1/n_1+1/n_2}}

has a t distribution with n_1+n_2-2 degrees of freedom.

Article: Two-sample t pivot →

The proof is the one-sample argument again. The numerator over \sigma\sqrt{1/n_1+1/n_2} is standard normal, the pooled chi-squared variable is (n_1+n_2-2)s_p^2/\sigma^2, and the two are independent because each sample mean is independent of its own sample variance and the samples are independent of each other. The resulting interval for \mu_1-\mu_2 is

\overline X_1-\overline X_2\pm t_{n_1+n_2-2;\,1-\alpha/2}\;s_p\sqrt{\frac1{n_1}+\frac1{n_2}}.

For the safety measures, n_1=n_2=50, the estimate is -17, the standard error is 2.84, and t_{98;0.975}=1.984. The 95% interval is

-17\pm1.984\times2.84=-17\pm5.64=(-22.6,\ -11.4).

It lies wholly below zero. The interval -17\pm2.84, one standard error each side, would have coverage of only about 68%.

Used in

See also

Confidence interval · Pivot · One-sample t pivot · Pooled variance · Two-sample t pivot · Variance-ratio F pivot · Wald interval · Coverage

Glossary and index