# Expected value of infinite sum

$x_1, x_2, \dots, x_n, \dots$ - independent random variables.

Is it true that $$\sum_{i = 1}^{\infty}Ex_i = E(\sum_{i = 1}^{\infty} x_i)$$ ?

$E\left[\sum\limits_{i=1}^{\infty}X_i\right]=\sum\limits_{i=1}^{\infty}E[X_i]$
if $\sum\limits_{i=1}^{\infty}E[|X_i|]$ converges.
• There are cases where your desired equality does not hold. E.g. flip a fair coin repeatedly. Let $T$ be the number of flips until the first head. Let $X_i$ be $-2^i$ if $i<T$, let $X_i=2^i$ if $i=T$, let $X_i=0$ if $i>T$. Then $E[X_i] = 0$, but $\sum_i X_i = 1$ with probability 1. For two more examples, see algnotes.info/on/background/stopping-times/walds. Mar 21 '18 at 14:40