Linearity of Expectation Derivation I'm trying to understand how to prove linearity of expectation. The explanation I'm reading is:
$$E[X+aY] = \int_{(x,y)}(x+ay)p_{X,Y}dxdy$$
$$= \int_{(x,y)}xp_{X,Y}(x,y)dxdy + a\int_{(x,y)}yp_{X,Y}(x,y)dxdy$$
$$= \int_{(x)}xp_{X}(x)dx + a\int_{(y)}yp_{Y}(y)dy$$
I'm having trouble intuitively understanding how to go from the first to the second step. Mathematically why is it that I only need to worry about the PDF of $X$, and $Y$ for their respective parts rather than the joint $X,Y$ PDF?

Using the notation as in your question:$$\int_{(y)}p_{X,Y}(x,y)dy=p_X(x)$$
and $$\int_{(x)}p_{X,Y}(x,y)dx=p_Y(y)$$
So we have $$\int_{(x,y)}xp_{X,Y}(x,y)dxdy=\int_{(x)}x\left(\int_{(y)}p_{X,Y}(x,y)dy\right)dx=\int_{(x)}xp_X(x)dx$$
and similarly for the other integral. Does this answer your question?
