Bayes rule with multiple conditions

Note that you didn't apply Bayes' Rule correctly; Bayes' Rule says that:

$$P(X|Y)={P(Y|X)P(X) \over P(Y)}$$

so your denominator should have actually been $P(b)$. Instead, I will use the definition of conditional probability and multiplication rule (which together imply Bayes' Rule):

\begin{array}{cc} P(X|Y) =\dfrac{P(X,Y)}{P(Y)} & (1)\\ P(X)P(Y|X) =P(X,Y)=P(Y)P(X|Y) & (2) \end{array}

Thus, observe that: $$ \begin{array}{r@{}ll} P( a,z \mid b) &= \dfrac{P(a,z,b)}{P(b)} & \text{by (1), where } X=a,z \text{ and } Y=b\\ &= \dfrac{P(z,b)P(a \mid z,b)}{P(b)} &\text{by (2), where } X=a \text{ and } Y=z,b\\ &= \dfrac{P(b)P(z \mid b)P(a \mid z,b)}{P(b)} &\text{by (2), where } X=z \text{ and } Y=b\\ &= P(z \mid b)P(a \mid z,b) \\ &= P(a \mid z,b) P(z \mid b) \\ \end{array} $$ as desired.


FYI, using the chain rule, P(a,z,b) = P(a|z,b)*P(z|b)*P(b)

Tags:

Bayesian