
Monty Hall problem explained visually - vicapow
http://blog.vctr.me/monty-hall/
======
Scriptor
One approach that really helped me out was to extend the problem from three
doors to a million doors.

You're allowed to pick one door, out of a million. Then, the host opens
999,998 of the other doors which he _knows_ have a goat. This leaves the
closed door you picked and one remaining closed door.

So, there's now two possibilities. Out of _one million_ doors you somehow just
happened to have guessed right and picked the right one. Or, you're wrong. If
you're wrong then the correct door would be the other closed one.

~~~
jiggy2011
Does it matter whether or not the host knows? I don't see how it changes the
odds in any way, unless of course he opens the door with the car (very likely
with 1 million doors).

~~~
ds9
The fact that you asked this question shows what's wrong with the supposed
"problem". In the usual presentation, it's a "trick question" because the
person presenting it _omits the crucial information_ that the offeror is
_intending to act adversely_ to the decsion making subject.

Without that information, the interlocutor naturally assumes that the offeror
opens doors randomly - in which case the fact that he knows what's behind each
door is an irrelevant "red herring" and _the correct conclusion is different_.

In the random-opening case the intuitive conclusion is right - that the agent
(offeree)'s decision does not affect the odds. But if the question-poser
revealed that the offeror is trying to maneuver the offeree into the result
that's less valuable for the offeree, then the supposed mystery of the whole
thing evaporates and the correct conclsion is obvious.

~~~
hsitz
Ha, interesting. Yes, well, back when the problem was invented it was assumed
that everyone was aware of the TV show "Let's Make a Deal" and how the
scenario worked. The host/offeree (a man named Monty Hall) _never_ picked a
door that had the prize behind it, implying that he _always_ knew where the
prize was.

------
error54
Nice explanation. Small critique: I think this page would be better if the
animations could be played manually rather than on a continuous loop which is
quite distracting. Also, maybe add in a bit where the user can play the game
themselves to see the logic work out.

Something like this was useful when I was first learning about the Monty Hall
problem.

[http://www.grand-illusions.com/simulator/montysim.htm](http://www.grand-
illusions.com/simulator/montysim.htm)

~~~
jbindel
There's no need for the animations at all. Besides not letting the reader work
through the problem at her own pace, the animations hide the previous steps.

