# An Intuitive and Mathematical Exploration of the Monty Hall Problem

The Monty Hall Problem is a little probability challenge with a rather un-intuitive answer, and it was something I struggled with for quite some time. I knew what the answer was supposed to be, but it took quite a bit of mental wrestling and deriving for me to actually understand why the answer is what it is!

One of the issues I encountered whilst I searched the web for good explanations was that very few places contained a complete mathematical proof from start to finish…steps were skipped/assumed, parts were left out or just not explained well, and overall it was exceedingly difficult for me to draw a complete picture.

Therefore, my goal here is to present both the intuitive explanation I found the most enlightening, and as complete of a mathematical proof explanation as I can. (Without going the route of Mr. Russell and attempting to re-derive all of mathematics, which, although truly marvelous, this blog post is too small to contain.)

### “Intuitive” Explanation

So! The Monty Hall Problem! For those who don’t know, the premise of this problem is that you’re on a game show with three doors. Behind two of the doors are goats, and behind one is a brand new car. You first select a door, and then Monty, the game show host, will open one of the doors you didn’t select, that has a goat behind it. You’re now given an option: do you switch to the other unopened door or stick with your original choice? (For further perusal, the wikipedia page on this problem is long and insightful.)

In case it isn’t obvious, (or if you have an interesting set of priorities) we will assume that it is in fact your preference to win the new car as opposed to a goat. Really, even if you would prefer the goat, selling a new car gets you sufficient funding with which you can obtain many MORE goats, so by expected goat value, winning the car is still the optimal outcome.

The most often offered “simple solution” for this problem is to show the three cases where the car is behind door 1, door 2, and door 3, and seeing that you win once if you stick with your original door and twice if you switch. I’m electing to NOT use this as my intuitive explanation, because while it’s understandable in this context, it makes the whole thing more confusing when you encounter variations of the problem. (Or at least it did for me!) My reasoning is that this solution only looks at the surface mechanics of the problem, and since you gain no real insight into what’s going on behind the scenes, it’s easy to end up incorrectly using the same results on problems that are similar but have a different twist.

To preface my personal favorite explanation, a little bit about probability:

One of the ways I now enjoy looking at probabilities is with parallel universes! If an event has a .5 probability of happening (said in other ways: 50% chance, 50-50 odds, happens 1/2 of the time) one can assume that if you take 10 parallel universes, on average, the event will occur in 5 of them, and not occur in the other 5. This is a useful illustration to use, because you can quantify events or determine probabilities of those different events based on the number of worlds in which they occur.

Now to try the game!

For the sake of an example, let’s suppose we choose door 1. Monty reveals the goat behind door 3. Is it more likely that the car is behind door 1 or door 2? (Or do they have the same odds/it doesn’t matter whether we switch or stay?)

To figure it out, let’s make some parallel worlds. In all of the worlds we will look at, we have made the initial choice of door 1, but Monty has NOT revealed a goat yet. (This is known as a “prior.” More on this later.) Now initially, without any extra information or evidence, we assume there’s an equal chance that the car is behind any particular door. There are three doors, so an equal probability for each is $$\frac{1}{3}$$. There’s a $$\frac{1}{3}$$ chance the car is behind door 1, a $$\frac{1}{3}$$ chance it’s behind door 2, etc.

To reflect this, let’s make 3 groups of worlds. In the first group are 10 worlds in which the car is behind door 1, the second group has 10 worlds where the car is behind 2, and the last consists of 10 worlds where the car is behind door 3.

If it feels weird to be using parallel universes to solve a math problem, we can easily verify that this many-worlds-model fits our expectations so far: in 10 out of 30 of all the worlds the car is behind door 1, which as described above makes a $$\frac{1}{3}$$ probability, and the same applies for door 2 and door 3.

Let’s hit the play button for each world and see what Monty does. Keep in mind that he cannot open the door you initially chose, and he must reveal a goat.

Looking first at group 1, the worlds where the car is behind door 1, Monty has the option of revealing either door 2 or door 3, since they both have goats. We’ll assume there’s an equal chance (or .5 probability) he’ll open either of those, so in half of the group 1 worlds, he opens door 2, and in the other half he opens door 3.

Looking at group 2, Monty MUST open door 3. He can’t open the door you chose (door 1) and the car is behind door 2. In all 10 of these worlds, he opens door 3.

In group 3, Monty must open door 2 for the same reasoning as in group 2. The car is behind door 3, and you chose door 1, so in all 10 worlds he opens door 2.

Our many-worlds-model looks like this now: (the numbers represent which door Monty opens.)

