Monty Hall - A bayesian approach
I remember watching the movie 21 growing up and being completely stunned by one of the opening scenes. The protagonist, Ben, is given a problem - the gameshow problem as they call it in the movie. Here’s how the game works, Ben plays the role of a game show contestant, presented in front of him are three doors A, B, and C. He is told that behind two of the doors are goats, but behind one of the doors is a fancy sports car, and if he guesses the door with the car he gets to keep it! Ben chooses door A, but now comes the twist, before it is revealed what is behind Ben’s door, the gameshow host reveals that behind door B is a goat. Now the host asks Ben if he wants to switch to door C. What would you do in this situation?
In the movie, the Ben, instantly accepts the option to switch, claiming he now gets better odds from switching. But why? There was seemingly a one in three chance of picking the car in the beggining - what changed? To quote Ben, everything.
In the movie this was called the game show problem, but it is perhaps better known as the Monty Hall problem, and it actually has quite an interesting history. It gained notoriety after a newspaper columnist Marilyn Vos Savant posed the question in her column, “Ask Marilyn”. Vos Savant claimed that switching would give a
This was very controversial at the time, many readers refused to believe that switching changed the odds. Nearly 1,000 people with PhDs wrote in claiming that vos Savant was wrong. Even my favorite mathematician, Paul Erdős, one of the most prolific mathematicians in history, remained unconvinced until he was shown a computer simulation. Suffice it to say, this is an unintuitive result, so don’t despair if you thought that there was no difference - you’re in good company. I think one of the easiest ways to understand why the odds change is through using Bayes’ theorem
Let’s start by breaking this problem down to it’s basics. To steal some terminology from Richard McElreath, we’re going look at the garden of forking data, which is to say - all the possible outcomes.
Suppose we chose door A. The game show host knows what’s behind each door, so he’s not going to reveal the door with the car behind it. Therefore, we know the following:
We also know that if there’s a goat behind our door, door A, then the gameshow host only has one option to pick the other door with a goat. This is because he can’t choose our door, and he’s not going to open the door with the car in it.
Lastly, if the car is behind door A, then it doesn’t matter which door the host chooses, so we can say that:
Now we have all the information that we need to solve this problem, I’m going to put everything we worked on down below in a slightly different order. Hopefully this will make it easier to visualize that we’ve covered all the possible outcomes.
With that, we can now move on to using Bayes theorem to see whether or not we should switch doors. Recall that the general form of Bayes theorem states:
Repurposing it for our problem here we have:
Let’s start with numerator first. Well we’ve alread established above that
So now we have,
Now onto the denumerator,
Now we can return to our initial equation and see that.
So staying with door A only yields a 33.33% chance of having a car behind it. This means that there’s a 66.66% chance that the car is behind door C. Don’t take my word for it though, let’s calculate it out. We’ll use the same framework as before, only this time we’ll be calculating:
There you have it, switching doors doubles your chances of getting a car! I think this is a very fun way of understanding a problem that stumped many a mathematicians for quite some time. I hope you enjoyed!