Mar 18 2009

Good old Monty Hall!

Published by Briggs at 5:15 am under Statistics

Monty Hall

It’s about time we did the Monty Hall problem.

Many of you will already know the answer, but read on anyway because it turns out to be an excellent example to demonstrate fundamental ideas in probability.

Incidentally, I just did this yesterday to a group of surgical residents: you might be happy to know that none of them got the right answer. One even insisted—for a while—that I was wrong.

Here’s the problem.

Setup: Monty Hall shows you three doors, behind one of which is a prize, behind the other two is nothing. Monty knows which door hides the prize. You want that prize.

Rule: You pick a door that Monty will open. You are free to change your mind as often as you like.

The Pick: I’ll suppose, since I can’t quite hear you, that you picked A (the resident yesterday took that one) and did not change your mind.

A

B

C

Door Door Door

Question: What is the probability that the prize is behind door A?

Answer: Almost everybody will–correctly—say 1/3. Why?

Well, conditional on the evidence we have, which is that there are three doors and the prize is behind one of them, we deduce the probability to be 1/3.

Probability is always logically assigned conditional on evidence of some kind. Here, the evidence is simple to articulate. But it isn’t always so easy.

(Incidentally, frequentist statisticians cannot answer this question. And subjective Bayesians, if they are coherent, cannot argue with somebody who said the probability was 92.4%. Sorry—can’t resist the digs.)

What Monty does next: He opens a door; not the one you picked, and obviously not the one with the prize behind it and asks if you would like to keep your original door choice our would you like to switch?

Question: Which strategy, staying or switching, maximizes the chances of you winning the prize? We can state this another way, but first let Monty open door B.

A

B

C

Door Door Door

You can see, by the brilliantly conceived graphics, that there is no prize behind door B.

Same question: This is equivalent to the one we just asked. What is the probability that the prize is behind door A (or C)?

Your Answer: What’s that? You said 1/2? Why?

Evidence: Did you say to yourself, since you well learned the lesson that probability is conditional, that “There are just two doors and the prize is behind one of them”? If you said that, then conditional on that evidence, the probability is 1/2.

But that is not the best answer. What you should do is switch, because the probability that the prize is behind door C is 2/3!

Conditional on other evidence, that is.

What other information could there possible be?

Right now, we know that the prize is either behind A or C. Let’s assume it’s behind C, as in this picture.

A

B

C

Door Door Door

Could Monty have opened door C? No. He was forced to open B.

So in this case, it would be better for you to switch (obviously, because the prize is behind C).

Suppose that instead of A you had first picked door B. Which doors could Monty have opened? Right: only A. And again you should have switched.

Now suppose you had first picked C. Which doors could Monty have opened? Right: A or B. And in this case you should stay.

If the prize is behind C, that makes two situations where you were better off switching and one where you should stay. Do you agree?

Then we have the answer, because the exact same analyses can be made if the prize were behind A or B (try it yourself). Thus, the probability of winning is 2/3 if you switch and 1/3 if you stay.

What was the evidence that you failed to condition on when you said the probability was 1/2? You forgot that Monty’s choice of which door to open was constrained. He couldn’t open the door you picked and he couldn’t open the door that hid the prize.

That very simple information radically changed the probability structure of the answer.

———————————-
I stole and modified the door picture from this Australian government site.

Pass this article on. Email me article suggestions.
  • Facebook
  • Twitter
  • HackerNews
  • Reddit
  • LinkedIn
  • Print

32 responses so far

