Calculating the variance of the sum of $X_n$’s

covarianceexpected valueprobabilityprobability theoryvariance

You have $n$ random variables $X_n$ which each have $\mathbb{E}(X) = 0$ and $\text{Var}(X) =1$. The pairwise correlation between any distinct of these is $\rho$.

So the variance is

$$\text{Var}\left(\sum_{i=1}^{n} X_i\right) = \sum_{i=1}^n \text{Var}(X_i) + \sum_{i \neq j}\text{Cov}(X_i,X_j)$$

Now $\text{Cov}(X_i,X_j)= \rho \times \sigma_X \times \sigma_Y = \rho$. So,

$$\text{Var}\left(\sum_{i=1}^{n}X_i\right) = n-1+ \sum_{i=1,i \neq j}(n-1)\rho = n-1 + (n-1)^2\rho$$

Is this correct? The double sum is throwing me a bit.

Best Answer

$\newcommand{Cov}{\operatorname{Cov}}$ $\newcommand{Var}{\operatorname{Var}}$ The formula states $$\Var\left(\sum_{i=1}^nX_i\right)=\sum_{i=1}^n\Var(X_i)+\sum_{i\neq j}\Cov(X_i,X_j).$$ If the double sum is confusing you, it might be worth writing it out in full for small values of $n$, e.g. \begin{align*} \Var(X_1+X_2)=\Var(X_1)&+\Var(X_2)+\Cov(X_1,X_2)+\Cov(X_2,X_1) \\ \Var(X_1+X_2+X_3)= \Var(X_1)&+\Var(X_2)+\Var(X_3)\\ &+\Cov(X_1,X_2)+\Cov(X_2,X_1) \\ &+\Cov(X_2,X_3)+\Cov(X_3,X_2) \\ &+\Cov(X_3,X_1)+\Cov(X_1,X_3). \end{align*} You'll note that the double sum is over all ordered pairs $(i,j)$ with $i\neq j$ as $i,j$ each vary between $1$ and $n$. So we want to know the number of such pairs (which is the number of lots of $\rho$ that we are summing).

There are $n$ choices for $i$ (namely $1,2,\dots,n$). Given an $i$, there are then a further $n-1$ choices for $j$ s.t. $i\neq j$. So we have $n(n-1)$ terms in the double sum.

Putting everything together, you get a final answer of $\boxed{n+n(n-1)\rho}$.

Related Question