Expected value of conditional probability
I'm working on a proof.
If X and Y are independent, then
$E(Y|X) = E(Y)$
X, Y are discrete random variables. And we assume that their joint marginal probability mass functions and expectations exists.
I'm pretty lost. My initial idea is to use the following definition:
$E(g(Y_1) | Y_2=y_2) = \sum_{all\;y_1} g(y_1)p(y_1|y_2)$
Should I use that, and if I should, how to proceed?
Hope you can help!
the proof is quite immediate
$$E(Y|X)=\Sigma_y y\cdot p(y|x)=\Sigma_y y \cdot p(y)=E(Y)$$
this because by independence $p(y|x)=p(y)$