Which one of the following versions of Bayes' theorem is correct?

353 Views Asked by At

I've seen two versions of Bayes' theorem:

I've seen this very long version from a frequentist probability class: $$ P(B|A)=\frac{P(A|B)P(B)}{P(A|B)P(B) + P(A|B^c)P(B^c)} $$ where $B^c$ is the event that $B$ did not happen. I've seen the following on the internet: $$ P(B|A)=\frac{P(A|B)P(B)}{P(A)}. $$

Are these equivalent? Is one wrong? Is one a bayesian probability version and the other a frequentist probability version?

2

There are 2 best solutions below

0
On BEST ANSWER

The two versions are equivalent. By the law of total probability, $P(A) = P(A,B) + P(A,B^c) = P(A|B)P(B) + P(A|B^c)P(B^c)$.

The second version is more compact (and arguably gives a better intuition as to what the theorem means), but when you go to evaluate $P(A)$ you often have to decompose it as in the first version, so its application is more direct.

0
On

Both formulations are identical. Note that the denominator in both cases is the same based on the law of total probability, which in this case states

For two events $A$ and $B$, it states $$P(A)=P(A\cap B)+P(A\cap B^c)$$ but using $P(A\cap B)=P(A|B)P(B)$, it is written $$ P(A)=P(A|B)P(B)+P(A|B)^cP(B^c). $$