Connection between a.s. equality of conditional expectations and a.s. equality of conditional probabilities Let $P$ be some distribution and let $(X,Y,Z), (X',Y',Z')$ be two random draws from $P$. I would like to understand the connection between the following two conditions
(1) $\mathbb{E}[Y|X,Z] = \mathbb{E}[Y|Z]$ almost surely
(2) $\mathbb{P}_P(Y<Y'|X,Z,X',Z') = \mathbb{P}_P(Y<Y'|Z,Z')$ almost surely
Does one imply the other, or is there some case where one holds and the other doesn't? I know that both must hold if $Y \perp X|Z$, but I would like to be able to characterise the connection between the two. This is related to my unanswered question here
 A: Equality of expectations seems like a very weak constraint.  Certainly (1) does not imply (2), per this example:

*

*$Z$ is independent of everything else, so I will drop it from consideration


*First do this coin-flip: $P(X = 1) = P(X = 2) = 1/2$


*Then $Y$ depends on $X$ this way:

*

*If $X=1$ then $P(Y = 1) = 2/3, P(Y = -2) = 1/3, E[Y|X=1] = 0$.


*If $X=2$ then $P(Y = -1) = 2/3, P(Y = 2) = 1/3, E[Y|X=2] = 0$.
Clearly $E[Y|X] = E[Y] = 0$ surely, so (1) is true. However, (2) is false:

*

*$P(Y<Y' \mid X=1, X'=2) = P(Y=-2 \cup (Y = 1, Y' = 2) \mid X=1,X'=2) = 1/3 + 2/9 = 5/9$


*$P(Y<Y' \mid X=1, X'=1) = P(Y=-2, Y'=1 \mid X=1, X'=1) = 2/9$
UPDATE: (2) also does not imply (1), per this other example:

*

*Again, $Z$ is independent of everything else.


*First draw $X \sim Uniform(0,1)$


*Then $Y$ depends on $X$ this way: $P(Y = 2X) = P(Y = -X) = 1/2$, so $E[Y\mid X] = X/2$, and (1) is false.
However, (2) is true (almost surely) because
$$\forall x \neq x': P(Y < Y' \mid X=x, X'=x') = 1/2 = P(Y < Y')$$
