How to prove this property of conditional expectation $E(X f(Y) )=E(E(X|Y)f(Y))$

52 Views Asked by At

If assume X, Y are discrete random variables and develop the left hand side get that $\begin{align} E(E(X|Y)f(Y))&=\sum_y E(E(X|Y)f(Y))P(Y=y)\\ &=\sum_y \sum_x xP(X=x|Y=y)f(Y=y)P(Y=y)\\ &=\sum_y \sum_x x\frac{P(X=x,Y=y)}{P(Y=y)}f(Y=y)P(Y=y)\\ &=\sum_y \sum_x xP(X=x,Y=y)f(Y=y)\\ &=\sum_x x\sum_y P(X=x,Y=y)f(Y=y)\\ \end{align}$

I don't know how to remove the f(y). i tried to develop that to continuos random variables but i have the same problem.

1

There are 1 best solutions below

0
On

Let $X, Y$ random variables with distribution $f_X$, $f_Y$ (and $f_{X|Y}$ distribution of $X|Y$), then $E[X]=E[E[X|Y]]$.

Proof

$\begin{align}E[E[X|Y]] &= \int E[X|Y]f_Y(y)dy \\ &=\int \left[\int xf_{X|Y}(x,y)dx \right]f_Y(y)dy\\ &=\int \int xf_{X|Y}(x,y)f_Y(y) dxdy\\ &=\int\int x f_{X,Y}(x,y)dydx \\ &=\int x\left[\int f_{X,Y}(x,y)dy \right]dx \\ &=\int xf_X(x)dx\\ &=E[X] \end{align}$

From this we can write:

$E[Xf(Y)]=E[E[Xf(Y)|Y]]=E[f(Y)E[X|Y]]$ where you can take $f(Y)$ out because it is in the expected value conditioned over a value of $Y$