# Conditional expectation with proof of linearity

I'm working on proving that

$$E(aY+bZ | X) = aE(Y|X) + bE(Z | X)$$

Where X, Y and Z are discrete random variables. Where we assume that all their (joint/marginal) probability mass functions and expectations exist

Approach:

So I figured I have to use linearity of expectations. What bugs me, is what to do with the conditional statement and the constants.

My thought is to use independence, so $$p(y|x)= p(y)$$

And the constants I thought I could move outside, since $$E(a) = a$$

Then I could proceed with the proof:

$$E(X+Y) = \sum_x \sum_y (x + y)P_{XY}(x,y)$$

$$=\sum_x \sum_y x \cdot P_{XY}(x,y) + \sum_x \sum_y y \cdot P_{XY}(x,y)$$

$$= \sum_x x \cdot \sum_y P_{XY} (x,y) + \sum_y y \cdot \sum_x P_{XY} (x,y)$$

$$= \sum_x x \cdot P_{X}(x) + \sum_y y \cdot P_{Y}(y)$$

$$= E(X) + E(Y)$$

My question is, I don't really know if I just can apply the use of independence like that and then proceed with the proof of $$E(X + Y) = E(X) + E(Y)$$?

Hope you can help!

• You need to add your definition of $E[Y\mid X]$ for a helpful and correct answer. Commented Dec 16, 2021 at 11:11

independence is not stated in the question and not needed to prove what you are requested to do.

$$\mathbb{E}[X+Y]=\mathbb{E}[X]+\mathbb{E}[Y]$$

is valid also if the rv's are not independent. Your proof is quite correct (I amended your $$E(X,Y)$$ in $$E(X+Y)$$) but it is not exactly what you are asked to do.

To prove your statement, including conditional probability and constants, simply use the definition finding

\begin{align} \mathbb{E}[aY+bZ|X] & = \sum_y\sum_z(ay+bz)p(y,z|x)\\ & = a\sum_y\sum_zyp(y,z|x)+b\sum_y\sum_zzp(y,z|x)\\ & = a\sum_y yp(y|x)+b\sum_z zp(z|x)\\ &=a\mathbb{E}[Y|X]+b\mathbb{E}[Z|X] \end{align}

• Thank you for your help! Is this proof/approach called something? So I can look it up and study it further. Commented Dec 16, 2021 at 10:35
• @bestmate21 : no, it is just a matter of applying expectation's definition Commented Dec 16, 2021 at 10:37
• This instead argues that $E[aY+bZ\mid X=x]=a E[Y\mid X=x]+bE[Z\mid X=x]$. The distinction needs to be made clear. Commented Dec 16, 2021 at 10:52
• @StubbornAtom Are you reffering to tommik's answer or the problem in general? Could you elaborate? Commented Dec 17, 2021 at 10:40