Derivation of the formula for the probability of a class, given conditionally independent attributes.

22 Views Asked by At

The following is a formula that finds the posterior probability of a class (i.e. yes or no) given four conditionally independent attributes:

$$P(c|X) = P(x_1|c)\cdot P(x_2|c)\cdot P(x_3|c)\cdot P(x_4|c)\cdot P(c).$$

Found here: https://www.saedsayad.com/naive_bayesian.htm

In my experience, I've only seen formulas showing the posterior probability of attributes given a class, such as the Bayes Theorem formula:

$$P(B_j|A) = \frac{P(A|B_j)\cdot P(B_j)}{\sum_i P(A|B_i)P(B_i)}.$$

Grabbed from here: https://www.probabilitycourse.com/chapter1/1_4_3_bayes_rule.php

Is the first formula a derivation of the second? If so, how is it derived?

If not, it must have some relation, but I can't discern what it is.