Calculating conditional expectation $E[X^2\mid |Y(x)|]$

64 Views Asked by At

Let $\Omega=[0,1]$, $X(x)=x^2$ and $Y(x)=1-|2x-1|$ with Lebesgue measure. I want to calculate $E[X\mid Y]$

My work so far

Notice that :

For $x \in [0,\frac12)$ we have $Y(x)=2x$

For $x \in [\frac12,1]$ we have $Y(x)=2-2x$

Let's consider first case

$$E[X\mid Y=2x]=\frac{1}{P(Y=2x)}\int_{\{Y=2x\}}x^2=2\cdot \int_0^\frac{1}{2}x^2=\frac{1}{12}$$

Using analogous way of thinking :

$$E[X\mid Y=2-2x]=\frac{1}{P(Y=2-2x)}\int_{\{Y=2-2x\}} x^2 = 2 \cdot \int_{\frac{1}{2}}^1x^2 = \frac{2}{3}$$

Am I correct with such justification ?