How to check the first condition for a random variable involving integration to be the conditional expectation

20 Views Asked by At

I find an exercise here(Example 5). Let $(X,Y)$ be a couple of real random variables with density $f:\mathbb{R^2}\rightarrow \mathbb{R_+}$. Assume that for all $y$, the marginal density function at $Y=y$ is always positive. Let $g:\mathbb{R}\rightarrow \mathbb{R}$ be a measurable function such that $g(X)\in L^1(\Omega)$. Show that $$E[g(X)|Y]=h(Y)$$ with $$h(y)=\frac{\int_\mathbb{R}g(x) f(x,y) \mathrm{d}x}{\int_\mathbb{R}f(x,y) \mathrm{d}x}$$

We need to prove two things. First, check that $h(Y)$ is measurable w.r.t. $\sigma(Y)$. Second, show that for any set $A\in \sigma(Y)$, it holds that $E[h(Y)1_A]=E[g(X)1_A]$. I understand the proof of the second step, but have no idea how to prove the first step. It suffices to show that $h(y)$ is Borel measurable. However, $h(y)$ contains an integral, which I am not able to evaluate.

Any comments or ideas are welcome.

Remark The second step is proved using the joint density function: For any $A\in \sigma(Y)$, we can find a borel set $B$ such that $1_A=1_B(Y)$. Then $$ E[h(Y)1_A]=E[h(Y)1_B(Y)] =\int_B\int_\mathbb{R} h(y)f(x,y) \mathrm{d}x\mathrm{d}y=\int_B \mathrm{d}y\int_\mathbb{R} g(z)f(z,y) \mathrm{d}z =E[g(X)1_B(Y)] $$