Expected value of conditional expected value

41 Views Asked by At

We know that $E[E[X|Y]] = E[X]$, does this hold for all RVs $Y$ or is this is just if $X,Y$ are independent. In particular does this hold for $E[X | X+Y]$ where $X,Y$ are independent?

I'm wondering because in this paper https://arxiv.org/pdf/1711.01682.pdf#page=59 the author says that for $E[Xg(Y)] / E[g(Y)^2]$ the cauchy schwarz inequality says that the optimal function $g^*(Y) = E[X|Y]$ where $Y = X+G$ with $G \sim \mathcal N(0,1)$. Is this because $E[XE[X|Y]] = E[XX] = E[E[X|Y]E[X|Y]]$ thus $E[Xg^*(Y)] / E[g^*(Y)^2] = E[g^*(Y)^2]$?