Uniform distribution with unknown interval boundary Suppose that a random variable $Y$ is uniformly distributed on the interval $[-a,a]$, with $a > 0$. Suppose that the random variable $X$ is uniformly distributed on the (stochastic) interval $[-|Y|,|Y|]$, where $Y$ is introduced as above. How can we find $\mathbb{E}[X\mid Y]$ and $\mathbb{E}[|X|]$? Thanks a lot.

Conditionally on $Y$, $X$ is uniformly distributed on the interval $[-|Y|,|Y|]$, and that distribution is symmetric about $0$, so $\operatorname{E}(X\mid Y)=0$ regardless of the value of $Y$.
Conditionally on $Y$, $|X|$ is uniformly distributed on the interval $[0,|Y|]$.  To see that, observe that for $0\le x\le |Y|$ we have
$$
\Pr(|X|\le x\mid Y)=\Pr(-x\le X\le x\mid Y) = \frac{\text{length of }[-x,x]}{\text{length of }[-|Y|,|Y|]} = \frac x {|Y|}.
$$
So $\operatorname{E}(|X|\mid Y) = \dfrac {|Y|}2$.
Finally, $\operatorname{E}(|X|) = \operatorname{E}(\operatorname{E}(|X| \mid Y) = \operatorname{E}(|Y|/2) = \dfrac a 4.$
