When learning about Bayesian networks, I come across a statement where one of the term $X_2$ was marginalized away:

$$\sum_{X_2} P(X_3|X_2)P(X_2|X_1) = P(X_3|X_1)$$

It is not clear to me why this is so. From the definition of conditional probability, I get: $$\sum_{X_2} P(X_3|X_2)P(X_2|X_1) = \sum_{X_2} \frac{P(X_3,X_2)}{P(X_2)}\frac{P(X_2,X_1)}{P(X_1)}$$

I know the equation for marginalizing for a joint probability, $$\sum_{X_2}P(X_1,X_2) = P(X_1)$$

But I don't know how to combine these together and handle the product between probabilities to prove the 1st statement


First check that the kwown marginalization formula $$\sum_{X_2}P(X_2, X_3) = P(X_3) \tag1$$

is also valid when everything is conditioned on an additional variable (you can check that in this particular case, but this is true in general, conditioning on an additional variable just defines new variables on a new restricted universe):

$$\sum_{X_2}P(X_2,X_3 | X_1) = P(X_3| X_1) \tag2$$

Then notice that $P(X_2,X_3 | X_1) = P(X_3 | X_2, X_1) P(X_2 | X_1)$ ( again, this is the same as the known formula $P(X_2,X_3) = P(X_3 | X_2) P(X_2)$, only that everything is aditionally conditioned on $X_1$)

Hence the formula you post is not true in general, it's true only if $P(X_3 | X_2, X_1)=P(X_3 | X_2) $ , that is, if $X_1 \to X_2 \to X_3$ (Markov property).

  • $\begingroup$ Thank you for your answer! Yes it was stated that the there is an assumption of local markov property. $\endgroup$ Feb 27 '21 at 13:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.