A goat sitting on a rock, chewing something

Mr Bayes and Mr Hall, part I

This post was one of a series of three I wrote about the Monty Hall problem, and how Bayes’ Theorem can help to solve it. I wrote them back in 2020 as part of an internship with Tom Crawford, and so this post originally appeared on his site in 2021.

Classic Monty Hall

You are on a gameshow hosted by a man named Monty Hall, where you are faced with three doors: behind two of them are goats and behind one is a car. You choose a door; when it is opened, you win the prize behind it. Before it’s opened, Monty (who knows what is where) opens a door. You know he will open a door with a goat behind it; if there are two goats, Monty picks one at random. You have the option to stick with your door or to switch. What should you do?

Answer

You say it doesn’t matter? Is that your final answer?

The answer that you’re equally likely if you stick or switch fits with most people’s intuition, but it’s wrong. The correct answer is that you should switch, because then you have probability 23\frac{2}{3} of getting a car, and 13\frac{1}{3} if you stick. This is not obvious! There are a few ways to see it, but one that will let us easily tackle variants on the problem uses Bayes’ Theorem.

Let’s first look at a case where we do get an intuitive answer: suppose Monty doesn’t know what’s behind the other doors either, and opens one of them at random. Of course, now there’s a chance that Monty will reveal a car, and it’s game over. Let’s suppose you picked the door on the left, and Monty picked the door in the middle. (Everything in this puzzle so far is symmetrical, with no distinction between left, middle and right, so we will get the same answer regardless of which door we picked and which door Monty opens.) What we’re interested in is the probability that you picked a goat, given that you know Monty has revealed a goat.

The probability that you picked a goat at the start is 23\frac{2}{3}.

(choose goat)=23\mathbb{P}(\textnormal{choose goat}) = \frac{2}{3}

Suppose you picked a goat, Monty now has two doors, one of which contains a goat. Monty picks at random, so the probability of them opening a goat is 12\frac{1}{2}. If, however, you picked a car, Monty only has goats left, so will certainly reveal one.

(Monty shows goat|choose goat)=12\mathbb{P}(\textnormal{Monty shows goat}\,|\,\textnormal{choose goat}) = \frac{1}{2}
(Monty shows goat|don’t choose goat)=1\mathbb{P}(\textnormal{Monty shows goat}\,|\,\textnormal{don’t choose goat}) = 1

The last thing we need to use Bayes’ Theorem is the overall probability of being shown a goat, which isn’t immediately obvious—but we can work it out. The probability that you choose a goat and Monty shows you one is 23\frac{2}{3} times 12\frac{1}{2}, or 13\frac{1}{3}. The probability that you don’t choose a goat, but Monty shows you a goat, is 13\frac{1}{3} times 1, or 13\frac{1}{3} again. So the probability that Monty shows you a goat can be found by adding up the two cases, which each happen with probability 13\frac{1}{3}.

(Monty shows goat)=23\mathbb{P}(\textnormal{Monty shows goat}) = \frac{2}{3}

Now we can use Bayes’ Theorem:

(choose goat|Monty shows goat)=(choose goat)(Monty shows goat|choose goat)(Monty shows goat)\mathbb{P}(\textnormal{choose goat}\,|\,\textnormal{Monty shows goat}) = \frac{\mathbb{P}(\textnormal{choose goat})\mathbb{P}(\textnormal{Monty shows goat}\,|\,\textnormal{choose goat})}{\mathbb{P}(\textnormal{Monty shows goat})}
(choose goat|Monty shows goat)=23×1223=12\mathbb{P}(\textnormal{choose goat}\,|\,\textnormal{Monty shows goat}) = \frac{\frac{2}{3} \times \frac{1}{2}}{\frac{2}{3}} = \frac{1}{2}

This is what we expected.

What about the Monty Hall case (i.e. Monty does know where everything is)? Well, our first probability is the same: there is still a two-in-three chance of picking a goat.

(choose goat)=23\mathbb{P}(\textnormal{choose goat}) = \frac{2}{3}

But now the probability that Monty shows us a goat given that we chose one is 1, because Monty knows where the other goat is. And if we picked the car, Monty still only has goats to reveal, so we get 1 as well. Indeed, whatever was behind our door, Monty will show us a goat.

(Monty shows goat|choose goat)=1\mathbb{P}(\textnormal{Monty shows goat}\,|\,\textnormal{choose goat}) = 1
(Monty shows goat)=1\mathbb{P}(\textnormal{Monty shows goat}) = 1

So now we can apply Bayes’ Theorem again:

(choose goat|Monty shows goat)=(choose goat)(Monty shows goat|choose goat)(Monty shows goat)\mathbb{P}(\textnormal{choose goat}\,|\,\textnormal{Monty shows goat}) = \frac{\mathbb{P}(\textnormal{choose goat})\mathbb{P}(\textnormal{Monty shows goat}\,|\,\textnormal{choose goat})}{\mathbb{P}(\textnormal{Monty shows goat})}
(choose goat|host shows goat)=23×11=23\mathbb{P}(\textnormal{choose goat}\,|\,\textnormal{host shows goat}) = \frac{\frac{2}{3} \times 1}{1} = \frac{2}{3}

