# E[X|Y] and E[Y|X]

Suppose $$x, y$$ are random variables jointly distributed on $$[0,1]^2$$. The marginal distribution of $$x$$ is uniform. It is also known that $$E[y]=E[x]=\frac12$$ and $$E[x|y]=y$$, so $$y$$ second-order stochastically dominates $$x$$. We also know that $$E[y|x]$$ is non-decreasing in $$x$$ (not sure whether this is helpful.)

I am trying to further characterize $$E[y|x]$$. It seems that the following might be true for any $$c\in[0,1]$$ but I have no idea how to prove it:

$$\int_0^c E[y|x]dx\ge \int_0^c xdx$$.

Imagine if $$x$$ and $$y$$ are independent, then $$LHS=\frac12c\ge\frac12 c^2=RHS$$. Imagine if $$y$$ reveals $$x$$ completely, then $$E[y|x]=E[E[x|y]|x]=x$$. Moreover, the inequality seems to be true if $$y$$ is a function of $$x$$.

• @Minkov, this must be one of the most useless edits on MO, and removing the thanks at the end of the post is even rude. I bet those who approved it didn't think too much about it. – Alex M. May 11 at 16:46
• @AlexM. I am sorry that you felt this way. I have retracted my revision. As a moderator, you may find this useful: mathoverflow.net/help/someone-answers ("Please do not add a comment on your question or on an answer to say "Thank you"".) – Minkov May 13 at 6:35

## 1 Answer

Your conjecture is true. Indeed, take any $$c\in[0,1]$$. Then $$\int_0^c E(y|x)\,dx=Ey1_{x\le c}\quad\text{and}\quad Ex1_{x\le c}=\int_0^c x\,dx=c^2/2,$$ because $$x$$ is uniform on $$[0,1]$$. Next, $$E(x-y)1_{y\le c}=0,$$ because $$E(x|y)=y$$. Also (which is the key point), $$(y-x)(1_{x\le c}-1_{y\le c})\ge0.$$ So, \begin{align} &\int_0^c E(y|x)\,dx-c^2/2+0 \\ &=Ey1_{x\le c}-Ex1_{x\le c}+E(y-x)1_{y\le c} \\ &=E[(y-x)(1_{x\le c}-1_{y\le c})]\ge0, \end{align} whence $$\int_0^c E(y|x)\,dx\ge c^2/2,$$ as claimed.

• Thank you! Just one typo: in the third-to-last equation, it should be "...+E(x-y)1..." – Lemma1 May 14 at 7:38
• Well, I don't see a typo. The last term in the three-line display should be (and is) written as $+E(y-x)1_{y\le c}$, for the last equality in that display to be obvious. However, this term indeed equals its opposite, $E(x-y)1_{y\le c}$, because the latter is $0$, as shown in the second display in the answer. Do you have any other comments or concerns about the answer? – Iosif Pinelis May 14 at 17:26