Coming back to our real world now, we have an extra piece of information: we KNOW that Monty opens door 3. We have evidence that narrows down which of our many worlds are possible. (Any worlds where he opened door 2 no longer make sense for evaluating the current situation, since we know he didn’t actually do that.)

So let’s regroup all of our worlds. We remove all of the ones in which he opens door 2 and see what we have left:

These are interesting results! In 10 of the 15 worlds present, the car was behind door 2, and in 5 of the 15, the car was behind door 1. If we turn these into probabilities, that means there’s a $$\frac{2}{3}$$ probability we get the car if we switch to door 2, and a $$\frac{1}{3}$$ probability we get it if we stick with our initial choice. The best strategy is to always switch to the other door!

### Say What?!?

For me personally, this was something of an “uhh…wait, what?” moment, when I was attempting to prove it to myself.

There’s a fancy (and really important) probability theory concept called “conditional probability.” A conditional probability is where we want to know the probability of a specific event given that we know something else. (Given some sort of evidence, in other words.)

The two probabilities above are examples of this. There’s a $$\frac{2}{3}$$ probability the car is behind door 2 given that Monty opened door 3, and a $$\frac{1}{3}$$ probability the car is behind door 1 given that Monty opened door 3.

The reason that all of this works is because conditional probabilities are in part based on their “reversed” conditional probabilities. (This is part of Bayes’ theorem, another fancy probability theory concept I’ll explain below.) This means to determine the probability of a hypothesis given some evidence, you have to look at the probability of the evidence given that the hypothesis is correct. (Look at it the other way around, in other words.)

In the Monty Hall problem, this is done by comparing the probability that Monty would open door 3 (our evidence) given that the car is behind door 1 (one possible hypothesis) with the probability that he would open door 3 (our evidence) given that the car is behind door 2 (the other possible hypothesis.) The first “reversed” conditional probability is $$\frac{1}{2}$$, since he can open either door 2 or 3, and the second is just $$1$$, because he MUST open door 3.

This is a lot of words to say that given the fact he opened door 3, it’s more likely that the car is behind door 2 than door 1! (The many-worlds deal just helps visualize this, because it perfectly represents how a conditional probability “narrows down” the state space you’re looking at.)

Something you hear thrown about quite a bit when people are discussing Bayes’ theorem related things is this concept of information being added or evidence “updating” prior probabilities. A prior probability is the probability without any evidence applied. In our Monty Hall example, the prior probability that the car is behind door 2 is $$\frac{1}{3}$$. So what causes the probabilities to update? Why does door 2 change and not door 1? Put another way, why does Monty choosing door 3 add information about door 2 but not door 1?

You initially chose door 1. Monty is NEVER going to open door 1, because by the problem statement, he opens one of the doors you didn’t select. The fact that Monty decided to open door 3 instead of door 1 doesn’t tell you anything about door 1, because you knew he wasn’t going to open it anyway. No information is added about door 1, so the probability doesn’t update.

The fact that Monty chose door 3 instead of door 2 does give you evidence about door 2. Monty potentially could have opened either door, but he specifically opened door 3. That means there’s a chance he had no choice but to open door 3, so it tells you a little bit about door 2. The fact that Monty didn’t choose door 2 increases (updates) the probability that the car is behind door 2.

### The Cool-Math-Notation Part

Now for the fun stuff, the derivation! If you don’t derive pleasure from deriving math, you’re welcome to leave, but this is sort of the awesome formula stuff tl;dr section…now that you have a little bit of background on probability theory, this is significantly simpler to represent mathematically than it is using the ~1600 words and several diagrams in the explanation above.

Just a bit of notation explanation for non-statistically inclined people:

• $$X$$ – Some event that we are choosing to represent with the letter $$X$$ (after all, verbosity is for the weak! Or something…)
• $$P(X)$$ – The probability that event $$X$$ occurs
• $$P(X|Y)$$ – Conditional probability! This is the probability that event $$X$$ occurred given that event $$Y$$ occurred ($$Y$$ is like our “evidence”)
• $$P(X \cap Y)$$ – The probability that both event $$X$$ AND $$Y$$ occurred. This is distinct from the conditional probability, as explained below.

