# Is the conditional (chain rule) of probability interchangeable?

I'm trying to better understand the chain rule of conditional probability. I haven't seen it explicitly confirmed anywhere, but I'd like to know if every factorization of the joint distribution is valid?

For example:

P(A,B,C) = P(A|B,C)*P(B|C)*P(C)
= P(A|B,C)*P(C|B)*P(B)
...
= P(C|A,B)*P(B|A)*P(A)


## 1 Answer

Set intersection is associative and commutative: $$A\cap B\cap C=A\cap(B\cap C)=A\cap(C\cap B)=\dots =C\cap(B\cap A)$$. Therefore the answer is: yes :)

For example: $$P(A,B,C)=P(C,(B,A))=P(C|B,A)P(B,A)=P(C|B,A)P(B|A)P(A)$$
In general, $$P(X_1,\dots,X_n)=\prod_{j=1}^nP(X_j\mid X_1,\dots,X_{j-1})$$ where $$(X_1,\dots,X_n)$$ can be in any order.

• Awesome, thank you! – jbuddy_13 Sep 10 '20 at 22:49