# The Monty Hall problem

I'm amazed that, although well known, this problem hasn't been posted yet.

## Monty Hall

• You are on a game show.
• The host of the show shows you three doors.
• He tells you that behind one of them, is a new car, and behind the other two is nothing (or in some versions of the story, a goat).
• He asks you to pick a door.
• After you pick a door, the host opens one of the other doors (IMPORTANT NOTE: The host knows where the car is, and will never open a door that contains the car)
• Then with the two doors left he asks you:

## Would you like to keep your door? Or switch?

• Mandatory xkcd reference: xkcd.com/1282 – Julia Hayward Aug 29 '14 at 8:15
• Does anyone know. Didn't this feature (but inadequately explained) in the movie Gladiator with a tiger behind one of the doors. Or did I dream the whole thing? – chasly from UK Nov 12 '15 at 22:20
• @chaslyfromUK if you can find a video clip I'd be interested to see it – Cruncher Nov 12 '15 at 23:00
• I thought all doors had tigers in Gladiator. – Ian MacDonald Nov 12 '15 at 23:09
• Also worth to note: Monty never did offer to switch doors. He opened a door with a lesser prize to build excitement, but did not allow the contestant to switch. en.wikipedia.org/wiki/Monty_Hall_problem#History – MichaelK Apr 6 '16 at 12:33

## You switch your door, because you have double the chance of getting the car

Explanation:

When you pick a door, there is a 1 in 3 chance that the door contains the car.

Let's examine that case of when you originally picked the car, and when you originally picked a blank separately.

Originally picked the car(1/3 chance)
In this case, the host can open either of the 2 doors, and reveal nothing. In this case it is beneficial to keep your original door.

Originally picked a blank door(2/3 chance)
In this case, the host isn't allowed to open the door with the car. He must open the blank door. Meaning that when you switch after picking a blank door, you're guaranteed to get the car!

From this we can easily see that you are twice as likely to get the car if you switch your door.

• Yes and you see this tested by Prof. Marcus du Sautoy youtube.com/watch?v=o_djTy3G0pg – Hubble07 Aug 28 '14 at 20:04
• In the video he had luck on his side as well as mathematics -- wins 16 out of 20 plays! – safkan Jan 2 '15 at 1:11

Switch.

There's a $2/3$ chance that you'll choose a goat, and a $1/3$ chance you'll choose the car.

If you chose a goat, after switching you will win a car. (Guaranteed)

If you chose a car, after switching you will win a goat. (Guaranteed)

Therefore, the chance you'll win a car is $2/3$ if you switch.

Simply put, the chance you picked the car before the switch is $1/3$. That does not change if a door is opened. The chance will still be $1/3$.

It can be more intuitive if you make it a 100 doors instead of 3: (Although some people do not think this a clear explanation for some reason.)

You pick 1 door, then the host opens 98 doors revealing a goat. What is the chance that the car is in the door you chose? Answer: $1/100$

