# Dropping condition from conditional probability

Consider 3 random variables $$X$$, $$Y$$ and $$Z$$. Under which conditions would we have $$P(X\mid Y,Z) = P(X\mid Z)$$?

• Your title asks about "dropping" the condition, regardless of the rest of the question, you can drop it by $P(X|Z) = \sum_y P(X|Y = y,Z) P(Y=y)$ by the law of total probability.
– Tim
Commented Oct 6, 2023 at 6:37

This is equivalent to $$X$$ and $$Y$$ being conditionally independent given $$Z=z$$. We have $$f_{X|Y,Z}(x|y,z) = \frac{f_{X,Y,Z}(x,y,z)}{f_{Y,Z}(y,z)} =\frac{f_{X,Y|Z}(x,y|z)f_Z(z)}{f_{Y|Z}(y|z)f_Z(z)} =\frac{f_{X,Y|Z}(x,y|z)}{f_{Y|Z}(y|z)}$$
We want this to be equal to $$f_{X|Z}(x|z)$$, which is equivalent to $$f_{X,Y|Z}(x,y|z) =f_{X|Z}(x|z) f_{Y|Z}(y|z) \,,$$ i.e. conditional independence.
• Thanks. Yes, that is clear. Is there some condition on pairwise relations between $X$, $Y$, $Z$ implying conditional independence of $X$ and $Y$ given $Z=z$? Commented Oct 6, 2023 at 7:29
• You can often spot this from how the random variables are defined. For example, you could have $X,Y | Z=z \sim \mathrm{Poisson}(z)$, where $Z \sim \mathrm{Gamma}(\alpha, \beta)$. $X$ and $Y$ are not independent, because their distributions depend on the common (stochastic) parameter $Z$, but they are conditionally independent for a fixed $Z=z$. Commented Oct 6, 2023 at 10:52