Let $X,Y$ be independent random variables, $f$ a bounded borel measurable function. Prove that $E(f(X,Y)|Y)=Ef(X,t)_{|t=Y}$. My approach:
I understand the RHS as "We evaluate $Ef(X,t)$ only with respect to $X$ and then we plug $Y$ in place of $t$" Is it correct? I started with LHS as I had troubles introducing $Y$ in RHS.
LHS expands as $E(f(X,Y)|Y) = \sum_{i \in I} E(f(X,Y) \mid B_i)\mathbf{1}_{B_i}$ we can fix some $B_i$ and call it $B$ and it suffices to show that $E(f(X,Y)|B) = \mathbf{1}_{B}Ef(X,t)_{|t=Y}$.
$E(f(X,Y)|B) = \frac{1}{P(\Omega \times B)}\int_{\Omega \times B} f(X, Y) \, dP = \int_{\mathbb{R} \times B'} f(x, y)g_X(x)g_Y(y)dxdy = \int_{B'} Ef(X, y)g_Y(y)dy$. I split densities because $X,Y$ are independent and $B' = \{x: Y^{-1}(x) \in B\}$.
Here I am stuck and I dont know how to proceed. How should I continue. Any help appreciated