That’s our probability of having a goat, updated with the information that we’ve been shown a goat. So we’re more likely than not to have a goat still, and we’d better switch.

Monty Hall Revisited

As above, but now Monty, instead of picking at random, always opens the door on the left, if he has a choice. What should you do if Monty picks the left door? What about the right?

Answer

If you’ve read the previous answer, you might think that surely this doesn’t make any difference, and it’s still better to switch. Alas, probability has come on down to fool you once more.

In the answer above I made a comment that it didn’t matter which door we assumed you and Monty had picked, because everything was symmetrical. This is no longer true! However, it still doesn’t matter which door you pick; what matters are the relative positions of the other two doors. (Still, if you want, you can assume that you pick the door on the left, or in the middle, or on the right; you will get the same answers.) From now on, when we say “the left door” or “the right door”, we’ll mean “of the two that you didn’t pick”.

We can use Bayes’ Theorem again. As ever, the probability that you pick a goat at the start is 23\frac{2}{3}.

(choose goat)=23\mathbb{P}(\textnormal{choose goat}) = \frac{2}{3}

Let’s suppose Monty opens the door on the left. If you chose a goat, Monty doesn’t have a choice. So whether he opens the left door or the right door is determined by the initial random arrangement of the goats and the car. The two options are equally likely, so the conditional probability is 12\frac{1}{2}.

(Monty opens left door|choose goat)=12\mathbb{P}(\textnormal{Monty opens left door}\,|\,\textnormal{choose goat}) = \frac{1}{2}

In exactly the same way as before, to get the last thing we need—the probability that Monty opens the left door—we can add up over the cases. The probability that you chose a goat and he opened the left door works out at 13\frac{1}{3}, as does the probability that you chose a car and he opened the left door.

(Monty opens left door)=23\mathbb{P}(\textnormal{Monty opens left door}) = \frac{2}{3}

You might notice that these are the exact same numbers as in the case where Monty knew nothing about where the goats were. So it’s not surprising that when we plug everything into Bayes’ Theorem, we get:

(choose goat|Monty opens left door)=23×11=23\mathbb{P}(\textnormal{choose goat}\,|\,\textnormal{Monty opens left door}) = \frac{\frac{2}{3} \times 1}{1} = \frac{2}{3}

So if Monty chooses the left whenever he has a choice, and that’s what he does with us, that increases the chance that our door has a car behind it. Weird, right?

The intuition here is that both the knowledge-free Monty choosing at random, and the knowledgeable Monty going to the left, have given us some information about what’s behind the other doors, that points towards the two goat case. In the first case, it’s because they were more likely to open a goat (and not a car) if there were two goats for them to pick from; in the second, the presence of the second goat makes them more likely to go to the left. (In either case, Bayes’ Theorem lets us quantify how much information that gives us.) In the case where Monty doesn’t do anything that we didn’t already know he would do, we can’t update our probability of what is behind our door: it stays the same as at the start.

What if we know Monty goes to the left when he has a choice, but he picks the right door in our game? We don’t actually need Bayes’ Theorem for this: we can just logic it out. Suppose we had picked a car. Then Monty would have had two doors to choose from, and would have chosen the left one. But that’s not what he did, so we must have picked a goat. Monty’s choice has now given us all the information we need to determine where everything is—and if you go through the Bayes’ calculations, you’ll see that you get an answer of

(choose goat|Monty opens left door)=23×11=1\mathbb{P}(\textnormal{choose goat}\,|\,\textnormal{Monty opens left door}) = \frac{\frac{2}{3} \times 1}{1} = 1

So you’ll definitely get a car if you switch. Didn’t you do well?

Here’s a final summary of all the cases:

ScenarioStrategy
Monty opens a goat unknowinglyStick and switch win equally often
Monty opens a goat at randomSwitching wins twice as often as sticking
Monty opens the left if possible, and he opens the leftStick and switch win equally often
Monty opens the left if possible, but he opens the rightSwitching always wins

Read more in part II

2 responses to “Mr Bayes and Mr Hall, part I”

  1. […] part I for the answer to the classic problem (and a bonus extension problem where Monty always opens the […]

  2. […] If you don’t know what the Monty Hall problem is, why not go back to part I? […]

Privacy and cookies

By leaving a comment you acknowledge that you have read and agreed to the privacy policy. If you tick the box marked “Save my name, email, and website in this browser for the next time I comment”, a cookie will be saved in your browser so that this information can be saved; by ticking the box you consent to this necessary cookie.

Leave a Reply to Mr Bayes and Mr Hall, part II – Escaping Oxford Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.