# Under which conditions does $X_1 \perp X_2, X_3$ imply $X_1 \perp X_2 | X_3$?

E.g. let us imagine we have $$X_3 := X_1 \text{XOR} X_2$$ with both $$X_1, X_2$$ being sampled from $$\{0, 1\}$$ with $$p=0.5$$. Then $$X_1 \perp X_2, X_3$$ but $$X_1 \not \perp X_2 | X_3$$.

Are there conditions that guarantee that pairwise independence implies conditional independence?

One needs to be carefull when writing $$X_1 \bot X_2, X_3$$. In your example this means that $$X_1 \bot X_2$$ and $$X_1 \bot X_3$$, but it could also mean that $$X_1 \bot (X_2, X_3)$$ which is not the case here. You have that $$X_1$$ is independent of $$X_2$$ and is independent from $$X_3$$, but $$X_1$$ is not independant from the couple $$(X_2, X_3)$$.
If you had that $$X_1 \bot (X_2, X_3)$$, then you would have that conditionally on any $$X_3$$ value, $$X_1$$ and $$X_2$$ would be independant (this is quite easy to show).
$$P(X_1 \mid X_2) = P(X_1 \mid X_3) = P(X_1)$$ When does this imply $$P(X_1) = P(X_1 \mid X_2, X_3$$)?
One case is when $$(X_1 \perp X_2) \mid X_3$$ and $$X_2 \perp X_3$$ since then $$P(X_1 \mid X_2, X_3) = \frac{P(X_1, X_2 \mid X_3)P(X_3)}{P(X_2, X_3)} = \frac{P(X_1)P(X_2)P(X_3)}{P(X_2) P(X_3)} = P(X_1)$$ Another case is the same as above but switch 2 and 3.