The Monty Hall Problem

An Explorable Explanation of the Classic Three Door Problem

Introduction

The Monty Hall problem is a

probability brain teaser
based on the classic game show, Let’s Make a Deal!. It is named after the show’s original host, Monty Hall. In the game, there are three closed doors. Two of these doors have goats behind them, and one of them has a car behind it. If you pick the door behind the car correctly, you win! Halfway through the game, a door will be revealed to have a goat, and you will have an option to switch doors. After, the door with the car will be revealed and you will get to see if you chose wisely!

Try playing the game a few times,

alternating between the stay and switch strategy
. Look at your win percentages for both strategies. Notice anything interesting?

Choose a door!

Stay Wins: 0
Stay Losses: 0

Stay Win %: NaN%

Switch Wins: 0
Switch Losses: 0

Switch Win %: NaN%

Total Wins: 0
Total Losses: 0

Total Win %: NaN%

Understanding the Paradox

Surprisingly, the

odds of winning the car aren’t 50-50
. Let’s walk through the following scenario together to understand why.
Click on the nodes to follow along!

1. Suppose you choose Door 1.
Since there are 3 doors, each has an equal 1/3 probability of containing the car.

2. Location of the car.
If the car is behind Door 1, Monty will open either Door 2 or Door 3 with an equal 1/2 probability since neither holds the car. If the car is behind Door 2, Monty will open Door 3 so as not to reveal the car. If the car is behind Door 3, Monty will open Door 2 so as not to reveal the car.

3. Understanding path probability.
To get the probability of a path, multiply the probabilities on that path. For example, suppose you follow the top path, i.e. you pick Door 1, the car is actually behind Door 1, Monty opens Door 2, and you decide to stay. The probability of this path is 13(12)=16\frac{1}{3}(\frac{1}{2}) = \frac{1}{6} .

4. Finally, let’s analyze each strategy.
(Make sure you’ve expanded all nodes first!)
Stay
Looking at all of the Stay paths, see how the total path probabilities leading to the Car and Goat differ.

Car: 13(12)+13(12)=13\frac{1}{3}(\frac{1}{2}) + \frac{1}{3}(\frac{1}{2}) = \frac{1}{3}

Goat: 13(1)+13(1)=23\frac{1}{3}(1) + \frac{1}{3}(1) = \frac{2}{3}

Switch

Now do the same for all of the Switch paths.

Car: 13(1)+13(1)=23\frac{1}{3}(1) + \frac{1}{3}(1) = \frac{2}{3}

Goat: 13(12)+13(12)=13\frac{1}{3}(\frac{1}{2}) + \frac{1}{3}(\frac{1}{2}) = \frac{1}{3}

As you can see,

switching doubles your chances
of winning the car!

Why Information Matters

You may be thinking that once there are only 2 doors left, the odds of winning must be 50-50. These choices would be equally likely if you knew nothing about either choice, but the key is that you do. Monty knows where the car is and won’t choose to open the door with the car. Thus, by revealing a door with a goat, he’s giving you more information. You’re left with
a more informed choice rather than a random one
, making the probability of that last door having the car greater than a random 50-50.

Simulating More Trials

If you only played the game a few times, you may not see that staying gives you a 1/3 chance and switching gives you a 2/3 chance of winning. However, as you increase the number of trials, you will see that the win percentages do, indeed, converge to 33.3% if you

stay
and 66.7% if you
switch
.

See for yourself by running the similulation below!
Note that running a single trial includes one trial of the stay strategy and one trial of the switch strategy.

Generalizing the Game

Understandably, you may still be skeptical about why switching doors can double your chances of winning. Let’s go through a larger scenario to see why switching is always in your favor. Imagine that instead of 3 doors, there are 100 doors. There is still only 1 prize, but this time, Monty opens 98 doors.

In other words, you originally pick 1 door, which has a 1/100 chance of containing the car. Monty looks at the 99 other doors and opens 98 with goats. In essence, he is

filtering the other doors and leaving you with the best door out of the 99
.

So now, do stick with your random original door, or the door that was filtered out from 99 other doors? Hopefully you can see that

a filtered choice is better than a random one
. Now let’s see how much switching helps you, depending on the scenario.

Implementing the Generalization

As described, the problem can be generalized to any number of doors and prizes.

Suppose there are dd doors, pp prizes, and Monty opens xx doors
. Because Monty will never open the door you originally chose or open a door with a prize behind it, the number of doors he will open is constrained to

xd1px \leq d-1-p

Since there are dd doors and pp prizes, the

probability that your initial choice will contain a prize
is

pi=pdp_i = \frac{p}{d}

Considering the summation of all dd doors, the

probability of winning
is

pd×d=p\frac{p}{d} \times d = p

As Monty opens doors without prizes, this sum pp must remain the same, since

all of the probability of winning remains in the unopened doors
. As explained, the original door you select has a probability pip_i of winning. The d1xd-1-x remaining doors must all have the same probability prp_r . Thus, this sum must be

pi+pr(d1x)=pp_i + p_r(d-1-x) = p

Rearranging the equation (click here to show/hide all of the steps), the

probability of winning for one of the remaining doors prp_r
is
pr=pi×d1d1xp_r = p_i \times \frac{d-1}{d-1-x}
pr=ppid1xp_r = \frac {p-p_i}{d-1-x} pr=pp/dd1x×ddp_r = \frac {p-p/d}{d-1-x} \times \frac{d}{d} pr=pdpd(d1x)p_r = \frac {pd-p}{d(d-1-x)} pr=p(d1)d(d1x)p_r = \frac {p(d-1)}{d(d-1-x)} pr=pd×d1d1xp_r = \frac {p}{d} \times \frac{d-1}{d-1-x} pr=pi×d1d1xp_r = p_i \times \frac{d-1}{d-1-x}

Thus, if you switch doors, you will have a prp_r probability of winning, which is

always greater than your original pip_i probability
since

d1d1x0\frac{d-1}{d-1-x} \geq 0

for all values of xx and dd . Note that dxd \geq x since xd1px \leq d-1-p as previously described.

This value also represents the

benefit of switching
, i.e. the factor by which switching increases your chance of winning. For the traditional Monty Hall problem, this factor is

31311=2\frac{3-1}{3-1-1} = 2

and pip_i and prp_r are 1/31/3 and 2/32/3 , respectively.

Try It Out Yourself!

Input values for the number of doors dd , the number of prizes pp , and the number of doors Monty will open xx .

See how the benefit of switching changes as you vary these values, then play the game!

Note that if you alter the parameters, the new parameters won’t go into effect until you press the Play Again button in the game box.
dd :
pp :
xx :
Stay Win Probability (
pip_i ):
0.3333
Switch Win Probability (
prp_r ):
0.6667
Benefit of Switching Multiplier:
2.00

Choose a door!

Stay Wins: 0 Stay Losses: 0

Stay Win %: NaN%

Switch Wins: 0 Switch Losses: 0

Switch Win %: NaN%

Total Wins: 0 Total Losses: 0

Total Win %: NaN%