32 Responses to “Good old Monty Hall!”

  1. Luke Warmer says:

    A great problem.

    Did you see the TED talk on probabilities with the example of a test for a disease with 99% certainty etc. That’s a good one, especially if you’re working with medics. Also the HTT v HTH is interesting:

    http://www.ted.com/index.php/talks/peter_donnelly_shows_how_stats_fool_juries.html

    Apologies, I don’t (yet) have your book and I haven’t been following your blog for long, especially on stats, so P(eggs, grandmother, suck, teaching)= high.

  2. Patrick Hadley says:

    I think the easiest way to really understand the problem is to imagine that there are 1000 doors. You pick one and the probability of being correct is 0.001.

    The quizmaster then opens 998 doors which do not have a prize behind them, leaving you to decide whether to swap or stay with the one you have chosen. Now the probability that you were right first time stays exactly the same at 0.001. Therefore the probability that the prize is behind the other door is 0.999.

  3. conard says:

    One more try at posting a script my young son and I wrote together. He was (and I think still is) convinced that HE should not be bound by the ‘switch’ rule since his selections are somehow special.

    Fortran in R:

    #
    # lmad.R
    #
    # simple simulation of the game Lets Make A Deal to demonstrate that thinking
    # about probabilities is sometimes difficult even in the simplest of situations
    play <- function(nContestants=1000) {
    #
    # locals
    DOORS <- c(1,2,3)
    lmad=matrix(0, nContestants, 6) # P,C,M,C',!switch,switch

    #
    # put the big prize behind a door
    # have the contestant make a guess
    # monte will also pick a door. his pick will be cleaned up later
    lmad[, 1]=ceiling(runif(nrow(lmad), min=0, max=3))
    lmad[, 2]=ceiling(runif(nrow(lmad), min=0, max=3))
    lmad[, 3]=ceiling(runif(nrow(lmad), min=0, max=3))

    #
    # this is a more matlab/r way of doing this. come back and fix this up later
    for(cursor in 1:nrow(lmad)) {
    #
    # clean up monte's pick
    # monte cannot select the same door as the contestant
    # monte also knows where the prize is and he will not pick it! this is the
    # key to the whole problem
    while(lmad[cursor, 3] == lmad[cursor, 2] || lmad[cursor, 3] == lmad[cursor, 1]) {
    lmad[cursor, 3] = ceiling(runif(1, min=0, max=3))
    }

    #
    # one in three leg
    # contestant decides that they have made the right guess and will stick with
    # their initial choice.
    if(lmad[cursor, 1] == lmad[cursor, 2]) {
    lmad[cursor, 5] = 1;
    }
    # game over

    #
    # two in three leg
    # contestant decides they did not pick correctly. monte's biased (non-random)
    # action guarantee that a switch will win if you entered this leg with an
    # incorrect guess
    lmad[cursor, 4] <- 6 - (lmad[cursor, 2] + lmad[cursor, 3])
    if(lmad[cursor, 1] == lmad[cursor, 4]) {
    lmad[cursor, 6] = 1;
    }
    }

    # hist(lmad[, 1], c(0,1,2,3))
    # write(lmad, file="lmad.csv", sep=",")
    print(lmad)
    print(sum(lmad[,5]))
    print(sum(lmad[,6]))
    }

  4. Briggs says:

    Conrad,

    Thanks very much! I look forward to trying out.

    Patrick,

    My heart soars like a hawk. That is just the right way to solve problems like this: exaggeration. I will steal your idea.

    Luke,

    No worries. But, yeah, we did link that one. Keep on giving us ideas, though!

  5. JH says:

    A great teaching example.

    “Incidentally, frequentist statisticians cannot answer this question.”

    Now, being a frequentist and a half-baked Bayesian, I find this statement very funny… Not! ^_^

    In other words, if you chose the door with prize at first and switch, you switch away the prize. Now there is a 1/3 chance that the chosen door holds the prize originally. So the chance of not winning is 1/3 if you use the policy of always switching.

  6. Luis Dias says:

    It’s a classic :) .

  7. Stefan says:

    I have a question about this that puzzles me.

    I follow the reasoning that one should switch doors. That reasoning considers multiple plays. But why does that reasoning still apply when the contestant only gets to play once?

    Yours, puzzled.

  8. Bernie says:

    Patrick, brilliant!! I have two questions. How will Monty fit all those doors on the stage and how will he open 998 of them before the show ends?

  9. Bernie says:

    Stefan:
    If you only play once, i.e., chose a door, then there is no game and no puzzle. Variants can obviously be created, e.g., how much will you bet that you are right after Monty opens one of the remaining two doors – you can double or halve or stand pat. All variants, however, require a second decision that takes into consideration the additional information.

  10. Stefan says:

    Bernie, thanks I didn’t express that well. I meant go once through the whole game, ie. choose one door, then decide whether to switch to the other.

  11. Briggs: yes, steal Patrick’s thousand door idea, but I beg you not to abandon your own explanation. The thousand door idea helps one accept the true answer, and I have seen it around many times over the years. But yours is the best qualitative explanation I’ve seen that helps me understand it intuitively.

  12. Bernie says:

    Stefan:
    If you play the same game only once, the logic still holds because the prior odds hold. Multiple plays do not influence the logic because the games are independent as in if a fair coin shows heads 50 times in a row, there is still a 50-50 chance that heads will show the next time the coin is tossed. But perhaps I am still missing your point.

  13. Courton says:

    Dang. Try as I might, I fail to grasp this.

    - Monty shows me an empty door.
    - Maybe I picked the prize door right off the bat.
    - Or maybe I didn’t.
    - Either way, Monty *always* has an empty door with which to open and taunt me, his nerve-wracked contestant.
    - Of the two remaining doors, one hides the prize, and the other doesn’t.

    - Soooo, AT THIS POINT, its: “heads, I picked the right one on the first try – tails, I didn’t.”
    - Heads, I should keep the door I picked originally, tails, I shouldn’t.

    Really, I’m thinking ya’ll statisticians are probably just bad wicked people.

  14. Keith says:

    Thanks!

    This is by far the clearest explanation of this problem that I have seen.

    The key word which you used, but others omitted, is “constrained”. With prize behind C, and the contestant picking A, Monty HAS to open B. And that changes everything.

    Now I really understand this.

  15. lucia says:

    I must mis-remember the game. I thought there was always the “wonderful” prize, the donkey and the pretty good prize. I thought the contestant picked, and Monte always opened the door for the medium prize. Then, you got to change your mind.

    Sometimes, he opened the door the contestant picked, in which case, you discovered they’d picked the “medium” prize and one of the other doors. So, they knew they would either trade up to the wonderful prize or get the donkey.

    Otherwise, if they picked the winner or the donkey, he showed the medium prize. So, they knew they either had the wonderful prize or the donkey.

    But… I guess I didn’t watch the show very well, because your description of the MonteHall problem doesn’t match the rules I thought I remembered!

  16. D Johnson says:

    Lucia, I think I would stay with the door I originally picked in your example. I could use the donkey here on my farm. :-)

  17. Mike D. says:

    The Monte Hall Problem is so famous it has a listing in the Wikipedia:

    http://en.wikipedia.org/wiki/Monty_Hall_problem

    It’s a long listing. It includes the Three Prisoners Problem (similar), N doors, Quantum Game Theory, and the Bayesian Solution (which gets the same answer but with lots of equations). My favorite is the Decision Tree (the pictographic solution) because diagrams are helpful to visual types like me.

    My main recollection about the Monte Hall Problem is that Marilyn Vos Savant made a lot of dough off it. She somehow got herself listed in the Guinness Book of World Records under “Highest IQ” and parlayed that into a successful pop science journalism career. Monte gave her a big boost with that. She also landed Robert Jarvik, inventor of the artificial heart, as her husband. So I guess Marilyn is pretty smart after all.

  18. conard says:

    Briggs,

    Before turning in for the night I took a few minutes to rewrite the procedural code in a manner more consistent with matlab/r style. It is harder to step through with a 12 year old but looks a little nicer on the page.


    # lmad.R
    # simple simulation of the game Lets Make A Deal to demonstrate that thinking
    # about probabilities is sometimes difficult even in the simplest of situations
    #
    # columns: winningDoor, pickedDoor, openedDoor, resultKeep, resultSwitch

    #
    # openDoor
    # monte knows where the prize is but cannot open the winning door.
    openDoor <- function(v) {
    while(v[3] == 0 || v[3] == v[1] || v[3] == v[2]) {
    v[3] = ceiling(runif(1, min=0, max=3));
    }
    return (v[3]);
    }

    play <- function(nContestants=10000) {
    lmad=matrix(0, nContestants, 5);
    #
    # put the big prize behind a door
    lmad[,1]=ceiling(runif(nrow(lmad), min=0, max=3));
    # have the contestant make a guess
    lmad[,2]=ceiling(runif(nrow(lmad), min=0, max=3));
    # have monte open a door (column3)
    lmad[,3]=apply(lmad, 1, openDoor);
    # results for keeping original choice [ expected 1 in 3 ]
    lmad[,4]=apply(lmad, 1, function(v) {return (v[1]==v[2])});
    # results for switching [ expected 2 in 3 ]
    lmad[,5]=apply(lmad, 1, function(v) {return (v[1] == 6 - (v[2] + v[3]))});

    #
    # print results
    #hist(lmad[,1], c(0,1,2,3));
    #write(lmad, file="lmad.csv", sep=",");
    #print(lmad)
    print(sum(lmad[,4])/nrow(lmad));
    print(sum(lmad[,5])/nrow(lmad));
    }

  19. George Crews says:

    Hi Briggs,

    Also contributing to the problem is our reluctance to “regret” our choices and, if given an opportunity, change our choices. See The Collapsing Choice Theory by Jeffrey M. Stibel, et. al.

    I have taught computer programming and have used the Monte Hall Problem as an in-class assignment. The students’ simulations would always yield the result they expected rather than the correct result! I have posted on this here. As a software quality assurance engineer with an engineering-science background, and having examined many other simulations including from our national labs, I believe this effect is not necessarily confined to students.

  20. PaddikJ says:

    Mike D. says: 18 March 2009 at 10:29 pm

    I’m actually surprised it took so long for someone to mention Marilyn. When you say that she “somehow got listed in Guiness . . .” I would suggest that the “somehow” was because she had the highest IQ ever recorded to that point. At that point, Parade magazine did a profile of her, including some questions, and the response was so positive that Parade invited her to do a regular column. Doesn’t seem to be much forethought on her part about “making a lot of dough.”

    When she first posted the Game Show Problem, she got a lot of very condescending, and even sexist, flak from academic mathmeticians, but she stuck to her guns, eventually enlisting the aid of hundreds of high school science and math teachers, who, in thousands of trials, overwhelmingly and empirically proved her right.

    You can get the complete story here:

    http://www.marilynvossavant.com/articles/gameshow.html

    Wikipedia also has a good entry on her.

  21. PaulD says:

    I was wondered whether this logic applies to the popular game show, Deal or No Deal. I don’t think it does.

    In the show, the contestant picks one suitcase out of 25 at the start of the show. The suitcases contain various dollar amounts from $1.00 to one million dollars. He then eliminates the remaining suitcases one by one and learns what they contain as he eliminates them. If the contestant chooses to keep going he will eventually reach a point where the only suitcases remaining are his first choice and the last suitcase eliminated.

    To make this interesting lets say the contestant reaches the end and knows that that one of the suitcases contains $1.00 and the other $1,000,000.

    If I understand the analysis correctly, the Monty Hall solution would not apply to the Deal or No Deal situation because the contestant did not know before hand what is in the suitcases he chooses to eliminate. He is not like Monty Hall who knows and purposely eliminates all but the $1,000,000 suitcase. So at the end of the show, the chance that the contestant’s original choice is the $1,000,000 suitcase is 50/50.

    Is this correct?

  22. Patrick Hadley says:

    Paul D I think that your question is interesting.

    At the beginning of the game the chance of the million being in the contestant’s case was (if there were 20 cases) 0.05.

    In your example at the end only two cases remain and we know that one contains a million and the other only a dollar, does that mean that the probability of the other case containing the million to be 0.95? On that reasoning the candidate should always swap.

    Of course you are right when you say that the probability of the million being in either case is 0.5 . The whole point of the game show is that every time a case is opened that is not the million the chances of the million being in the contestant’s case increases. Therefore the value of offers will increase the longer the bigger prizes are not found in the opened cases. When there are only two cases left there the two prizes are each equally likely to be in either case.

    In the Monty Hall problem, because the host knows which door has the big prize, a door being opened does not change the likelihood of the prize being behind the chosen door.

  23. jack mosevich says:

    There is another cute probability problem which made the rounds years ago because its solution in some texts was wrong: You go to a house in which there are 2 children. You ring the doorbell and a boy answers. What is the probability that the other child is a boy?

  24. Briggs says:

    Jack,

    That one—there is more than one variant—is another from national treasure Martin Gardner. The the variant is: two kids, you learn at least one is a boy. What is the probability the other is a boy?

    If you ever enter a used bookstore and see a Gardner on the shelf, grab it.

  25. Kevin Jackson says:

    Increasing the number of doors, as Patrick Hadley suggested, is a great way to explain the problem. But if you are looking for a more visual example, a deck of cards works just as well.

    You can demonstrate the problem with 52 ‘doors’, and work your way down to just 3. This method emphasizes that the thing to focus on is not all the doors you’ve opened (or cards you’ve revealed), but on the one you didn’t touch.

  26. SteveBrooklineMA says:

    I remember actually “doing” the 1000 doors experiment many years ago with my dad. Well, it was 100, not 1000, and it was file folders, not doors. I took 100 empty folders and put a dollar in one of them. After dad chose one from the pile, I tossed aside 98 others and asked him if he wanted to switch. That convinced him.

    However, I think there is still a difficulty with the way you present the problem. When you say

    “What Monty does next: He opens a door; not the one you picked, and obviously not the one with the prize behind it and asks if you would like to keep your original door choice our would you like to switch?”

    it’s not really clear if Monty is constrained to always do this or if he just chose one of the two remaining doors at random (50-50) and it just happened to be empty. The word “obviously” in there does help a bit.

    Fundamentally, the problem is that it’s not clear from the presentation of the problem whether our prior knowledge is only that there is a prize behind exactly one of the doors, or if our prior knowledge also includes a strategy that Monty must always follow.

  27. Greg Cavanagh says:

    I might and an easier way to state it:
    You’re guaranteed to win if you choose the wrong door to begin with.
    You’re guaranteed to loose only when you accidentally choose the correct door.

  28. Wade Michaels says:

    I think most people confuse the possible outcome probabilities with the *which door* probabilities, meaning, they only see a Win or a Loss and Door {Win} and Door {Loss}, thus the thinking that the probability *must* be 50/50.

    Reminds me of a problem that nailed everyone in high school becaue they couldn’t grasp the shifting frame of reference:

    Three people go to a hotel, cost is $25, each gives $10 to bellhop (Total=$30).
    The Bellhop keeps $2 in tip and gives each $1 back ($9 per person).
    If each person paid $9 for a total of $27, and the bellhop has $2, for a total of $29, where’s the other dollar?

  29. ad says:

    Took me a while Wade but I finally got it. Each person paid $9 for a total of $27. But the bellhop’s $2 comes out of that $27, leaving $25 for the hotel. There never was a total of $29, so the problem as stated actually contains a lie, or at least a deliberate misdirection.

  30. Wade Michaels says:

    Ad,

    Got it. (both anwers!) It’s a misdiretion. I’m thinking this is why people confuse the Monty Hall problem. They think the question is “what is the probability the prize is in one of two doors, the one you have already chosen, and another door.” The actual qestion is: “what is the probability the prize is behind one of 3 doors conditioned under the following rules…”

  31. Rodney Crislip says:

    Probability and statistics don’t apply to single events. You either pick the right door or you don’t.Switching doesn’t help. When you say your chances improve by switching that is taken from information about multiple tries. If you were on Monte Hall every week for a year then you would probably win more times than not if you switch. However you could lose 10 times in a row just as you could flip a coin and get tails 10 times in a row. I understand why statistically you would win 2 out of three time in multiple attempts. But this doesn’t apply to a single event. You either win or you lose. If you switch and lose or don’t switch and win, how does knowing the statistics help you?

  32. Briggs says:

    What you said, Rodney, is false. Probability does apply to single events. At least, if you think about probability logically, the way we have analyzed the problem here.

    In classical frequentist statistics, it’s true that you cannot think of any number of events less than the limit, which is to say, infinite numbers of them. But since we’ve not yet—none of us—ever seen an infinite number of events, we’ll never be able to verify any frequentist claim. There is quite a large, and growing very quickly, number of us who reject frequentist philosophy and instead use probability in its logical sense. Have a look around for some other articles on the subject.

    Gist is, since probability can apply to single events, we can use probability to analyze this problem.