# Conditional expectation (random variables on $\Omega=[0,1]$)

Let $(\Omega,\mathcal{F},\mathbb{P})$ be a probability space, where $\Omega=[0,1]$, $\mathcal{F}$ is a $\sigma$-algebra generated by Borel sets in $[0,1]$ and $\mathbb{P}$ is the Lebesgue measure on $\Omega$. Find $\mathbb{E}(X|Y)$, if $X(\omega)=2\omega^2,Y(\omega)=2$ for $\omega\in[0,1/2]$ and $\omega$ for $\omega\in(1/2,1]$.

If we try to assume that $\mathbb{E}(X|Y)$ "imitates" $Y$ (constant on $[0,1/2]$) we can find this constant by computing $\mathbb{E}(\mathbb{E}(X|Y)\cdot\mathbb{1}_{B})$ and setting equal to $\mathbb{E}(X\cdot\mathbb{1}_{B})$, where $B=[0,1/2]\in\sigma(Y)$. As for the behavior of $\mathbb{E}(X|Y)$ on $(1/2,1]$, my intuition is that it will be the same as $X$, since $X$ and $Y$ generate the same $\sigma$-algebras when restricted to that interval. Is this the correct intuition?

-

I think your intuition is correct. In fact, it can be easily deduced that $$\sigma(Y)=\sigma\Big([0,\textstyle{\frac12}],\mathscr B\big((\textstyle{\frac12},1]\big)\Big)$$ where $\mathscr B$ denotes the Borel $\sigma$-algebra. Setting $Z=\mathbb E(X|Y)$, by definition $Z$ is $\sigma(Y)$-measurable, so that it is constant on $[0,\frac12]$, as indeed $Y$ is. The value of $Z$ on $[0,\frac12]$ can be found using the properties of conditional expectation, namely that $$\tag{P} \int_B Z\,{\rm d}\mathbb P = \int_B X\,{\rm d}\mathbb P \quad \forall B\in\sigma(Y)$$ Choosing $B=[0,\frac12]$ and letting $\lambda=Z_{|_B}$ be the value of $Z$ on $B$ (remember that $Z$ is constant on such $B$), you have that $$\lambda = Z_{|_B} = 2\int_{[0,\frac12]} \hspace{-12pt}X\,{\rm d}\mathbb P$$ as you said.
Now, it follows from (P) that $$\int_B Z\,{\rm d}\mathbb P = \int_B X\,{\rm d}\mathbb P \quad \forall B\in\mathscr B\big((\textstyle{\frac12},1]\big)$$ which implies that $Z=X$ a.s. on $(\frac12,1]$ (since $X$ is $\mathscr B\big((\frac12,1]\big)$-measurable), and again it proves you right.
To sum up, $\mathbb E(X\mid Y)=\frac16\,\mathbf 1_{Y=2}+2Y^2\,\mathbf 1_{Y\leqslant1}$.