Conditional probability and Bayes’ rule

bayes-theoremconditional probabilityprobability

What's the between $P(x|y)P(y|z)$ and $P(x|y,z)P(y|z)$, it seems to me they both equal to $P(x,y|z)$.

Does any condition should be satisfied if they both equal to $P(x,y|z)$.

Best Answer

By definition $\mathsf P(x,y\mid z)~=~\mathsf P(x\mid y,z)~\mathsf P(y\mid z)$ always holds for any random variables $x,y,z$ where $\mathsf P(y\mid z)\neq 0$.

Does any condition should be satisfied if they both equal to P(x,y|z).

Yes.   $\mathsf P(x\mid y,z)=\mathsf P(x\mid y)$ exactly when $x\perp z\mid y$ (that is, $x$ and $z$ are conditionally independent when given $y$).

Only when one this is so can we make the substitution to claim $\mathsf P(x,y\mid z)~=~\mathsf P(x\mid y)~\mathsf P(y\mid z)$.

Related Question