# Variance of sum of dependent random variables

Can you guys help me prove the following:

$$\operatorname{Var}\left[\frac{1}{m}\sum_{i=1}^my_i\right]=\frac{1}{m}(1-\rho)\sigma^2+\rho\sigma^2$$

where the sampled predictions ($$y_is$$) have variance $$\sigma^2$$ and correlation $$\rho$$.

Note: $$y_is$$ are NOT independent. We have a dependent sample.

It's quite easy to prove this once you understand the relationship between the covariance and correlation and if you recognize that the variances for both $$Y_i$$ and $$Y_j$$ are identically $$\sigma^2$$:
$$\begin{eqnarray*} V\left[\frac{1}{m}\sum_{i=1}^{m}y_{i}\right] & = & \frac{1}{m^{2}}\left[\sum_{i=1}^{m}V(y_{i})+\sum_{i=1}^{m}\sum_{i\ne j}^{m}Cov(y_{i},y_{j})\right]\\ & = & \frac{1}{m^{2}}\left[\sum_{i=1}^{m}\sigma^{2}+\sigma^{2}\sum_{i=1}^{m}\sum_{i\ne j}^{m}\frac{Cov(y_{i},y_{j})}{\sigma^{2}}\right]\\ & = & \frac{1}{m^{2}}\left[m\sigma^{2}+\sigma^{2}\sum_{i=1}^{m}\sum_{i\ne j}^{m}\rho\right]\\ & = & \frac{1}{m^{2}}\left[m\sigma^{2}+\sigma^{2}(m^{2}-m)\rho\right]\\ & = & \frac{\sigma^{2}}{m}+\frac{\sigma^{2}(m-1)\rho}{m}\\ & = & \frac{\sigma^{2}}{m}+\frac{\sigma^{2}\rho m}{m}-\frac{\sigma^{2}\rho}{m}\\ & = & \frac{\sigma^{2}-\sigma^{2}\rho}{m}+\rho\sigma^{2}\\ & = & \frac{\left(1-\rho\right)\sigma^{2}}{m}+\rho\sigma^{2}\\ & = & \frac{1}{m}\left(1-\rho\right)\sigma^{2}+\rho\sigma^{2}\,\,\,\,\,\,\,\,\,\blacksquare \end{eqnarray*}$$
• @Kuo, I think I got sloppy with the notation and substituted $X_i$, and $X_j$ for $Y$. I'll correct this. Thanks for catching this. Jul 26, 2023 at 15:51