# The Monty Hall Problem

I thought I might do another “fun” post today :). So here we go; I shall present to you the Bayesian solution to the “Monty Hall” problem! For fun, I will also take things a bit further than the usual solutions do…

What is the Monty Hall problem you say? Well, it is a very famous probability problem and there is a lot written about it all over the internet (Wikipedia of course has some nice history and a lot of other info about other ways of attacking it than what I will show you). But its fame is not because it is paradoxical or fundamentally tricky or any such thing that might make it particularly interesting to mathematicians. Rather the solution is simply unintuitive, and many people refuse to believe the answer at first.

The scenario is as follows: You are on a game show (the host is Monty Hall, a real person who hosted a real U.S. game show, though one a little different to what I will describe, or so I am led to believe). Before you are three doors. Monty tells you that behind one of the doors is A NEW CAR! Behind the other two doors are goats (let us assume you prefer to win the car…). You get to pick a door and win whatever is behind it.

So you pick a door. But to increase the dramatic tension of the game, Monty does the following: he opens one of the two doors you didn’t pick, revealing a goat. He then offers you the chance to change your chosen door.

So, the problem: do you switch?

Are you more, or less, likely to win the car by switching, or does it make no difference?

If you were there what would you do? Think about it for a minute.

Alright, so now I will take you through the answer. There will be math, but it is high school math, so I hope it is accessible. We are going to be computing “odds”, like bookies. These are just ratios of probabilities for different outcomes, e.g.

$\text{Odds(horse A wins VS horse B wins)}$
$= \text{Pr(horse A wins)}:\text{Pr(horse B wins)}$.

So first, consider the odds for the car being behind door A, B or C, before anything happens. We may write this as

$\displaystyle \text{Odds(Car)} = 1:1:1$

To be really clear but encumber you with extra notation, by this I mean

$\displaystyle \text{Odds(Car)} = \text{Pr(Car behind A)}:\text{Pr(Car behind B)}:\text{Pr(Car behind C)}$

where $\text{Pr(statement)}$ is the probability that “statement” is true. We can multiply these probabilities by a common factor to make them nicer numbers though, which is why I wrote $1:1:1$ rather than $\frac{1}{3}:\frac{1}{3}:\frac{1}{3}$. Here I also claim there that there are initially equal odds of the car being behind each of the doors, or probability 1/3 that it is behind any particular door. This is a statement about what we believe about the current situation. We have no information to point us in the direction of any particular door at this stage, so this initial assignment of equal odds is really the only reasonable one.

Next you pick a door. I could be a bit more formal about this step, but for brevity let me assume that it is intuitive to you that nothing should happen to the odds of the car being being behind various doors just because you picked one. We are assuming here that the game show people are not jerks who switch the prizes around based on your chosen door. The situation is symmetric, based on our initial odds, so say you choose door A for simplicity. We now have:

$\displaystyle \text{Odds}(\text{Car}|\text{You A}) = \text{Pr}(\text{Car behind A}|\text{You chose A}):\text{etc.}:\text{etc.}$
$= 1:1:1$

where the vertical line “|” means “given that”; i.e. the statements following it are things on which that probability is conditional, i.e. those statements are assumed to be true for the purposes of that particular probability.

We want to know what happens to these odds (of where the car is) after Monty opens one of the doors we didn’t pick (say B) i.e. we want to calculate this:

$\displaystyle \text{Odds}(\text{Car}|\text{Monty B, You A}) = ?:?:?$

Again in more cumbersome notation, this is supposed to mean:

$\displaystyle \text{Odds}(\text{Car}|\text{Monty B, You A}) = \text{Pr}(\text{Car behind A}|$
$\text{You picked door A and Monty opened door B}):\text{etc.}:\text{etc.}$

So how do we calculate these odds? Well, of course the answer is Bayes’ theorem, which in this case we can write like this:

$\displaystyle \text{Odds}(\text{Car}|\text{Monty B, You A})$
$= \text{B}(\text{Monty B}|\text{You A})\times \text{Odds}(\text{Car}|\text{You A})$

This thing; $\text{B}(\text{Monty B}|\text{You A})$; is called the “Bayes factor”. It is not so scary; it is just the ratio of probabilities of seeing various data in different circumstances. In this case, it involves the probability that “Monty opens door B”, given that “You picked door A” and “The car is behind X” (where X is whatever corresponds to that bit of the ratio, i.e. we have X=A:B:C in each bit). In our notation,

$\text{B}(\text{Monty B}|\text{You A})$
$= \text{Pr}(\text{Monty opens B}|\text{You chose A and Car behind A}):\text{etc.}:\text{etc.}$

This here is the crucial point of this whole problem, so let me be extra clear. Bayes’ theorem says that our beliefs about where the prize is after Monty opens a door, depend on the initial odds (here equal), and the ratio of the following three probabilities:

$\text{Pr}(\text{Monty opens B}|\text{You chose A and Car behind A})$
$\text{Pr}(\text{Monty opens B}|\text{You chose A and Car behind B})$
and
$\text{Pr}(\text{Monty opens B}|\text{You chose A and Car behind C})$

Consider these carefully.

Now, let me focus on an important point that cruelly I left ambiguous. Given only the information I have supplied in the above scenario, these probabilities can be quite different depending on what you think my wording implies about the behaviour of Monty. The way I wrote it was this:

“Monty does the following: he opens one of the two doors you didn’t pick, revealing a goat.”

This could mean any of the following:

1. Monty knows what is behind all the doors, and for showmanship he opened a door he knew hid a goat.

2. Monty does not know where the car is, and he just opened one of the remaining doors “at random”, and it just happened to have a goat behind it in this instance.

3. Monty knows you picked the car first up, and is offering you the choice to switch in order to screw you (i.e. he wouldn’t have offered you the choice otherwise).

Depending on which of these you think is the case, the answer is different (but after we go though the normal solution, I will show what to do when you don’t know which of these three option is the case!)

For now, let us initially assume option 1 is the case. In this case our three crucial probabilities are

$\text{Pr}(\text{Monty opens B}|\text{You chose A and Car behind A}) = 1/2$
$\text{Pr}(\text{Monty opens B}|\text{You chose A and Car behind B}) = 0$
and
$\text{Pr}(\text{Monty opens B}|\text{You chose A and Car behind C}) = 1$

If you chose A, and the car was behind A, Monty could open either B or C to dramatically reveal a goat. It is reasonably to assume it makes no difference to him which goat he reveals, so setting the probability he opens B to 1/2 is the reasonable thing to do.

If you chose A, and the car was behind B, then Monty cannot open B if he wants dramatic goatage. So the probability of this outcome is zero.

Similarly, if you chose A, and the car was behind C, then Monty is definitely going to open door B for dramatic effect, so then opening door B has probability 1.

Putting this all together, our Bayes factor is

$\text{B}(\text{Monty B}|\text{You A}) = 1:0:2$

(where I scaled the numbers up to integers). Multiplying these factors into our initial odds, we get the final odds:

$\displaystyle \text{Odds}(\text{Car}|\text{Monty B, You A}) = (1:0:2)\times(1:1:1) = 1:0:2$

So, it is twice as probable that the car is behind door C than door A! You picked A, so you should definitely switch if you want to win.

But what about if you had interpreted my information about the scenario differently? Well, this post is already too long, so I leave it as an exercise for the reader to figure out what happens. I will, however, come back to my promise of how to reason in the face of the ambiguity I presented, without making any one of the wild assumptions, next time! I’ll put I link here when I do it.

But for now, adios! Or since I am trying to learn Japanese, じゃまたね!

## 3 thoughts on “The Monty Hall Problem”

1. Interesting way of phrasing the problem. 🙂
As for the third option (i.e. he’s screwing with you), I reason that the odds are 1/2:0:0 (or 1:0:0 scaled). The Pr that he opens B when the car isn’t in A is zero, because he doesn’t open any door! If the car is behind A, then he will open a door, and it’s 50/50 as to whether it’s B or C. So if he’s screwing with you, then you should never change – you know you have the car.

For option number two, I think that your wording “Monty opens B” in your Pr lines need clarification – if this is shorthand for “Monty opens B and it’s a goat” (given that you choose A and car is behind X), then doesn’t this need to be split up again to consider the action (Monty opens door) and the result (it’s a goat) as they both have different probabilities?

Skipping to the end cos I’m too lazy to explain, I reasoned that:
Car location given I choose A (1:1:1)
x Monty randomly chooses door B,given the above (1/3:1/3:1/3)
x Monty reveals a goat, given above ( 2/3:0:2/3)
= which would come out to 1:0:1 or a coin toss as to whether you should switch – GIVEN that he revealed a goat. There’ll also be a third of his shows that he’ll ruin the drama by giving you the choice between 2 goats…

I suppose you would have to combine all three options by assessing the probability of each scenario too to get a final choice?

• Ben Farmer says:

Right on all counts I believe! And yes, in scenario 2 the notation you mention is ambiguous; however, as you say, if Monty opens a door and reveals the car then bam, it is game over, so we can ignore that boring case I think :p. And yep, to decide what to do when we don’t know what scenario is the case we’ll have to do some averaging over all the scenarios, weighted by how probable we think they are.

2. Hello admin do you need unlimited articles for your website ?
What if you could copy post from other blogs, make it unique
and publish on your page – i know the right tool
for you, just search in google:
kisamtai’s article tool