------
jbellis
The best explanation I've seen of the Monty Hall problem is still Oscar
Bonilla's: [http://oscarbonilla.com/2009/05/the-monty-hall-
problem/](http://oscarbonilla.com/2009/05/the-monty-hall-problem/)

~~~
sanoli
Best explanation I've seen was using statistics: simulate the problem 1000
times. Look at results when you switch and when you don't switch doors. Or do
it in your head: If I switch doors, I will win with 2 out of 3 doors.
Otherwise, I'll win only with one door.

------
CWuestefeld
I liked the simulation, and it reminds me of a tangentially related
probability issue from early in my career.

While still in college, I had a part-time job testing a spreadsheet product
(back in the days when there were other commercial choices). One of the things
we testers did to keep ourselves entertained was that we each picked a casino
game, and implemented that game in spreadsheet macros. My game was blackjack,
but another guy did craps.

Just for kicks, the guy who built the craps game re-wired it as an autoplay
simulation, and left it playing against itself overnight. When we came back in
in the morning, we found that the virtual player was rich, which seemed odd.
So the next night we left it running again, and again the following morning,
the player had made a bundle.

It turns out that my coworker had accidentally discovered a bug in the random
number generator: the distribution of the results was a bit non-uniform.

------
bsirkia
Very cool way of illustrating it. It looks like you just used iframes for the
animations so they were in separate pages with distinct stylesheets, JS
resources, etc., why did you do that rather than having the Jquery animations
happen in the main document? Was it just to keep things nicely modular?

------
LanceH
I've usually found the problem poorly worded (probably intentionally). An
assumption that Monty knows which door is which is required but often not
stated. If Monty doesn't know which door is which, the odds are 50-50 like
you'd imagine.

~~~
cma
He just has to not open a door with the car behind, it doesn't matter whether
intentional or not. If he forgot his intentionality but takes the exact same
actions by chance, the stats don't change for the player.

~~~
ubercow13
This isn't right though, it makes all the difference whether he acts knowingly
or happens to pick a goat; it's a 50/50 chance on changing if he chose a goat
by luck (see other posts ITT)

------
intellegacy
I suspect that much of the contention around this famous problem is based on
the original boundaries / rules of the problem being unclear.

The problem as stated sometimes leaves out crucial information that affects
the outcome.

Example:

Game show, 3 doors. Contestant chooses one door. The host opens another door,
which has a goat. Do you switch?

In this situation, it is not explained whether the host randomly picked one of
the two remaining doors to open, without knowledge that one of them would
contain a goat. This is the key missing information. If the host ALWAYS
reveals the goat, then it is beneficial to switch as 2 out of 3 times the
contestant wins by switching.

However, if the host is simply opening another door at random, and the door
happens to contain a goat, then there is no advantage to switching, as the
odds are 50/50.

edit: it appears that from the original version of the problem stated in
Parade magazine, the implication is that the host knowingly reveals a goat.

"Suppose you're on a game show, and you're given the choice of three doors:
Behind one door is a car; behind the others, goats. You pick a door, say No.
1, and the host, who knows what's behind the doors, opens another door, say
No. 3, which has a goat. He then says to you, "Do you want to pick door No.
2?" Is it to your advantage to switch your choice?"

------
pbreit
For this to really work, it must be clarified up front that Monty is going to
give you the opportunity to switch every time the game is played.

------
mercer
I've tried to think of the best way to make this obvious. This is what I came
up with, and I'd like to hear if it's accurate:

Contestant picks a door out of three. 1/3rd chance he's got the car. Then he
is given the choice to either stick with his door, or do a coin-toss where you
have to pick heads.

In this case, it seems obvious that option for the coin-toss is the better
option, because it gives you a 50% chance of winning.

The confusing part of the problem is that you feel like you're doing one
thing, where really it's two independent games where one clearly offers a
bigger chance of winning.

That said, some people here have mentioned that it's not actually a 50% chance
if you switch doors. So maybe my explanation is incorrect? And if it's
incorrect, is it still correct enough to show that switching doors (i.e.
opting for the coin-toss) is the better option?

------
yconst
Looking this up on Wikipedia reveals it's relationship with the Three
Prisoners Problem[1] as well. The solution presented in that case helped me in
reasoning about it.

[1]:
[http://en.wikipedia.org/wiki/Three_Prisoners_problem](http://en.wikipedia.org/wiki/Three_Prisoners_problem)

------
toddmorey
Here's how it helps me to look at it. As others have said, you can play with
the numbers, but the mechanics are basically this:

First step: you are choosing one option from all available choices. Second
step: you are now betting whether your original choice was the correct one.

By consciously narrowing down all the remaining options to one, the host is
essentially asking you: "Do you think you guessed right?" As long as there are
more than two available options at the start, the odds are greater than you
guessed wrong.

As others have said, the important dynamic here is that the host _knows_ where
the prize is and proceeds to open all the other doors, leaving only yours and
one remaining closed. That remaining door then symbolizes an aggregate of all
the doors you didn't select.

~~~
dllthomas
Consider the version where Monty does not know what door the car is behind. He
randomly opens one of the other two doors, and (per the rules) if he reveals a
car, game over too bad. This time, he happened to reveal a goat. Why is the
question _not_ "did you guess right originally?"?

I'm quite convinced _that_ it is different if the host knows versus if he does
not, but I've never quite been able to put my finger on why in an intuitive
way.

~~~
toddmorey
That's a great question! I think the person who can articulate that
intuitively should win the car!

My stab at it: If he doesn't know, then he's essentially another contestant,
and his odds are the same 1 in 3 as yours. You've made selections one after
the other, but since your selection has yet to be revealed as either right or
wrong, you are essentially just picking different options from the same
scenario. There are exactly equal chances that you won the car, he flubs and
reveals the car, or he reveals a goat.

~~~
ubercow13
I like frankc's intuitive explanation of the original game given in another
comment:

 _The way I explain is to expand it but also change the frame of reference to
so its clear that the host is an adversary. Imagine we play a game called "who
has the Ace of Diamonds"? I deal you one card face down and I deal me 51
cards. I look at my cards and then choose 50 of them to show you, none of
which are the Ace of Diamonds. Do you want to keep your card or take the one I
have not turned over?_

Now imagine the same set up, but instead, after dealing the cards, I don't
look at them. I then proceed to turn 50 of mine over one after the other and,
though unlikely, I happen to not reveal the Ace of Diamonds. Now, is it any
more likely the last card I haven't turned over yet is the card, than it is
that you have it?

The game is no different in this case to one person lining up all 52 cards and
turning them over one by one along the line. If you get to 50 cards and you
still haven't found it, that obviously doesn't mean it's more likely to be the
_end_ card than the penultimate one.

------
bernardom
Like everyone who encountered this in their intro stats class, I love this
problem. And it bothers everyone the first time.

Are there other problems like the Monty Hall problem, perhaps in other
disciplines?

~~~
jcampbell1
I like this question:

Flip a coin. If it is heads, flip again and answer Yes for heads and No for
tails. If the first coin is tails, answer the question: "Have you ever cheated
on your spouse?"

Now, what is the probability the person is a cheater given they answered yes?

~~~
mildavw
Did I read somewhere that this technique is actually used to gather survey
data where the subject may have reason to lie? They can answer yes but it
remains plausible that it was because of two coin flips coming up heads so
they are not individually implicated. When you aggregate the data over many
subjects, however, you have a better idea of how many actual cheaters there
were than if you asked directly.

Anyway, here is the code below:
[http://jsfiddle.net/nQ3Gu/](http://jsfiddle.net/nQ3Gu/)

    
    
      var runs = 1000,
        honest_admissions = 0,
        automatic_admissions = 0;
    
      function flip() {
        return Math.random() < 0.5 ? 'h' : 't';
      }
    
      for (var i = 0; i < runs; i++) {
        if (flip() == 't') {
            honest_admissions++;
        } else if (flip() == 'h') {
            automatic_admissions++;
        }
      }
      document.write('The "yes" is honest ' + honest_admissions / (honest_admissions + automatic_admissions) + ' of the time.')
    

2/3 of yeses are honest and 1/3 didn't have to answer the question!

~~~
mildavw
Oops. That's completely wrong. It's the case where every honest answer is yes!

I think this is indeterminate. You have to know the ratio of total yesses to
total participants.

The real world use-case I was recalling is simpler: flip a coin and answer
honestly if it's heads and "yes" if it's tails. Any individual response is
non-incriminating, but if N is large enough where you can assume N/2 got
heads, you can know the number of "honest cheaters."

------
allthatglitters
Given two choices (equal probability; redundant?) - which is the case once you
have two doors - switching cannot change the odds. Have someone flip a coin.
Call it. But before the flipper looks at the coin - (whether he KNOWS the
result or not) he asks you to consider switching. Explain how the option of
switching changes the probability of a correct or incorrect call. Inference?

------
Kliment
The best explanation I've seen was in series 3, episode 3 of Jame May's Man
Lab, where they repeatedly iterated the problem and showed that when repeated
enough times, the frequency of winning/losing tends to a different value with
a change of door than without (by having the presenters open booby-trapped
beer cans and either get splashed with beer or not)

------
alco
I can't see how your generalization of the problem to more doors is correct.

In the classical problem with 3 doors, if you pick a door with a car, the host
will only open 1 other door.

In your demo, if I use 40 doors and pick one, the host opens all other doors
but one. Why?

If the one of those 40 I pick has a car, will the host open all remaining
doors? That doesn't seem to be the case for the 3-door variant.

~~~
Jtsummers
In the Monty Hall problem the door with the car is _never_ revealed until the
end. In the 3 door version if you've selected the prize door, the goat
revealed is selected at random. If you've selected a goat, the other goat is
revealed and the car remains hidden behind the remaining (at this point
unselected) door. So with 40 doors, after your selection 38 goats would be
revealed. It may be that you selected the car by chance (1/40 chance), in
which case 38 of the 39 remaining doors would be selected at random (as it
doesn't matter). If you selected a goat only the other 38 goat doors would be
opened (but the contestant can't tell the difference between these
circumstances).

~~~
alco
Still, why? Why open 38 doors? I don't think this emphasizes the difference in
probability, it just creates artificial bias.

Let's analyze the classical problem. After you pick a door, one of the
remaining two doors is opened.

With more doors (say, 11), it wouldn't make for an interesting show if you
opened 9 more doors after the first one. A more reasonable approach would be
to open one additional door and let the player choose to switch or stay with
their choice each time. But that would only complicate the explanation, of
course.

Let's dissect the 11-door case. We will do the following: the player picks a
door, then the host a) opens one other door; b) opens 50% of the remaining
doors; c) leaves one door closed.

IMO, the (a) case is the closest generalization of the original problem. You
have a 1/11 chance to pick the car door on your first try. Then, one other
door is opened, and if you switch to another random door, the best case
probability of you getting the car is 10/11 * 1/9 = 10/99\. This number is
slightly bigger than 1/11.

In the (b) case you get a better result when switching, but to me that just
looks like adding artificial bias. Obviously, the (c) case looks best because
you've removed so much choice by leaving only one other door closed. Adding
more doors does one thing: improves the probability of switching. That's good
if this is what you're aiming for. But this turns it into a completely
different problem.

So, you can see that the result depends on what you want to get. If you try to
stay faithful to the original problem statement, adding more doors actually
makes the benefit of switching less obvious.

In summary, I'm convinced that 3 is not an accidental number in the original
problem statement. Whoever came up with it, they knew how to remove space for
speculation by providing the only reasonable thing to do: open 1 door (or 50%
of the doors) and leave 1 other door closed.

~~~
Jtsummers
(c), I feel, matches the original problem best when taken to an increasing
number of doors, but makes for an absurd game show. It also most closely
resembles the odds of the original game show (win by switching (n-1) of n
times, or 2 of 3 with 3 doors). Anything else becomes a different game (you
don't have a _single_ choice, you have a multitude of choices). And it doesn't
turn it into a _different_ problem, it exagerates the odds of the original
problem to better illustrate the statistics to people whose intuition is
wrong. The case of 100 doors where switching results in winning 99% of the
time gets passed the questioners intuition that it should be even odds
(switching or staying).

(a) demonstrates that the questioners intuition about the probabilities is
off, but (again, IMO) doesn't really offer the clarity of (c).

Re: Summary - I agree, it's not an accident. It was chosen because it was a
good number for a game show, and leaving the participant with 2 options
(switch or stay) ensures a certain swiftness of decision. While (a) (say they
used 4 or 5 doors) offers only a _slight_ improvement on the odds (contestants
may lose too often) and (c) (again with 4 or 5 doors) offers a perhaps too
great improvement of the odds (contestants win too much if they know the
trick).

------
x0n
I have a much easier explanation than this: By offering you the switch, the
host has given you two doors to open - it's irrelevant that he opened one for
you - so, it comes down to picking one door (the one you're on) or two doors
(of which he has opened one for you, again, irrelevant - the effect is the
same) ergo, it's 1/3 or 2/3.

------
taternuts
That's a good looking demo, quite smooth. Implementing this was actually a
recent DailyProgrammer challenge
([http://www.reddit.com/r/dailyprogrammer/comments/1qdw40/1111...](http://www.reddit.com/r/dailyprogrammer/comments/1qdw40/111113_challenge_141_easy_monty_hall_simulation/))

------
zcarter
I always explain this problem with stars: I'm thinking of a star in the
night's sky... guess which one.

Alright, good guess, but would you consider changing? You can either keep your
original guess, or switch to this one other star I'm pointing to now.

Everyone switches.

~~~
brainburn
That doesn't explain anything except that people will be influenced because
you pointed to another star.

------
ryanthejuggler
Heh, Monte Carlo simulation of Monty Hall problem. Mildly amusing... if only
we could work a Monty Python reference in there somewhere!

Watching this play out really kills any remaining gut response that would say
"it's the same either way!"

~~~
gknoy
Just make it show alive/dead parrots, or spam, instead of goats. ;)

"Our table has spam, spam, spam, spam, eggs, spam, spam, and spam. You've
chosen your dish, now let's see what else was on the table...."

;)

------
mactitan
some background:
[http://en.wikipedia.org/wiki/Monty_Hall_problem](http://en.wikipedia.org/wiki/Monty_Hall_problem)
Many readers of vos Savant's column refused to believe switching is beneficial
despite her explanation. After the problem appeared in Parade, approximately
10,000 readers, including nearly 1,000 with PhDs, wrote to the magazine, most
of them claiming vos Savant was wrong

(per above post At least this made it to stats intro class)

~~~
intellegacy
The rules of the problem aren't explained very well. most of the contention
probably is based on unclear boundaries of the game.

------
mathattack
I like the simulation at the bottom. Sometimes it's best to just say, "The
math gets confusing, let's run this a couple times and see what happens."

------
officemonkey
In another 50 years, no one is going to know who "Monty Hall" is.

Except for this "problem" which people will still be arguing about.

------
brainburn
To get people thinking I generally have them agree there are 9 possible games
to play, so the final win-chance cannot be 50%

~~~
jcampbell1
No one thinks the final win chance is 50%. They mistakenly think it is 1/3
with either strategy.

------
damontal
got into a huge fight with a family member over this. i even programmed a
simulation and showed it run over 1000 tries and he still refused to budge
from the 50% answer.

~~~
stefan_kendall
Play a cash game with cards for a while. Dollar bets, dollar return.

Play 50 games every time you see him until he gets it.

