# Conditional Expectation - $E[f(X,Y)|Y]$

I'm trying to prove the following:

Let X and Y be independent random variables on $$(\Omega, \mathcal{A}, P)$$ with images $$(\Omega_X, \mathcal{A}_X)$$, $$(\Omega_Y, \mathcal{A}_Y)$$ and $$f: \Omega_X \times \Omega_Y \rightarrow \mathbb{R}$$ integrable. Show that $$E[f(X,Y)|Y] = \int f(x,Y) \space \space P^X(dx)$$ I think that I understand why this is true on an intuitive level, but I just can't seem to prove this using the formal definition of conditional expectation. I've been trying to show $$\int_A \int f(x,Y) \space \space P^X(dx) \space \space dP = \int_A f(X,Y) \space \space dP$$ for every $$A \in \sigma(Y)$$. Any hints on how to approach this would be very much appreciated - thanks in advance.

For suitable $$g:\Omega_Y\to\mathbb R$$ we find:
\begin{aligned}\mathbb{E}\left[g\left(Y\right)\int f\left(x,Y\right)P^{X}\left(dx\right)\right] & =\int g\left(y\right)\int f\left(x,y\right)P^{X}\left(dx\right)P^{Y}\left(dy\right)\\ & =\int\int g\left(y\right)f\left(x,y\right)P^{X}\left(dx\right)P^{Y}\left(dy\right)\\ & =\int\int g\left(y\right)f\left(x,y\right)P^{X}\otimes P^{Y}\left(d\left(x,y\right)\right)\\ & =\int\int g\left(y\right)f\left(x,y\right)P^{\left(X,Y\right)}\left(d\left(x,y\right)\right)\\ & =\mathbb{E}\left[g\left(Y\right)f\left(X,Y\right)\right] \end{aligned}where the $$4$$-th equality is based on independence of $$X$$ and $$Y$$.
This states that indeed: $$\int f\left(x,Y\right)P^{X}\left(dx\right)=\mathbb{E}\left[f\left(X,Y\right)\mid Y\right]$$
• So setting $g(y) = \mathbb{1}_{Y(A)} (y)$ for any $A \in \sigma(Y)$ would yield the final result? Jun 1, 2019 at 14:43
• The fact that this works whenever $g$ is an indicator function is indeed sufficient. Jun 1, 2019 at 14:45