The difference between conditional probability and the “and” intersection (the funky $$\cap$$ symbol) is best explained by returning to the many-worlds-model-thing. The probability of the intersection of two events is found by taking the number of worlds in which both of the events occur out of all possible worlds. (So the intersection of the car’s existence behind door 1 and Monty choosing door 2 would be 5 out of 30. 5 worlds where both events occur.) The conditional probability first narrows down the number of possible worlds we’re looking at (to just worlds where event $$Y$$ occurred), and then counts the number of worlds in which the event $$X$$ occurs. (So the conditional probability of the car’s existence behind door 1 given Monty chose door 3 is 5 out of 15. 15 worlds where $$Y$$ occurs, and of those 15, $$X$$ occurs in 5 of them. It’s a subtle but very important distinction.)

Interestingly enough, conditional probability is mathematically defined using the intersection:
$$P(X|Y) = \frac{P(X \cap Y)}{P(Y)}$$

If you think about it, this actually makes sense, because we’re looking at all the times both $$X$$ and $$Y$$ occur out of the times $$Y$$ ACTUALLY occurs. (That’s the $$P(Y)$$ on bottom.) The denominator narrows down our possible worlds, and our intersection on top selects just from those worlds.

Tying in what I said before about Bayes’ theorem and reverse conditional probabilities, Bayes’ theorem is a restatement of conditional probability in terms of the reverse conditional probability because of magical algebraic manipulation:

$$P(X|Y) = \frac{P(X \cap Y)}{P(Y)}$$
$$P(X \cap Y) = P(X|Y)*P(Y)$$

$$P(Y|X) = \frac{P(X \cap Y)}{P(X)}$$ (Note that $$P(X \cap Y)$$ is the same thing as $$P(Y \cap X)$$)
$$P(X \cap Y) = P(Y|X)*P(X)$$

So by substitution:
$$P(X|Y)*P(Y) = P(Y|X)*P(X)$$

And finally we arrive at Bayes’ theorem:
$$P(X|Y) = \frac{P(Y|X)*P(X)}{P(Y)}$$

On with the original derivation, let’s define some events: (Note that all of these events assume that you chose door 1. I am not explicitly representing this in the notation because it just makes it more complicated and doesn’t really add anything to the derivation. If you remain skeptical, or for a derivation that explicitly includes your choice in every event, see the proof on wikipedia)

• $$C_1$$ – The event that the car is behind door 1
• $$C_2$$ – The event that the car is behind door 2
• $$D_3$$ – The event that Monty reveals a goat behind door 3

The goal is to compare $$P(C_1|D_3)$$ (the probability that the car is behind door 1 given that Monty reveals door 3) and $$P(C_2|D_3)$$ (the probability that the car is behind door 2 given that Monty reveals door 3.) Whichever is higher is the door we should choose.

Let’s start with the event that the car is behind door 1 given that Monty revealed door 3:
$$P(C_1|D_3) = \frac{P(D_3|C_1)P(C_1)}{P(D_3)}$$

Breaking this formula down into all of its components:

• $$P(D_3|C_1)$$ – The “reverse” conditional probability that Monty reveals door 3 given that the car is behind door 1. He can freely reveal either door 2 or door 3 with equal probability in this situation, so it’s $$\frac{1}{2}$$.
• $$P(C_1)$$ – The prior probability that the car is behind door 1. Initially, we assumed there’s an equal probability the car is behind any particular door, so this is $$\frac{1}{3}$$.
• $$P(D_3)$$ – The prior probability that Monty reveals door 3. (Remembering that this is assuming we chose door 1) This is $$\frac{1}{2}$$, which I’ll prove down below.

Plugging these probabilities back into the formula, we get:
$$P(C_1|D_3) = \frac{P(D_3|C_1)P(C_1)}{P(D_3)} = \frac{\frac{1}{2}*\frac{1}{3}}{\frac{1}{2}} = \frac{1}{3}$$

Now we do the same thing for the event that the car is behind door 2, given that Monty revealed door 3:

$$P(C_2|D_3) = \frac{P(D_3|C_2)P(C_2)}{P(D_3)}$$

Breaking it down again:

• $$P(D_3|C_2)$$ – The “reverse” conditional probability that Monty reveals door 3 given that the car is behind door 2. He MUST reveal door 3, so this is $$1$$.
• $$P(C_2)$$ – The prior probability that the car is behind door 2. Same as before, we assume there’s an equal probability the car is behind any particular door, so this is $$\frac{1}{3}$$.
• $$P(D_3)$$ – The prior probability that Monty reveals door 3. Also same as before, this is $$\frac{1}{2}$$, which I prove down below.

We plug stuff back in to make fun things happen:
$$P(C_2|D_3) = \frac{P(D_3|C_2)P(C_2)}{P(D_3)} = \frac{1*\frac{1}{3}}{\frac{1}{2}} = \frac{2}{3}$$

