CI for difference between two population means (variances are known)
Let $X_1, X_2, \cdots, X_{n_1}$
be a random sample of size $n_1$
from a population with mean $\mu_1$
and standard deviation $\sigma_1$
.
Let $Y_1, Y_2, \cdots, Y_{n_2}$
be a random sample of size $n_2$
from a population with mean $\mu_2$
and standard deviation $\sigma_2$
. And the two sample are independent.
Formula
$100(1-\alpha)$% confidence interval estimate for the difference $(\mu_1-\mu_2)$ is
$(\overline{X} -\overline{Y})- E \leq (\mu_1-\mu_2) \leq (\overline{X} -\overline{Y}) + E$
where,
$\overline{X} = \dfrac{1}{n_1}\sum X_i$
and$\overline{Y} =\dfrac{1}{n_2}\sum Y_i$
are the sample means of first and second sample respectively,$1-\alpha$
is the confidence coefficient,$E = Z_{\alpha/2} \sqrt{\dfrac{\sigma_1^2}{n_1}+\dfrac{\sigma_2^2}{n_2}}$
is the margin of error,$Z_{\alpha/2}$
is the critical value of $Z$.