# Finding the degrees of freedom for a confidence interval for the difference of two means

This is more a question to make sure I have a good understanding.

1. Assuming that the variance of each sample is similar i.e., homogeneity of variance and $n_1$ and $n_2$ are the same. $$\text{df} = (n_1-1) + (n_2-1)$$ also the $$\text{MSE} = \frac{s_1^2 + s_2^2}{2}$$

2. Assuming that the variance of each sample is similar ie Homogeneity of Variance but $n_1\neq n_2$ $$s_{x_1-x_2} = \sqrt{\frac{2\left(s_1^2+s_2^2\right)/ \left(n_1+n_2-2\right)}{1/n_1+1/n_2}}$$ $$\text{df}= (n_1-1) + (n_2-1)$$

3. Also, if you can assume that the two samples have the same variance then you can pool them $$s_p = \sqrt{\frac{\left(n_1-1\right)s_1^2 + \left(n_2-1\right)s_2^2}{n_1+n_2-2}}$$ with $\text{df} = n_1+n_2-2$ but have also read not to use this method

4. I have also read that to be more exact to use $$\text{df} = \frac{\left(\frac{s_1^2}{n_1}+\frac{s_2^2}{n_2}\right)^2}{\frac{1}{n_1-1}\left(\frac{s_1^2}{n_1}\right)^2+\frac{1}{n_2-1}\left(\frac{s_2^2}{n_2}\right)^2}$$ Works well when both $n_1$ and $n_2$ are both larger than 5.

5. I have just read about Welch-Satterthwaite estimate,used when $\sigma_1 \neq \sigma_2$ $$\text{df} = \frac{\left(\frac{s_1^2}{n_1}+\frac{s_2^2}{n_2}\right)^2}{\frac{s_1^4}{n_1^2\left(n_1-1\right)}+\frac{s_2^4}{n_2^2\left(n_2-1\right)}}$$

To be honest, I don't know which one to use. I think using 4 is good, but not sure which test it goes with. Also, why is pooling bad (and if it's so bad why put it in the book)? I am studying for the AP statistics exam.

• Man, AP tests are just getting harder and harder... or maybe students are getting smarter. – Crashworks Dec 4 '13 at 20:47

There are only two different formulae for degrees of freedom here:

(1), (2), & (3) - d.f. of the ordinary Student's t-test - exact when the variances of the two populations are equal (in which case you estimate the common population variance by pooling the sample variances).

(4) & (5) - d.f. of the Welch-Satterthwaite version of the t-test - approximate when the variances of the two populations are unequal.

There's no right or wrong one to use; it's simply that the Welch-Satterthwaite version is safer when you're not sure whether the variances of the two populations are equal or not. People who say pooling is bad are referring to the case where equal variances are thoughtlessly assumed.