conditional probability on two variables

8.3k Views Asked by At

How can you express p(x1|x2,x3) in terms of p(x2|x1,x3) and p(x1|x3) and p(x2|x3) with the help of the chain rule ?

enter image description here

Source:https://www.hackerearth.com/practice/machine-learning/prerequisites-of-machine-learning/bayes-rules-conditional-probability-chain-rule/tutorial/

what I tried: $p(x1|x2,x3) = \gamma* p(x1,x2,x3) = \gamma*p(x3|x1,x2)*p(x1,x2) = \gamma*\tau*p(x3|x1,x2)*p(x2|x1)*p(x1) $

... but the result should be: $$p(x1|x2,x3)=p(x1|x3,x2)=p(x2|x1,x3)*p(x1|x3)/p(x2|x3)$$

1

There are 1 best solutions below

3
On BEST ANSWER

$$P(x_1\mid x_2, x_3)=_{\color{red}{\text{by def. of cond. prob.}}}=\frac{P(x_1,x_2,x_3)}{P(x_2,x_3)}=$$$$=_{\color{red}{\text{by the ch. rule. three times}}}=\frac{P(x_2\mid x_1,x_3)P(x_1\mid x_3)P(x_3)}{P(x_2\mid x_3)P(x_3)}=$$

$$=_{\color{red}{\text{canceling out...}}}=\frac{P(x_2\mid x_1,x_3)P(x_1\mid x_3)}{P(x_2\mid x_3)}$$