Does $X\le Y$ imply $\mathbb{E}[X|Z]\le \mathbb{E}[Y|Z]$ Let $X, Y, Z$ be random variables. If $X\le Y$, I wonder if  $$\mathbb{E}[X|Z=z]\le \mathbb{E}[Y|Z=z]$$ holds. 
I have a contradiction between math and intuition.
First, math. I think math shows that this inequality is correct. Since $X\le Y$, we have $X-Y\le 0$. Then,
$$\mathbb{E}[X-Y|Z=z]=\sum_{x,y} (x-y)p(X=x,Y=y|Z=z)$$
Since $x-y\le0$ and $p(x,y|z)\ge0$, it is clear that $\mathbb{E}[X-Y|Z=z]\le0$ which implies $\mathbb{E}[X|Z=z]\le \mathbb{E}[Y|Z=z]$.
Second, intuition. Intuitively, the inequality is incorrect. For example, it is possible that when $Z=z$, the possibility to have $Y=y$ is zero for all $y$. And it is possible that $\mathbb{E}[X|Z=z]$ is positive. In this case, the inequality does not hold.
Is the intuition wrong? or the math wrong? I searched a bit and found a note saying that the inequality holds almost surely. I don't understand why it is almost surely.
 A: The inequality is true for all integrable random variables $X$ and $Y$.
For any $A\in\sigma(Z)$,
$E[E[X\mid Z]1_A]=E[X1_A]\leq E[Y1_A]=E[E[Y\mid Z]1_A].$
A measure-theoretic argument implies that $E[X\mid Z]\leq E[Y\mid Z]$ almost surely.
The reason why the inequality holds almost surely is because the conditional expectation is only defined up to null events. One can propose different conditional expectations which only differ on events of probability $0$.
For example take $Z\sim U(0,1)$ and $X=Z^2$, $Y=Z$.
We have $X\leq Y$ and I can write $E[Y\mid Z]=Z$. 
I can also write $E[X\mid Z]=Z^2$ or $E[X\mid Z]=Z^21_{Z\neq1/2}+161361_{Z=1/2}$.
Both these choices for $E[X\mid Z]$ are valid and in both cases I would have $E[X\mid Z]\leq E[Y\mid Z]$ almost surely, but the second choice for $E[X\mid Z]$ would not allow me to say $E[X\mid Z]\leq E[Y\mid Z]$ for all values of $Z$.
A: According to your answer to my comment, I suppose that $$X \leq Y$$
stands for
$$\sup{\mathcal{X}} \leq \inf{\mathcal{Y}},$$
where $X \in \mathcal{X}$ and $Y\in \mathcal{Y}$.
For the sake of simplicity, assume that 
$$X \in \{x_1, x_2, \ldots, x_n\}$$
and
$$Y \in \{y_1, y_2, \ldots, y_m\},$$
where $x_1 < x_2 < \ldots < x_n$, $y_1 < y_2 < \ldots < y_m$ and 
$$x_n \leq y_1.$$
Then:
$$\mathbb{E}[X|Z=z]=\sum_{x = x_1}^{x_n} x p(X=x,Y=y|Z=z) \leq x_n$$
and
$$\mathbb{E}[Y|Z=z]=\sum_{y = y_1}^{y_m} y p(X=x,Y=y|Z=z) \geq y_1.$$
Therefore, since $x_n \leq y_1$ by hypothesis, then
$$\mathbb{E}[X|Z=z] \leq x_n \leq y_1 \leq \mathbb{E}[Y|Z=z].$$
Finally:
$$\mathbb{E}[X|Z=z] \leq \mathbb{E}[Y|Z=z].$$
A: Looks like your intuition is wrong. When $Y =0$ and $X\leq Y$, $X$ cannot take positive values.
