# What is my missing assumption is sum of variances?

In this answer, it says that in general the sum of the variances is not equal to the variance of the sum.

I tried to work it out by myself, and I think I got a different result, namely that the variance of the sum is equal to the sum of the variances. Do I have incorrect work here for random variables in general? Am I missing some assumption I made?

\begin{eqnarray*} Var(X+Y) & = & E[(X+Y)^{2}]-(E[X+Y])^{2}\\ & = & E[X^{2}+Y^{2}+XY]-(E[X]+E[Y])^{2}\\ & = & E[X^{2}]+E[Y^{2}]+E[XY]-(E[X])^{2}-(E[Y])^{2}-E[X]E[Y]\\ & = & E[X^{2}]-(EX)^{2}+E[Y^{2}]-(EY)^{2}\\ & = & Var(X)+Var(Y) \end{eqnarray*}

• You also miss something here $E[(X+Y)^2]=E(X^2+2XY+Y^2)$. Your case is correct only when $X$ and $Y$ are independent. Oct 1, 2015 at 0:04
• @DeepNorth You're saying that equation in your comment is only true when X and Y are independent?? Oct 1, 2015 at 3:01
• Yes, if $X$ and $Y$ are independent then $E(XY)=E(X)E(Y)$ then the $Cov(X,Y)=0$ Oct 1, 2015 at 3:11
• @DeepNorth Ok. I see how $E(XY) = E(X)E(Y)$ implies uncorrelatedness ( I think that's the definition of uncorrelatedness...), but I don't understand how $E[(X+Y)^2]=E(X^2+2XY+Y^2)$ implies $E(XY) = E(X)E(Y)$. The former equation seems like it's just basic algebra. Am I wrong, or misinterpreting something? Oct 1, 2015 at 3:22
• It is not from $E[(X+Y)^2]=E(X^2+2XY+Y^2)$ it is an assumption you have to make. Oct 1, 2015 at 3:45

On your third line, you implicitly assume the relation

$$E[XY] - E[X]E[Y] = 0$$

and use it to cancel the cross term. This relation is untrue for general $X$ and $Y$. Note that if it were true, it would follow that

$$E[X^2] = E[X \times X] = E[X]E[X] = E[X]^2$$

and all the other terms in your relation would also cancel. So, under your implicit assumption, you've actually shown that

$$Var(X + Y) = 0$$

Which I don't think I have to convince you is untrue.

Note that, given the general failure of

$$E[XY] - E[X]E[Y] = 0$$

it pays to measure it's failure for any given two random variables. This leads to the definition of covariance

$$Cov(X, Y) = E[XY] - E[X]E[Y]$$