QED. We have demonstrated via Bayes’ theorem that there’s a $$\frac{2}{3}$$ chance the car is behind door 2, and a $$\frac{1}{3}$$ chance it’s behind door 1! (Given that we chose door 1, and Monty reveals door 3.)

The only thing left is that strange little $$P(D_3)$$ I said I would prove…

The probability of an event can be defined by the sum of that event intersected with each individual state across a set of disjoint states (mutually exclusive, only one can be true at a time) that span the state space. Our “state space” consists of 3 possible states: the car is behind door 1 ($$C_1$$), the car is behind door 2 ($$C_2$$), and the car is behind door 3 ($$C_3$$). We know that these states are mutually exclusive because a car can’t be behind more than one door at once, so this definition applies. (Unless this is some weird quantum thing, but since that isn’t part of the problem description, we can safely ignore that possibility for now.)

We want to know, out of all the worlds, in how many worlds does $$D_3$$ occur? So based on the above definition if we add up the probabilities of $$D_3$$ AND $$C_1$$, $$D_3$$ AND $$C_2$$, and $$D_3$$ AND $$C_3$$, that should be the list of all possible worlds where $$D_3$$ occurs. If we wrote out that sentence, intersections and all:

$$P(D_3) = P(D_3 \cap C_1) + P(D_3 \cap C_2) + P(D_3 \cap C_3)$$

Offhand it might seem difficult to calculate all of those intersections, but fortunately due to that funky algebraic derivation of Bayes’ theorem business, we already know a way to rewrite intersections:
$$P(D_3) = P(D_3|C_1)*P(C_1) + P(D_3|C_2)*P(C_2) + P(D_3|C_3)*P(C_3)$$

This is much easier, since we’ve already covered most of those parts. Each of the priors $$P(C_1)$$, $$P(C_2)$$, etc. is $$\frac{1}{3}$$, and for the reverse conditionals:

• $$P(D_3|C_1)$$ – If the car is behind door 1, Monty can choose either door 2 or door 3, so this is $$\frac{1}{2}$$
• $$P(D_3|C_2)$$ – If the car is behind door 2, Monty can ONLY choose door 3, so this is $$1$$
• $$P(D_3|C_3)$$ – If the car is behind door 3, Monty can’t open that door! That makes this probability $$0$$

Plugging this mess back in, we FINALLY get:
$$P(D_3) = \frac{1}{2}*\frac{1}{3} + 1*\frac{1}{3} + 0*\frac{1}{3} = \frac{1}{2}$$

Even cooler, this can totally be verified by the many-worlds-model above! If you look at the number of worlds in which Monty opens door 3, and the number in which he opens door 2, they’re the same. 15 out of 30 each, which is in fact a probability of $$\frac{1}{2}$$!

Math is freaking awesome. ^_^

### Conclusion (Finally)

So…that was longer than I expected…

I have covered this problem as thoroughly as I know how to, so I hope it made at least a little sense! Maybe I’m just a slow learner, but it took every bit of all of that before I personally felt like I understood why it is the way it is…

If you already understood the solution, I hope to have offered you a potentially different way of looking at the problem. If you knew the answer but never really got why, I hope to have explained the proof sufficiently that you now understand! If you were just idly curious and wandered in on this having no prior (…prior…see what I did there?) exposure to this particular problem, I hope to have sparked your interest in this probability business…it’s pretty cool stuff!

If you have any further questions, would like something clarified, or see a mistake somewhere, feel free to let me know in the comments below!

– WildfireXIII

## 4 thoughts on “An Intuitive and Mathematical Exploration of the Monty Hall Problem”

1. But what if you open door 4?

(edited by Darkar to make the italics work, for future reference use <i> and </i> tags to make things italic on WordPress)

1. So what’s interesting is that the more doors you add to this problem, the more obvious the answer becomes. If there were 100 doors, you chose one, and Monty revealed 98 goats, leaving one other door unopened, there’s a SIGNIFICANTLY higher chance that the car is behind that last unopened door. This makes sense because Monty very likely had to intentionally avoid choosing that door, and you only had a 1/100 chance of guessing correctly with your first choice. (So him just “happening” to not open that 1 door, because you guessed correctly on your first try will only happen in 1 out of 100 worlds.)

2. Very interesting. I always saw the ‘parallel worlds’ analysis, but your approach with Bayes’ theorem is really neat. That insight about Monty opening the door providing information about the unopened door, but not the opened one was especially clever.

1. Thank you! Yeah, the information thing was something that had confused me for a while…a lot of people vaguely mention it in relation to evidence, but almost nobody clarifies what it means or why it’s a thing.