Consider the probability space $\Omega = (-1,1)$ with the Borel-sigma algebra $\mathcal{B}((-1,1))$ with the uniform distribution $\mathcal{U}((-1,1))$ as probability measure. Now let $X$ and $Y$ be random variables on this space with
\begin{equation} X(x) = \max[0,x], Y(x) = x^{2}, ~~x \in(-1,1). \end{equation} We have to compute $\mathbb{E}(X|Y)$ and $\mathbb{E}(Y|X)$. I don't really understand the concept of conditional expectation. How should I begin? Anyone can help?
Let $P$ denote the uniform measure. [$P$ is just Lebesgue measure divided by 2]. $E(X|Y)$ can be expressed as a measurable function of $Y$, say $f(Y)$. We have to determine $f$ from the relation $EXI_{\{Y\leq t\}} =Ef(Y)I_{\{Y\leq t\}}$ for all $t \in \mathbb R$. This gives $\int_0 ^{\sqrt t} x \, dP(x)=\int_{-\sqrt t}^{\sqrt t} f(x^{2}) \, dP(x)=2\int_{0}^{\sqrt t} f(x^{2}) \, dP(x)$. Put $u=x^{2}$ in the last integral. we get $\int_{0}^{\sqrt t} f(x^{2}) \, dP(x)=\int_0^{t} f(u) \frac 1 {2\sqrt u}\, dP(u)$. Thus $\int_0 ^{\sqrt t} x \, dP(x)=2\int_0^{t} f(u) \frac 1 {2\sqrt u}\, dP(u)$ for all $t$. Now differentiate both sides with respect to $t$ to find $f$. You will get $f(t)=\frac {\sqrt t} 2$. Hence $E(X|Y)=\frac {\sqrt Y} 2$. This procedure is quite general and you can use the same method for $E(Y|X)$.