# How did they derive the expression from sum of variances

I have a question in my textbook to which I do not understand the solution. Here's the solution:

1. (green) Why is i smaller than j . Since Cov(X,Y)=Cov(Y,X) by definition of covariance ? Is it supposed to be for convenience, the index?

2. (yellow, under Y) Is this supposed to be a typo? I don't understand where it came from

3. (whole expression underlined in red) How did they derive this? Also why is X not specified with indices? Since $$X_i$$ and $$X_j$$ are not the same for i not equal to j?

1. Yes, $$Cov(X,Y) = Cov(Y,X)$$ and so you end up with having to add a matrix of covariances, this connects the off-diagonal entries into one convenient block.
2. Just bad notation. Think of a typical $$(X_i,X_j)$$ pair as $$(X,Y)$$ instead.
3. Since all the $$X_i$$ are iid, they have the same variance, so $$\sum_{i=1}^n \mathop{var}(X_i) = n \mathop{var}(X)$$ and there are $$n(n-1)/2$$ entries in the second sum, so doubling the result gives what they have.
• I don't quite get what you mean by number of entries in the second sum....is it the number of pairs from a set n? – user634512 Dec 11 '19 at 18:08
• @ThePoorJew number of pairs $(i,j)$ with $i < j$. – gt6989b Dec 11 '19 at 21:51

As written it appears that the solution is showing the variance of the sum is equal to the sum of the variances. If that's the case then the book needs to be careful about the case where $$i=j$$. (https://stats.stackexchange.com/questions/31177/does-the-variance-of-a-sum-equal-the-sum-of-the-variances)

1) There is a factor of 2 to deal with the switching between $$i$$ and $$j$$

2) $$Y$$ is supposed to be a stand in variable for $$X_j \neq X_i$$

3) Presumably the $$X_i$$ are selected from the same distribution so $$\text{var}(X_i) = \text{var}(X)$$. The sum is over $$n$$ different $$X_i$$ so you get $$n\text{var}(X)$$. For the other expression the sum is $$\frac{n(n-1)}{2}$$ multiply by the factor of 2 to get their expression.

• the sum n(n-1)/2.... I don't get it, is it the number of pairs from a set n? – user634512 Dec 11 '19 at 18:07
• Yep. Essentially there are $\binom{n}{2}$ ways – Kitter Catter Dec 11 '19 at 18:09
• oh okay, i get it – user634512 Dec 11 '19 at 18:10