The first door (the one you picked initially) is random, but the second door is not. That same door will always remain closed, no matter which door you pick initially, and it is the only door that will always remain closed. (because there's something special about that door.)

What the host is asking, in essence, is: do you want what is behind the door you chose initially, or what is behind the other 99 doors? The act of opening the 98 doors means nothing, because it is not random.

• I think most people's problem with accepting is that, although you repeat 100000 times that the host knows where the car is, and will not open it, they get this idea that the opening of the door is somehow random, and therefore by it being empty increases the odds that your door would be right(up to 50/50) – Cruncher Aug 29 '14 at 12:30
• @Cruncher: Despite its name, the Monty Hall problem, as commonly stated, presumes that the host works in a way that is inconsistent with what I remember of the real game show host of that name. I'm pretty sure I remember times that the contestant picked a door and Monty Hall showed that the contestant was a loser without offering a chance to switch, and other times Monty directly showed the contestant was a winner (again without offering a chance to switch). How often the latter two events happen, as compared with Monty letting the contestant switch, would affect the optimal strategy. – supercat Dec 31 '14 at 20:52
• @supercat How could it affect your strategy? There's no strategy to the first door you pick. If he offers you the switch you take it. If he doesn't, well then there's no strategy, it's just blind luck. – Cruncher Jul 17 '15 at 13:48
• @Cruncher: Suppose the host's policy is to only offer you a chance to switch if your first guess was right. In that case, if you're lucky enough to be offered a chance to switch, that means that you have a 100% chance of winning by refusing the offer, and would have a 0% chance of winning if you accept. Conversely, if the host would only offer a chance to switch if you were wrong, then of the times you're allowed to switch, you would be certain to lose 100% of the times you refuse and win 100% of the times you accept. – supercat Jul 17 '15 at 15:54
• +1 This is the clearest explanation of this problem I've heard to date. – Oscar Bravo Jan 11 '16 at 13:06

I've answered this over on Math.SE, so I'll just quote most of that.

Suppose we have $n$ doors, with a car behind $1$ of them. The probability of choosing the door with the car behind it on your first pick, is $\frac{1}{n}$.

Monty then opens $k$ doors, where $0\leq k\leq n-2$ (he has to leave your original door and at least one other door closed).

The probability of picking the car if you choose a different door, is the chance of not having picked the car, which is $\frac{n-1}{n}$, times the probability of picking it now, which is $\frac{1}{n-k-1}$. This gives us a total probability of $$\frac{n-1}{n}\cdot \frac{1}{n-k-1} = \frac{1}{n} \cdot \frac{n-1}{n-k-1} \geq \frac{1}{n}$$ If Monty opens no doors, $k = 0$ and that reduces to $\frac{1}{n}$.

For all $k > 0$, $\frac{n-1}{n-k-1} > 1$ and so the probabilty of picking the car on your second guess is greater than $\frac{1}{n}$.

If $k$ is at its maximum value of $n-2$, the probability of picking a car after switching becomes $$\frac{1}{n}\cdot \frac{n-1}{n-(n-2)-1} = \frac{1}{n}\cdot \frac{n-1}{1} = \frac{n-1}{n}$$For $n=3$, this is the solution to the original Monty Hall problem.

Switch.

(Unless you want the goat).

A few minutes later, the goat from behind door C drives away in the car.

• Upvote just for the XKCD. And yeah I know we're not supposed to add comments like that. – Paul Nov 12 '15 at 21:42
• The general solution is my favourite way to describe it to deniers. I'll take a deck of cards, Make note of where the ace of spades is, and ask them to pick a card. I then eliminate all but 1 of the remaining 51 cards, and ask them if they think it's a 50% chance that they're holding the ace of spades. – Cruncher Dec 29 '16 at 17:31
• Would love your mathematical input on this question – random65537 Aug 3 '17 at 9:16

I just wanted to add here the "long way" of doing it.
I mean all the possible cases.

Case 1.
Car Goat Goat

Case 1.1.
You choose door 1.

Monty opens| switch | don't switch
2      |  Lose  |      Win
3      |  Lose  |      Win


Case 1.2.
You choose door 2.

Monty opens| switch | don't switch
3      |   Win  |     Lose


Case 1.3.
You choose door 3.

Monty opens| switch | don't switch
2      |  Win   |     Lose


Case 2.
Goat Car Goat

Case 2.1.
You choose door 1.

Monty opens| switch | don't switch
3      |  Win   |     Lose


Case 2.2.
You choose door 2.

Monty opens| switch | don't switch
1      |  Lose  |     Win
3      |  Lose  |     Win


Case 2.3.
You choose door 3.

Monty opens| switch | don't switch
1      |  Win   |     Lose


Case 3.
Goat Goat Car

Case 2.1.
You choose door 1.

Monty opens| switch | don't switch
2      |  Win   |     Lose


Case 2.2.
You choose door 2.

Monty opens| switch | don't switch
1      |  Win   |     Lose


Case 2.3.
You choose door 3.

Monty opens| switch | don't switch
1      |  Lose  |     Win
2      |  Lose  |     Win