"expectation of sum is sum of expectation", is this claim true? if yes, how to justify this claim?

12.9k Views Asked by At

this post is saying

linearity of expectation gives following equation $$\mathbb{E} [\sum_{j\neq i} Y_i Y_j] = \sum_{j\neq i} \mathbb{E} [Y_i Y_j]$$

per wiki, Linearity of Expected_value is saying

$$ {\displaystyle {\begin{aligned}\operatorname {E} [X+Y]&=\operatorname {E} [X]+\operatorname {E} [Y],\\[6pt]\operatorname {E} [aX]&=a\operatorname {E} [X],\end{aligned}}}$$

where $X$ and $Y$ are arbitrary random variables, and $a$ is a constant.

is not saying some rules like "expectation of sum is sum of expectation"

this post is saying

expectation of sum of something = sum of expectation of something even when the items involved are not independent.

how to justify this claim?

2

There are 2 best solutions below

1
On

When $E[X_1], E[X_2], \dots, E[X_n]$ exist $${\displaystyle {\begin{aligned} E [\sum_{i=1}^n X_i] &= E[X_1+X_2+\dotsb+X_n] \\ &= E[X_1]+E[X_2]+\dotsb+ E[X_n] \\ &= \sum_{i=1}^n E [X_i] \end{aligned}}}$$

0
On

I am happy to declare that this is true, even if X and Y are dependent. This is a consequence of linearity, (just like how $\mathbb{E}[cX]=c\mathbb{E}[X]$, always). Here is the proof for two random variables (but you may apply induction for $n$ variables). \begin{align*} \mathbb{E}[X+Y]&=\sum\limits_x\sum\limits_y[(x+y)P(X=x,Y=y)]\\ &=\sum\limits_x\sum\limits_y[xP(X=x,Y=y)]+\sum\limits_x\sum\limits_y[yP(X=x,Y=y)]\\ &=\sum\limits_x x\sum\limits_y[P(X=x,Y=y)]+\sum\limits_y y\sum\limits_x[P(X=x,Y=y)]\\ &=\sum\limits_x xP(X=x)+\sum\limits_y yP(Y=y)\\ &=\mathbb{E}[X]+\mathbb{E}[Y] \end{align*} Another note that I will add is that this is with discrete random variables. You can, of course, do this in the continuous random variables, except you will use integrals instead of sums!

This is quite a powerful result when you are evaluating expectations and variances and whatnot, but remember that with great power comes great responsibility! ;)