For this post I’m going to cite several different explanations, as Bayes Theorem always trips me up.

The idea behind Bayes Theorem, is that it’s a form of conditional probability. In other words, what’s the probability of Event A occurring, given that Event B has occurred?

## Krista King: Bayes Theorem

In Krista King’s Udemy course on Statistics & Probability, she gives an example of Bayes Theorem with the following problem:

We have a pair of dice. The first day is a fair die (meaning it has an equal chance of landing on any side.) The second die is a weighted die (weighted to the number 6.) Given that the weighted die has a 50% chance of landing on 6, if we picked a die at random and rolled a 6… what is the chance of our die being the weighted die?

https://www.udemy.com/statistics-probability/learn/v4/t/lecture/9562170?start=0

### Breaking the Problem Down

Knowing the equation, let’s examine the probabilities we already know:

1. Die #1 is Fair
2. Die #2 will land on 6 at a rate of 50% of the time.

### Identifying Events

Looking at this question, we have two events, A and B. Breaking it down a bit more we can get put context on Event A and Event B:

A = Choosing a weighted die
B = Rolling a 6

P(A|B) = P(Weighted | 6) or to say another way, the Prob. of A (choosing a weighted die) given a six being rolled.

P(B|A) = P(6 | Weighted) or that the probability of rolling a six, given we’re using a weighted die.

P(A) = P(Biased) or the probability of choosing a weighted die.

P(B) = P(6) or the probability of rolling a six in general.

### Putting it Together

P(A) = 50% or .5 (as there are two die’s)

P(B) = P(choosing the weighted die and rolling a 6) + P(getting a weighted die and rolling a 6) This comes out to .5 (odds of getting a weighted die) * .5 (odds of rolling a six with a weighted die) = 0.25 + 0.5 (odds of getting a fair die) * 1/6 (odds of rolling a six on a fair die.) We end up with 0.25 + 0.085 = 0.33

P(B|A) = 50% or 0.50 as there’s a 50% chance of getting a six, given we selected the weighted die.

This becomes .25 / .33 = 0.75 or 75%

#