The conditional expectation $\mathbb{E}(X|Y)$ of a random variable $X$ given a random variable $Y$ on a probability space $\Omega$ is understood heuristically as our best guess of $X$ given the information provided by $Y$.
It makes sense then to try to estimate objects such as $\mathbb{E}(f(X)|Y)$ by considering $\mathbb{E}[f(\mathbb{E}(X|Y))|Y]=f(\mathbb{E}(X|Y))$ instead. Some relationships are well-known. Jensen inequality for example says that for convex $f$ the former is always greater than the latter. Are there other situations in which something similar can be said?
I was curious about the following toy example for instance: for $f(X)=\mathbb{1}_{\{X\le x\}}$, we obtain $\mathbb{P}(X\le x|Y)$ and $\mathbb{P}(\mathbb{E}(X|Y)\le x|Y)=\mathbb{1}_{\{\mathbb{E}(X|Y)\le x\}}$. It seems that for even such a simple function nothing nice can be said, since for example if $X$ and $Y$ are independent, the former is the cdf of $X$ while the latter is $1$ if $\mathbb{E}X$ is less than $x$, and $0$ if it is larger. What if we add additional structure, say, for example, that $\mathbb{E}(X|Y)=Y$ (i.e. they form a one-step martingale, meaning the given information from $Y$, our best guess of $X$ is $Y$). Does this imply any relationship between $\mathbb{P}(X\le x|Y)$ and $\mathbb{P}(Y\le x|Y)=\mathbb{1}_{\{Y\le x\}}$? Could the former be greater or equal than the latter?
In general, there are no inequalities between the two.
Let us first analyze equality.
$P(X\le x|Y)=1_{\{Y\leq x\}}$ for all $x$ if and only if $X=Y$ with probaility $1$.
Proof: By definition of conditional expectation we get $P(X \leq x, Y>x)=0$ for all $x$. Writing $(X<Y)$ as $\bigcup_{r\in \mathbb Q} (X<r<Y)$ we see that $P(X<Y)=0$.
On the other hand, $P(X\leq x, Y\le x)=P(Y \le x)$. So, $P(X>x,Y\leq x)=0$. As before, this implies $P(X>Y)=0$. Thus, $X=Y$ a.s.
Also, $P(X\le x|Y)\le 1_{\{Y\leq x\}}$ for all $x$ implies $P(X<Y)=0$. ( by the argument in the first part).
And $P(X\le x|Y)\ge 1_{\{Y\leq x\}}$ for all $x$ implies $P(X>Y)=0$. ( by the argument in the second part).