Blogs/Bayes Theorem

# Bayes Theorem

peter.washington Oct 23 2021 2 min read 49 views

Stanford ML PhD

Fundamentals Prob. and Stats

A central probability formula is the following:

Let’s think about why this equation is the case. If we are given that B occurs, the space of all possibilities becomes:

The shaded area in the picture above is the denominator, since we know that no matter what, we are looking at what happens given that B has occurred. To derive Bayes’ rule, we can conceptually think of the “given B” part of P(A | B) as saying that no matter what happens, B has occurred, as shown above. We can therefore put B in the denominator.

We can now write the probability of A given B as P(A∩B) over P(B), since the shaded space covering all of B is the denominator, and the probability of A within this space is the part of A that intersects with B, or the probability that both A and B occur P(A∩B). This gives us the following formula for Bayes theorem:

To turn this equation into the Bayes rule as we originally introduced it, we need to use the following probability rule:

This gives us the final Bayes formula:

Learn and practice this concept here:

https://mlpro.io/problems/bayes-theorem/