Is every measurable function the conditional expectation of some random variable

conditional-expectationmeasure-theoryprobability theory

Let $X$ and $Y$ be two random variables defined on the same probability space $(\Omega,\mathcal F,\mathbb P) $ and taking value respectively in $\mathcal X:=[0,1]^d$ and $\mathcal Y:=\{-1,+1\}$. Denote by $\rho $ the joint law of $(X,Y) $.

Because the conditional expectation $\mathbb E_{(X,Y)\sim\rho}[Y\mid X] $ exists, we can consider the map $\varphi : x\in[0,1]^d \mapsto \mathbb E_{(X,Y)\sim\rho}[Y\mid X=x]$ which is measurable and $[-1,1]$-valued.

My question concerns the converse statement : given a measurable map $\eta:[0,1]^d\to[-1,1]$, when does there exist a distribution $\varrho $ on $\mathcal X\times\mathcal Y $ such that $\eta(x) = \mathbb E_{(X',Y')\sim\varrho}[Y'\mid X'=x] $ ? And when it does exist, can it be expressed "explicitly" in terms of $\eta$ ?

Best Answer

Consider any probability space $(\Omega, \mathcal{F}, \mathbb{P})$ ample enough to host two independent random variables $X$ and $U$ on it, where

$$ X \sim \text{Uniform}(\mathcal{X}) \qquad\text{and}\qquad U \sim \text{Uniform}([-1,1]). $$

Then define $Y$ as

$$ Y = \mathbf{1}[U \leq \eta(X)] - \mathbf{1}[U > \eta(X)] = \begin{cases} 1, & U \leq \eta(X), \\ -1, & U \geq \eta(X) \end{cases} $$

We claim that $\mathbb{E}[Y\mid X=x] = \eta(x)$ for a.e. $x$ (with respect to the Lebesgue measure). Indeed, for a.e. $x$, we have

\begin{align*} \mathbb{E}[Y \mid X = x] &= \mathbb{E}[ \mathbf{1}[U \leq \eta(X)] - \mathbf{1}[U > \eta(X)] \mid X = x] \\ &= \mathbb{E}[ \mathbf{1}[U \leq \eta(x)] - \mathbf{1}[U > \eta(x)] ] \\ &= \mathbb{P}[U \leq \eta(x)] - \mathbb{P}[U > \eta(x)] \\ &= \tfrac{1}{2}(1+\eta(x)) - \tfrac{1}{2}(1-\eta(x)) \\ &= \eta(x). \end{align*}

Related Question