# Compute the variance of $\bar X$ given $\mathrm{Cov}[X_i,X_j]$

Let $\{X_i\}_{1\le i\le n}$ be a sample of dependent random variables with $X_i\sim\mathscr N(\mu,\sigma^2)$ and $\mathrm{Cov}[X_i,X_j]=\rho\sigma$ for $i\neq j$. Find the mean and variance of $\bar X=\frac1n\sum\limits_{i=1}^nX_i$.

Computing the mean is easy:

$$\mathrm E\big[\bar X\big]=\mathrm E\bigg[\frac1n\sum_{i=1}^nX_i\bigg]=\frac1n\sum_{i=1}^n\mathrm E\big[X_i\big]=\frac{n\mu}n=\mu$$

Computing the variance, however, I find a bit confusing. I don't think I neglected anything in my work, but I have a nagging feeling that I might have. I know that

$$\mathrm V\big[\bar X\big]=\mathrm E\big[\bar X^2\big]-\mathrm E\big[\bar X\big]^2=\mathrm E\big[\bar X^2\big]-\mu^2$$

so here's what I've done to compute the mean of $\bar X^2$:

\begin{align*} \mathrm E\big[\bar X^2\big]&=\mathrm E\Bigg[\frac1{n^2}\left(\sum_{i=1}^n{X_i}^2+2\sum_{1\le i<j\le n}X_iX_j\right)\Bigg]\\[1ex] &=\frac1{n^2}\left(\sum_{i=1}^n\mathrm E\big[{X_i}^2\big]+2\mathrm \sum_{1\le i<j\le n}\mathrm E[X_iX_j]\right)\\[1ex] &=\frac1{n^2}\left(\sum_{i=1}^n\left(\mathrm V[X_i]+\mathrm E[X_i]^2\right)+2\sum_{1\le i<j\le n}\left(\mathrm{Cov}[X_i,X_j]+\mathrm E[X_i]\mathrm E[X_j]\right)\right)\\[1ex] &=\frac1{n^2}\left(\sum_{i=1}^n(\sigma^2+\mu^2)+2\sum_{1\le i<j\le n}(\rho\sigma+\mu^2)\right)\\[1ex] &=\frac{n(\sigma^2+\mu^2)+2\frac{n(n-1)}2(\rho\sigma+\mu^2)}{n^2}\\[1ex] &=\mu^2+\frac{n-1}n\rho\sigma+\frac{\sigma^2}n \end{align*}

Is this derivation correct?

• Yes. Quite simply, \begin{align} V(\bar X)&=\frac{1}{n^2}V\left(\sum_{i=1}^n X_i\right) \\&=\frac{1}{n^2}\left[\sum_{i=1}^nV(X_i)+2\sum_{i<j}\operatorname{Cov}(X_i,X_j)\right] \\&=\frac{1}{n^2}\left[n\sigma^2+2\binom{n}{2}\rho\sigma\right] \\&=\frac{(n-1)\rho\sigma}{n}+\frac{\sigma^2}{n} \end{align} Commented Aug 22, 2018 at 20:08

• I appreciate the confirmation. I actually did try the method you suggested/demonstrated in StubbornAtom's comment, but had made a mistake at some point and the $\mu^2$-s never ended up canceling, so I backtracked with this approach and got it right this time. Commented Aug 22, 2018 at 20:32