# What is the variance of the difference of two means?

I'm trying to express $$\mathrm{Var}(\mu_x - \mu_y)$$ in terms of $$\rho$$, $$\sigma_x$$ and $$\sigma_y$$, where $$\mu$$ denotes the mean of the random variable.

Firstly:\begin{align*} \mathrm{Var}\left(\sum_{i=1}^n x_i - \sum_{i=1}^n y_i\right) &= \mathrm{Var}\left(\sum_{i=1}^n(x_i-y_i)\right) \\ &=\sum_{i=1}^n \mathrm{Var}(x_i) + \sum_{i=1}^n\mathrm{Var}(y_i) - \sum_{j=1}^n\sum_{i=1}^n 2\mathrm{Cov}(x_i, y_j) \\ &= n\sigma^2_x + n\sigma^2_y - n^2(2\rho\sigma_x\sigma_y) \end{align*} So \begin{align*} \mathrm{Var}\left(\frac 1n\sum_{i=1}^n x_i - \frac 1n\sum_{i=1}^n y_i\right) &= \mathrm{Var}\left(\frac 1n\left(\sum_{i=1}^n(x_i - y_i)\right)\right) \\ &= \frac 1{n^2}\left(n\sigma^2_x + n\sigma^2_y - n^2(2\rho\sigma_x\sigma_y)\right) \\ &= \frac 1n(\sigma^2_x + \sigma^2_y - n2\rho\sigma_x\sigma_y) \end{align*} However, in my applied econometrics textbook, the Wald test for $$\mu_x = \mu_y$$ uses $$\mathrm{Var}(\mu_x - \mu_y) = \frac1n(\sigma^2_x + \sigma^2_y - 2\rho\sigma_x\sigma_y)$$, so where have I made a mistake?

• The population means are constants, so the variance of their difference is 0 Apr 5, 2019 at 9:21
• Yes, should I edit my question? I was concerned that the answer would not align if I did that. Apr 5, 2019 at 10:16

Your textbook probably assumes the data to be independent across individuals, thus $$\mathrm{Cov}(x_i,y_j)=0$$ for $$i\neq j$$. Also, you mean the sample mean and not the mean. The mean of a random variable is just a number and its variance is zero.