This document uses summation notation:
Σni=1xi = x1 +
... + xn
= Σni=1 Σmj=1 [xi P(x = xi and y = yj) + yj P(x = xi and y = yj)]
= Σni=1 Σmj=1 xi P(x = xi and y = yj) + Σni=1 Σmj=1 yj P(x = xi and y = yj)
= Σni=1 xi Σmj=1 P(x = xi and y = yj) + Σmj=1 yj Σni=1 P(x = xi and y = yj)
= Σni=1 xi P(x = xi) + Σmj=1 yj P(y = yj) = E(x) + E(y)
E(x1 + x2 + x3
+ x4) =
E(x1) + E(x2 + x3
+ x4)
=
E(x1) + E(x2) + E(x3 + x4) =
E(x1) + E(x2) + E(x3) + E(x4)