A question about expectation calculation

51 Views Asked by At

Let $X$ and $Y$ be two random variables.

I notice a book states $E(X + Y) = E(X) + E(Y)$ without proof.

I think, for the simplest case, the proof can be the following:- $E(X + Y) = \sum p_i (X + Y) = \sum (p_i X + p_iY) = \sum (p_i X) + \sum (p_i Y) = E(X) + E(Y)$.

But what happens if the corresponding probabilities for Y are $q_i$ and $p_i \ne q_i$ in general?

1

There are 1 best solutions below

2
On BEST ANSWER

Note: for the sake of simplicity I will write $f(x,y)$ instead of $f_{XY}(x,y)$. The following proof is in the continuous case, but similar proof is in discrete case or in general

$$\mathbb{E}[X+Y]=\int_{-\infty}^{+\infty}\int_{-\infty}^{+\infty}(x+y)f(x,y)dxdy=\int_{-\infty}^{+\infty}\int_{-\infty}^{+\infty}xf(x,y)dxdy+\int_{-\infty}^{+\infty}\int_{-\infty}^{+\infty}yf(x,y)dxdy=$$

$$\int_{-\infty}^{+\infty}xf(x)dx\underbrace{\int_{-\infty}^{+\infty}f(y|x)dy}_{=1}+\int_{-\infty}^{+\infty}yf(y)dx\underbrace{\int_{-\infty}^{+\infty}f(x|y)dx}_{=1}=\mathbb{E}[X]+\mathbb{E}[Y]$$

EDIT: Discrete case

$$\mathbb{E}[X+Y]=\sum_x\sum_y (x+y)p(x,y)=...$$