# Monty Hall Problem

The Monty Hall Problem is a great example to demonstrate Bayesian Updating with Discrete Priors.

## Monty Hall Problem

The monty hall problem is based on a TV show in which one could either win a car or nothing. The participant was presented three doors. Behind one was a car, behind the others were goats. After the participant had chosen a door, Monty Hall opened one of the other doors. Behind that door was always a goat, as he couldn’t open the one with the car behind. The participant was then asked if he wants to stick with his initial choice or if he wants to switch.

The question behind that problem is relatively simple. Should he stay or switch?

The simple answer is that the participant should switch as his probability to win is then twice as high than when he wouldn’t switch. That is because the only way to win without switching is when he chooses the right door with his first choice. As there are three doors each with equal probability to be the winning door, the probability of choosing the right door with the first choice is $\frac{ 1 }{ 3 }$. On the other hand the participant chooses with a probability of $\frac{ 2 }{ 3 }$ a goat first and Monty Hall then opens the other “goat door”. So when the participant switches he has the car with a probability of 1. The total probability of winning given that he’s switched is therefore $\frac{ 2 }{ 3 }$.

## Bayesian Method

We wouldn’t be we when we wouldn’t try to prove that the probability of winning given that he’s switched is $\frac{ 2 }{ 3 }$. We will do this with the help of Bayesian Updating.

The Model

Important is that our model is appropriate. We model the monty hall problem as following:

• Let Event A be that we choose door 1 and the goat is behind door 1
• Let Event B be that Monty Hall shows a goat behind door 2

We then want to know the probability that we choose door 1, Monty Hall shows a goat behind door 2 and the car is indeed behind door 1. Or, like always, mathematically:

P(A|B)

The Bayes’ Theorem says that:

$P(A|B)=\frac{ P(B|A)P(A) }{ P(B) }$

The Probability for P(A) is easy to calculate as the probability that the car is behind door one is $\frac{ 1 }{ 3 }$. The Probability for P(B|A) is similar easy as Monty Hall has two options when the car is behind door 1. He can either choose door 2 or door 3. So the probability that he chooses door 2 is $\frac{ 1 }{ 2 }$. The more difficult part is to calculate P(B). We remember that: $P(B)=P(B|A)P(A)+P(B|A^{ c })P(A^{ c })$. We already calculated the first part:

$P(B|A)P(A) = \frac{ 1 }{ 2 } \cdot \frac{ 1 }{ 3 } = \frac{ 1 }{ 6 }$

But $P(B|A^{ c })P(A^{ c })$ consists of two parts, as the car can either be behind door 2 or door 3.

If the car is behind door 2, event B will never happen so we have:

$P(B|2) = 0$ and $P(2)=\frac{ 1 }{ 3 }$

If the car is behind door 3, event B will certainly happen as Monty Hall has to choose door 2 if we’ve chosen door 1 and the car is behind door 3. We therefore have:

$P(B|3)=1$ and $P(3)=\frac{ 1 }{ 3 }$

We then have:

$P(B)=P(B|A)P(A)+P(B|A^{ c })P(A^{ c })=\frac{ 1 }{ 6 }+P(B|2)P(2)+P(B|3)P(3)=\frac{ 1 }{ 6 }+\frac{ 1 }{ 3 }=\frac{ 1 }{ 2 }$

If we know apply the Bayes’ Theorem we have:

$P(A|B)=\frac{ P(B|A)P(A) }{ P(B) }=\frac{ \frac{ 1 }{ 6 } }{ \frac{ 1 }{ 2 } } = \frac{ 1 }{ 3 }$

The probability that the car is behind our door one given that Monty Hall showed a goat behind door two is therefore $\frac{ 1 }{ 3 }$. The only door left except of our door one is door three so the probability of winning with door three given that Monty Hall showed a goat behind door two is $\frac{ 2 }{ 3 }$. Switching to door three gives us therefore twice the probability of winning our dream car. We can summarise all of that again in a table:

 $\theta$ prior likelihood unnormalised posterior posterior Car is behind door 1 $\frac{ 1 }{ 3 }$ $\frac{ 1 }{ 2 }$ $\frac{ 1 }{ 6 }$ $\frac{ 1 }{ 3 }$ Car is behind door 2 $\frac{ 1 }{ 3 }$ o o 0 Car is behind door 3 $\frac{ 1 }{ 3 }$ 1 $\frac{ 1 }{ 3 }$ $\frac{ 2 }{ 3 }$ Total 1 $\frac{ 1 }{ 2 }$ 1