Computing the confidence interval for two samples but getting slightly different answers Consider two samples $X_1,..,X_k$ and $Y_1,..,Y_m$ where $X_i \sim \mathcal{N}(\mu_x,\,\sigma^{2})\,$ and  $Y_i \sim \mathcal{N}(\mu_y,\,\sigma^{2})\,.$ Say $k=m=100$ and $k+m=n$. Say that the estimated variance and means are $\hat{\sigma}^{2}=11300,\hat{\mu_x}=16215,\hat{\mu_y}=15669$
I am interested in the $95$ percent confidence interval of the difference of the means. This is given as:
$16215-15669\pm  t_{df=198,1-\frac{\alpha }{2}=0.975}\cdot\sqrt{11300}\cdot \sqrt{\frac{1}{100}+\frac{1}{100}}=(575.64,516.35)$
I wanna know why I don't get the same interval but a slightly different one when 
when I consider  $X_i-Y_i \sim \mathcal{N}(16215-15669,\,2 \sigma^{2})\,.$ and try to build a confidence interval from this and not $X$ and $Y$ seperated. The random variable, $X_i-Y_i$ have now $100$ observations. The $95$ percent confidence interval will be:
$16215-15669\pm  t_{df=99,1-\frac{\alpha }{2}=0.975}\cdot\frac{\sqrt{2 \cdot 11300}}{\sqrt{100}}=(575.82, 516.17)$
Can someone help me understand the reason of the difference?
 A: I will suppose that $X_1,\ldots,X_k$ is i.i.d., $Y_1,\ldots,Y_m$ i.i.d. and $X_i$ is independent of $Y_j$ for every i,j. There is no reason for the intervals to be the same. They are different approaches to create a confidence interval for $\Delta = \mu_X-\mu_Y$.
Notice that you used the same estimator for the variance in both cases, but they are actually different in each case:
$\textbf{(i)}$ In the first case, the estimator for the variance is the pooled variance:
$$S_p^2 = \frac{(k-1)S_x + (m-1)S_y}{k+m-1} \overset{k = m}{=} \frac{S_x+S_y}{2}\quad,$$
where
$$S_x^2 = \frac{1}{k-1}\sum_{i=1}^k(X_i-\bar{X})^2$$
and
$$S_y^2 = \frac{1}{m-1}\sum_{i=1}^m(Y_i-\bar{Y})^2\quad.$$
Taking k=m=100, we will have that $\frac{\bar{X}-\bar{Y}}{\sqrt{S_p^2}\sqrt{\frac{1}{100} + \frac{1}{100}}} \sim t_{198;0.975}$.
$\textbf{(ii)}$ In the second case, that only exists when k=m, the variance estimator is the sample variance for the difference
$$2\hat{\sigma}^2 = \frac{1}{k-1}\sum_{i=1}^k( (X_i-Y_i) - (\bar{X} - \bar{Y}) )^2 \overset{algebra}{=} 2S_p^2 - \frac{2k}{k-1}\widehat{Cov}(X,Y)\quad,$$
where
$$\widehat{Cov}(X,Y) = \frac{1}{k}\sum_{i=1}^k(X_i-\bar{X})(Y_i-\bar{Y})\quad.$$
Then we will have that $\frac{\bar{X}-\bar{Y}}{\sqrt{\frac{2\hat{\sigma}^2}{100}}} \sim t_{99;0.975}$.
The degrees of freedom are also different: In the first case you are estimating three quantities: $\mu_x,\mu_y$ and $\sigma^2$; in the second one you are estimating two quantities: $\Delta = \mu_x - \mu_y$ and $\sigma^2$.
Intuitively, I would expect the first procedure to be the best one in the sense of producing smaller lengths confidence intervals for a fixed coefficient. I think this is the case because, when passing from the first setting for the second one, you are "losing information" about the correlation of $X$ and $Y$. But again, I do not have a mathematical proof for this assertion.
I did some simulations and it appears to be so in most cases, but there is a small probability of the second method producing a confidence interval of smaller length.
