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.
So first, consider the odds for the car being behind door A, B or C, before anything happens. We may write this as
To be really clear but encumber you with extra notation, by this I mean
where 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 rather than . 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:
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:
Again in more cumbersome notation, this is supposed to mean:
So how do we calculate these odds? Well, of course the answer is Bayes’ theorem, which in this case we can write like this:
This thing; ; 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,
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:
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
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
(where I scaled the numbers up to integers). Multiplying these factors into our initial odds, we get the final odds:
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, じゃまたね!