Given two independent draws $(X,Z,Y)$ and $(X',Z',Y')$ from some distribution $P$, I would like to understand under which conditions does the following hold:
$$ P(Y\le Y'|X,Z,X',Z') = P(Y\le Y'|Z,Z'). $$
This clearly holds when $X \perp Y | Z$ for example, but I want to be able to say that the above statement holds if and only if some condition is met.
Let's rewrite the two expressions using conditional expectation $$P(Y\le Y'|X,Z,X',Z') = P(Y\le Y'|Z,Z') \tag{1}$$ \begin{align} & \iff E\left(\mathbb{I}_{ \{ Y \le Y' \}} |X,Z,X',Z'\right) = E\left(\mathbb{I}_{ \{ Y \le Y' \}} |Z,Z'\right) \\ & \iff E\left(E\left(\mathbb{I}_{ \{ Y \le Y' \}} |Z,Z'\right)|X,X'\right) = E\left(\mathbb{I}_{ \{ Y \le Y' \}} |Z,Z'\right) \tag{2} \\ \end{align}
$(2)$ holds true if and only if the variable $E\left(\mathbb{I}_{ \{ Y \le Y' \}} |Z,Z'\right)$ is dependant on ($X$ and $X'$). In other words, $E\left(\mathbb{I}_{ \{ Y \le Y' \}} |Z,Z'\right)\in \sigma(X,X')$ or there exists a $g$ mesurable such that $E\left(\mathbb{I}_{ \{ Y \le Y' \}} |Z,Z'\right) = g(X,X')$ .
Hence, we conclude that the necessary and sufficient condition for $(1)$ is $E\left(\mathbb{I}_{ \{ Y \le Y' \}} |Z,Z'\right)$ is dependant on ($X$ and $X'$) or $\exists g:E\left(\mathbb{I}_{ \{ Y \le Y' \}} |Z,Z'\right) = g(X,X')$.