I can't wrap my head around the way to compute conditional expectation with respect to a continuous random variable. For instance, consider a probability space $(\Omega, A, P)$, where $\Omega = [0,1]$ and $A$ is a corresponding Borel $\sigma$-algebra. Let's define random variables $X(\omega)=\omega$ and $Y=\sin (\pi \omega)$. How does one compute the expression for $\mathbb{E}(X\mid \mathcal{B})$, where $\mathcal{B}$ is the $\sigma$-algebra generated by $Y$?

If $Y$ was discrete, such as

$$

Y = \begin{cases}

1,&\omega\in[0,1/2]\\

0,&\omega\in(1/2,1]

\end{cases}

,$$

then I understand that $\mathbb{E}(X\mid \mathcal{B})$ would be equal to

$$

\mathbb{E}(X\mid \mathcal{B}) = \frac{1}{4}\mathbb{I}_{Y=1}+\frac{1}{4}\mathbb{I}_{Y=0}.

$$

However, in the continuous case I'm not so sure. My intuition suggests that it's something like $\sin^{-1}(y)/\pi$; however, then

$$

\mathbb{E}(\mathbb{E}(X\mid Y)) = \int_Y \mathbb{E}(X\mid Y)d\omega = \frac{2}{\pi}\cdot\int_0^1 \arcsin(y) dy \neq \mathbb{E}(X).

$$

## Best Answer

Using $\arcsin: [0..1]\mapsto [0..\pi/2]$

A null events described by $\{\omega\in\Omega:Y(\omega)=y\}$, (where $y\in[0..1)$ ) will contain exactly two outcomes with no bias: $$\{\omega\in\Omega:Y(\omega)=y\}=\{\arcsin(y)/\pi, 1-\arcsin(y)/\pi\}$$ Therefore $\forall y\in Y(\Omega)~,\mathsf E(X\mid Y=y)=1/2$, so since this holds for any $y$, ...$$\mathsf E(X\mid\mathcal B)=(1/2)\mathbf 1_{Y\in[0..1]}$$