Bayes' theorem
as a product of pairwise probabilities, and applying Bayes' theorem, the