Sorry if the title is confusing. I am studying this property: $$ \mathbb{E}[\mathbb{E}(Y|W)|X] = \mathbb E[Y|X] $$ where $X=f(W)$, and I don't really know if I am proving it right.
Here's my proof:
$$
\begin{align}
\mathbb{E}[\mathbb{E}(Y|W)|X]
&= \mathbb{E}\left[ \int_\mathbb R y \frac{f_{WXY}(w,x,y)} {f_{WX}(w,x)} dy \big|X \right]\\
&=\int_\mathbb R\int_\mathbb R y \frac{f_{WXY}(w,x,y)} {f_{WX}(w,x)} dy
\frac {f_{WX}(w,x)} {f_X(x)} dw \\
\end{align}
$$
and so the $f_{WX}$'s cancel out and we have
$$
\begin{align}
&=\int_\mathbb R\int_\mathbb R y \frac{f_{WXY}}{f_X}dydw = \int_\mathbb R y\frac{f_{XY}}{f_X}dy=\mathbb E(Y|X)
\end{align}
$$
Am I getting anything wrong here?
What makes me unsure about my proof is the first step, i.e. writing
$$
\mathbb{E}(Y|W) = \int_\mathbb R y \frac{f_{WXY}(w,x,y)} {f_{WX}(w,x)} dy
$$
But I am not able to prove it otherwise.
Thank you.