# Why can we interchange summation sign and Variance?

Why can we interchange the summation sign and variance sign?

$$\mathrm{Var}\left(\sum^n_{i=1} Y_i\right) = \sum^n_{i=1} \mathrm{Var}(Y_i)$$

Is there a proof for this?

-

This is not always true. However if $Y_i$ independent from $Y_j$ for every distinct pair $i,j$ (or even non-correlated) then this would hold. For that property you need $E[Y_i Y_j] = E[Y_i] E[Y_j]$ which is true if you got independent $Y$'s (and similarly for non-correlated $Y$'s since the covariance is zero.)
This is true ONLY when $Y_i \perp Y_j$ $i \neq j$. In general the formula for $Var(\sum_{i=1}^{n}a_iY_i) = \sum_{i=1}^{n}a_i^2Var(Y_i) +2\sum_{i<j}^{}a_ia_jCov(Y_i,Y_j)$
I assume $X_i = a_i Y_i$ here. –  Qiaochu Yuan Dec 3 '12 at 1:40