I am looking for a concrete example of the following: $(X,Y)$ are real-valued random variables such that:
- $E[Y|X]$ is smooth
- $E[X|Y]$ is discontinuous
Even better, I'd like to see an example where all densities exist: $p(x,y)$, $p(x|y)$, etc.
I am looking for a concrete example of the following: $(X,Y)$ are real-valued random variables such that:
Even better, I'd like to see an example where all densities exist: $p(x,y)$, $p(x|y)$, etc.
Suppose $T$ is uniformly distributed on $(-\pi/2,\pi/2)$.
Let $X=\tan(T)$, $Y=\sin(2T)$, so that the parametric graph of $(X,Y)$ looks like:
Then $Y = 2X/(1+X^2)$, so $E[Y|X]$ is smooth. But
$$E[X|Y]= \begin{cases} 1/Y \text{ if }Y \neq 0\\ \ \ 0 \ \ \text{ if } Y = 0 \end{cases}$$ which is discontinuous.
This comes from calculating $E[X|Y]$ is (the limit of) a weighted average of the two solutions for $y=2x/(1+x^2)$: $$\left\{\frac{1-\sqrt{1+y^2}}y,\frac{1+\sqrt{1-y^2}}y\right\},$$ where the weights are the relative probabilities that $(\tan(T),\sin(2T))$ is in the range $((1-\sqrt{1+y^2})/y\pm\delta,y\pm\epsilon)$ or in the range $((1+\sqrt{1+y^2})/y\pm\delta,y\pm\epsilon)$. The second range of $T$'s is just $\pm\pi/2$ minus the first range, so the probabilities are equal, and the average is equally weighted, which yields the simple formula.