I'm trying to prove the following result involving conditional expectation of two r.v $X,Y$, ($\mathbb{E}[X|Y = y] = \int xf_{X|Y}(x|y)dx$) that is of course a function of variable $y$. Specifically, we call $H$ this function. Now I have the following:
For every function $G$ such that $\mathbb{E}[|G(Y)X|] < +\infty$ it holds
$$\mathbb{E}[G(Y)H(Y)] = \mathbb{E}[G(Y)X].$$
I'm having problems with the proof, also because I think that my textbook has some mistakes in terms of notation.. could anybody help me with this? Thanks
$$ \mathbb{E}[G(Y)H(Y)] = \mathbb{E}[G(Y) \mathbb{E}[X|Y]] = \mathbb{E}[\mathbb{E}[G(Y)X|Y]] = \mathbb{E}[G(Y)X] $$ The first equality is the definition of $H(Y)$. The second equality holds because since $G(Y)$ is a function of $Y$ it can be taken out of a conditional expectation on $Y$. The final equality is the tower property of conditional expectation.