Statistics

# The Monty Hall Problem — Solved!

In honor of Monty Hall, who passed away this past weekend (in October 2017), this classic article (which ran long ago, the date lost due to the hacking, solving his namesake probability problem. Because of comments about adjusting the rules (see below), I have made some additions.

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 [this was in 2012]: 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, A, B, and C, behind one of which is a grand prize, behind the others is nothing. Monty knows which door hides the grand prize. You want the prize.

Rule: You pick a door behind which you think is the prize. 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 settled on A (the resident yesterday took that one) and did not change your mind.

Question: Given the information we have, 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. It is not subjective. Here, the evidence is simple to articulate. But it isn’t always so easy.

What Monty does next: If you did not pick the prize, Monty 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’s suppose Monty opened door B. There is no prize behind door B.

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

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 all the evidence we have, that is. What other information could there possible be? Let’ see.

We know that the prize is either behind A or C. Let’s assume it’s behind C.

When Monty was picking a door to open, to show there was nothing behind it, 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, conditional on all the evidence, 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.

Update In a note to me, Roy Spencer rightly points out that the problem changes if Monty is also ignorant of what is behind the doors (these are new rules). In step two, if Monty opens the door with the prize, which could happen since he doesn’t know originally where the prize is, then it depends on the new rules. Are you still allowed to switch? If so, the probability the prize is behind the open door which you see is, of course, 1, and you should switch. If you are not allowed to switch, then you lose, end of story.

But Monty, since he does not know where the prize is in this updated scenario, might open the empty door. If he does, and if you know Monty is ignorant of the prize location, then the probability the prize is behind the unopened door is 1/2 and it doesn’t matter if you switch or stay.

Categories: Statistics

### 78 replies »

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:

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.

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:

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. Luis Dias says:

It’s a classic :).

6. Stefan says:

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.

7. 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?

8. 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.

9. 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.

10. 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.

11. 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.

12. 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.

13. 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.

14. 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!

15. 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. 🙂

16. 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.

17. 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)); } ```

18. 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.

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.

20. 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?

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.

22. 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?

23. 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.

24. 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.

25. 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.

26. 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.

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?

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.

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…”

30. 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?

31. 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.

32. essaress says:

As I see it, the problem is whether or not Monty is constrained to open any doors at all. If the decision to open another door was made before the contestant chose, then the above analyses apply, but Monty did not ALWAYS open another door after a contestant chose. If Monty is free to make that choice then these probabilities no longer apply, as his decision may not be random at all. He could elect to open another door only when the contestant has chosen correctly.

33. DAV says:

Greg Cavanagh,

I like your answer. It’s a better way to look at it I think. You have a 2/3 chance of picking the wrong door so,the chance that the remaining door contains the prize must be 2/3. Your selection makes two partitions: your door and the other two. You already know that one of them doesn’t contain the prize. Monty will show you which it is but that doesn’t change the probabilities because you didn’t get any new information.

34. DAV says:

Briggs,

* 9am-8pm on weekdays;
* 9am-5pm on weekends and public holidays; or
* at no time on Christmas Day, Good Friday or Easter Sunday –
unless you invite a trader to come outside these times.

“invite a trader to come outside these times” must be one of those cute Ozzie phrases. I assume Monty’s show was prerecorded to take these times into account.

35. Doug M says:

The probabilites are sensitive to your assumptions.
Monte knows which door holds the prize
Monte always shows a door with no prize.

The contrast between the Monte hall problem to the Deal or No Deal problem is a nice illustration.

Patrick Hadley alteration, I can find a large number of people who would insist that the probablity of the new car is behind door #1 never rises above 50%, whether 1 door or 98 doors are removed.

36. Alan Bates says:

Somewhat off topic:

This month is the 250th anniversary of the death of the Englishman and Presbytarian minister, Thomas Bayes FRS. (He died 17th April 1761 in Tunbridge Wells, Kent).

Did I miss any posts on this …?

Suppose you did not know how the game worked. After Monty opens one door to show that nothing is behind it, you realize that you do not know if he opened the door BECAUSE nothing was behind it or if he just randomly selected one of the 2 possible doors. Now that is an interesting dilemma.

It seems likely that Monty would always chose a door with nothing behind it, because the game is more interesting that way. So you should always switch. But then again, perhaps Monty will ALWAYS open the door with the prize behind it (if he can), because then the gameshow wouldn’t have to give away a prize! Then you should always stay. Perhaps he could even have opened the door that you initally chose!

38. Tom M says:

Classic. I’d like to see a post detailing parrondo’s paradox, as I have trouble understanding it…you have a way of making things rather clear.

39. DAV says:

I’ve been thinking about Monty selecting a door randomly and then, if it didn’t shield the prize, ask if you want to switch. It seems to me that the probability the prize is behind the remaining door is still 2/3 because you didn’t learn anything new. Obviously, if the opened door had the prize the question would be moot. Finding it doesn’t have the prize is indistinguishable from Monty being forced to open it because it had none. Why then would it matter if he had chosen randomly?

Consider the following possibilities (assume the prize is behind door C and the contestant’s pick is to the left of the line.

A | B C
B | A C
C | A B

If Monty fails to open door C, what would have changed that makes it different from Monty restrained from opening C? Note that C appears twice on the right and only once on the left. IOW: regardless of what Monty does, C has a 2/3 probability of being on the right due to the initial conditions. The way I see it, if there is only a single door on the right it has a 2/3 probability of containing the prize .

40. DAV says:

I think I may have the answer. Assume X is the opened door randomly selected (whatever that means) by Monty.

A | x C … A | B x
B | x C … B | A x
C | x B … C | x B

There are only 2/6 outcomes that the unopened door was C and 2/6 outcomes where C was originally chosen assuming, of course, that Monty’s random choice would be uniformly made. Obviously, it helps to count ALL of the outcomes.

Now, what if you don’t know how Monty makes his selections 🙂

41. I’m curious. If we were to put people in this situation and test whether they knew about the stats of this problem or not, would they switch doors anyway. My guess (again, no data on this – does anyone have any?) would be that people would start second-guessing themselves and then switch anyway.

Besides, we all know that if you choose a wrong door, Monty Hall realizes this, and then proceeds with the game. If you choose the right, prize door, then Monty Hall opens up another door to encourage you to switch to the other – ‘dud’ door.

The lesson? To quote Brain Guy, “It’s a trick. You can’t win.” 🙂

Tom:

Parrondo’s Paradox is trivial, unless someone else can think of a profound example… my understanding of it is that there is a game that, played forever, you can not profit from playing. But there ARE times when you can predictably profit. Then the trick is to play the game when you know you’ll profit, and get out before you start losing.

An example would be a game where if you have an even number of dollars, you gain 3 dollars, but if you have an odd number of dollars, you lose it all. When you have an odd number of dollars, a winning strategy would be to give \$1 away and then continue playing the game.

43. Rich says:

jack mentioned the “curious case of the child who answered the door” so here’s a bit of code. I’ve tried to make it all as explicit as possible and to go for complete enumeration. But it gives the wrong answer. Or does it? Probability would be fun if tiny subtleties of language or code didn’t dramatically change the answer.

``` nfamilies = 10000```

``` # Simulate a set of families families = data.frame(t(replicate(nfamilies,sample(c('b','g'),2,replace=T)))) names(families) = c("child1","child2") # Select one child to open the door # We have no information about how the child is selected dopener = replicate(nfamilies,sample(1:2,1)) families = transform(families,dooropener=dopener) # Determine the gender of the child opening the door families = transform(families,genopener=ifelse(dooropener==1,as.character(child1),as.character(child2))) # And of the other child families = transform(families,genother=ifelse(dooropener==1,as.character(child2),as.character(child1))) # Select only families where a boy opened the door bopen = subset(families,genopener=='b') # and tabulate the gender of the other child print(table(bopen\$genother)) ```

44. Wolfgang Flamme says:

Re “case of the child who answered the doorâ€ (jack mosevich):

I’d say the probability of the other child being a boy as well is ~50%.

45. Rod says:

I just figure that my initial pick is probably wrong. Once Monty has eliminated a room the remaining one is probably right.

Or if there were 100 doors and you picked one… and then Monty opened 98…

46. Milton Hathaway says:

Martin Gardner’s books have had a significant effect on my life, I believe. I try to keep in mind his dogged persistence in taking a puzzle or problem, once solved, to the next level, by asking new questions. As a reader, he never let you get too comfortable in the knowledge you were acquiring, showing that there’s always a next step to those willing to accept the challenge.

I believe it was from one of Martin Gardner’s books that I first learned of one counter-intuitive example of probability that has served me well. It was the classic story of the gambler who slowly went broke betting that he would throw at least one double-six on twenty throws of a pair of dice. (The key insight I picked up was to rephrase the problem to use the word “and” instead of the word “or”; you can then multiply probabilities of independent events to get a combined probability of whatever you’ve combined with the “ands”.)

Unfortunately, not many of the Martin Gardner titles I remember so fondly are available for my Kindle yet.

47. Ye Olde Statistician says:

I always did that boy-answering-door as a hamster-meister reaching blindly into a bag containing two randomly selected hamsters from the hamster barrel. The customer asks whether he has a matched set or a mixed pair and the hamstermeister says he didn’t look but he knows from touch that one of them was male.

So there are four equiprobable events in the original population. (It’s a population of pairs, not of single hamsters.)
MM
MF
FM
FF
and the hamstermeister’s non-probabilistic information eliminates FF from the event population.
So we have
MM
MF
FM
equiprobable events, and in 2 of the 3 the Other Hamster is female.

48. Andrew Brew says:

TOF,
I hesitate to insert my oar between statisticians enjoying a private joke, but isn’t that a separate problem? To make a judgement in the hamster case you must first know that the barrel contains two sex-matched pairs. There is no such constraint in the “two children” problem, so Wolfgang’s answer is correct. Or am I being stupid?

49. Doug M says:

Monte Hall, in actual game show of lets make a deal, Monte Hall’s behavior was not so predictable. Some days there would be a car behind door A and a bedroom set behind door B and a \$1,000 cash behind door C. The contestant would would be told that there is a car behind one of the doors, but the other doors could be a prize or a no-prize. Furthermore, Monte does not alwasy open a door not chosen before allowing a final switch. It makes the results more difficult to model.

50. Doug M says:

Regarding the boy opens the door. In this case the information given doesn’t tell you anything about the child that has not been met. So 50% that it is a boy.

The hamster problem, once you are told taht one of the hamsters is male you have satified one of the necessary conditions toward having a mixed pair.

Back to the house with the boys.. Suppose you had been told that there was at least one boy in the house. You can reason that there is a 1/3 chance that both children are boys and a 2/3 chance that it is a mixed pair. (like the hamster problem) However, once you meet one boy, there is a 50% chance that the child that you have not met is a boy.

51. Chet says:

Excuse me, but I think that the surgical resident was correct.
The probability of guessing whether the prize is behind door A or C
ONCE door B IS OPEN is 1/2.
The probability of guessing the correct door with two tries BEFORE a door is opened is 2/3.

Your explanation was “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.”

How can that be part of the explanation of the odds when DOOR B is ALREADY
OPEN?

Please let me know if I am incorrect.

52. Briggs says:

Chet,

You are incorrect.

53. Chet says:

Your explanation was â€œ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.â€

How can that be part of the explanation of the odds when DOOR B is ALREADY
OPEN?

Please let me know how I am incorrect.

54. Alan says:

I recall being given this as a homework problem in Year 11 maths. There was much arguing and

gnashing of teeth in discussing it next lesson. I’m not sure if we had formally met conditional

probability at that stage, but we had just looked at complementary events – mutually exclusive and

mutually exhaustive of the event space. This gave me the clue as to how to attack the problem.

Looking back, the surprise is that using such an approach gives a clear-cut result – unambiguous,

with no room for debate.

Let the complementary pairs of events be:
W – win, W̄ – not win
S – switch choice, S̄ – not switch

There are two possibilities – the contestant switches choices (S) or doesn’t (S̄).

The S̄ case is easy: Pr(W|S̄) = 1/3

Calculating Pr(W) for the S case is intuitively a bit messy. But calculating Pr(W̄) is

straightforward and unambiguous. If the contestant swaps (S) then loses (W̄), then clearly

he/she must have chosen the prize correctly in the first place.

So Pr(W̄|S) = 1/3

Because W,W̄ are complementary events, Pr(W) + Pr(W̄) = 1

So Pr(W|S) = 2/3

The contestant doubles their winning chance by swapping.

55. Alan Ranger says:

I had this problem in Yr 11 Maths. The “hint” was that we had just learned about complementary events. It’s relatively easy to calculate the probability of Losing if you switch doors – it means that your initial choice must have been correct, so
Pr(Lose|Switch) = 1/3
Since Win is the complementary event of Lose
Pr(Win|Switch) = 1 – Pr(Lose|Switch) = 1 – 1/3 = 2/3
This solution is much more intuitive IMHO.

56. John B() says:

My most memorable Monte Hall moment occurred at the end of one show.
(You remember where he offers wild deals to the people he hadn’t chosen earlier in the show, e.g., I’ll give one hundred dollars for every eraser in your purse up to \$500.)

This one time he offered to pay any medical bills in some woman’s purse up to \$500. They went to a final commercial break while the woman opened her purse.

When they got back from break, Monte announced that the woman had up pulled out thousands of dollars in medical bills that she just happened to have stuffed into her purse on her way out the door. Monte changed the rules and gave her \$5000.

It was quite a moment; a cynic would wonder if it was ‘staged’ somehow.

57. Chet, as someone explained upthread, the only time you are wrong by switching is when your first choice was right. This is because Monty always eliminates the wrong door of the two remaining.

It’s an illustration of Bayes idea that additional information changes the probabilities. I found this horse race example educational:
http://kevinboone.net/bayes.html

58. Michael 2 says:

“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.”

Unfortunately, you have no way of knowing whether Monty’s choice is constrained. Suppose “A”, the door you picked, is the prize-winning door. Monty is free to choose B or C, and chooses one of them, “B”. But suppose the prize is behind “C”. You chose “A”, Monty chooses “B”, and you are no closer to knowing whether you chose correctly. Monty’s “B” choice reveals nothing about whether that was a constrained choice.

Door “B”, being now open, is removed from consideration as are doors D, E, F… ad infinitum.

Now it is “A” or “C”.

59. Alan Ranger says:

@Michael 2

Monty’s choice is ALWAYS constrained to a non-winning door.
That’s part of the “rules” of the game. i.e. a GIVEN.

There is a flip side to this question.

Does Monty want you to switch doors? What makes his show more entertaining? People who switch and win, or people squirming on stage trying to make a decision?

But then there is “How do I make this work for me?”

I listen to a radio station on the low end of the AM dial. I also visit wmbriggs.com. Those two data points are likely to peg me psychologically. The fascinating thing about the low end of the dial is the advertisements. Investment classes abound. I can’t say that the investment class is a scam. I choose not to go. The best way to make money in investing though is to write a book on investing OR, possibly, sell a course in investing.

Writing a book on statistics might work, but only if you get people to start buying it. Buying the book of our host and learning deeply from its pages will save one lots of money. I am not so sure it will make one lots of money. The best way to make the Monty Hall problem make you money is to start a television game show that gets people tuning in.

We should always switch when given the chance at the Monty Hall problem. I have never gotten the chance to use that knowledge!

99% of the reason for that is that I have no interest in standing in line to get in to be on the show. 99% of the remaining 1% is that I don’t have the personality that is likely to be picked to appear on camera! I am yapping in the comment section of wmbriggs.com (This is a prestigious place to be, but it is also very good grounds for being dismissed from a jury).

61. Michael 2 says:

I created a small simulation program in “C” since that’s my comfort zone. Assuming a \$100 prize, and 1000 rounds of the game, a strategy of never switching produced prize accumulation of \$33500 (or about 1/3 winning). A strategy of always switching once Monty opens a door produces prize accumulation of \$50700 (1/2).

This is not intuitive. It is clear that Monty opening a door changes the game and it is now 1 in 2 rather than 1 in 3. For reasons that are not yet clear to me, to take advantage of these new odds one must make a new choice, and there is only one choice at this point. Could you not just stand on your original choice? Apparently not.

Here’s the code (error checking removed for posting brevity)

// gcc monty.c -o monty

#include
#include
#include

void main()
{
int round; // prize game cycle are we in?
int prize; // random 0 through 2
int guess1; // Guest guesses this door.
int guess2; // Guest guesses this door.
int opened; // host opens a door NOT containing a prize.
int noswitchedsum;
int switchedsum;
int doors[3]; // door flag; prize is in one of these doors.

noswitchedsum=0;
switchedsum=0;

for (round=0;round<1000;round++)
{
memset(doors,0,sizeof(doors));

// Game host sets prize door is the prize.
prize=3.0 * ((float)(rand())/(float)RAND_MAX);
doors[prize]=100; //Put a \$100 prize in prize door.

// Game player guesses a door.
guess1=3.0 * ((float)(rand())/(float)RAND_MAX);

// For simplicity I'll just use pseudorandoms here
// Monty opens a door that is neither the prize nor the guest's choice
do
{
opened=3.0 * ((float)(rand())/(float)RAND_MAX);
} while ( (opened != guess1) && (opened != prize) );

// Guest switches choice; chooses the only remaining unchosen door.
do
{
guess2=3.0 * ((float)(rand())/(float)RAND_MAX);
} while ( (guess2 != guess1) && (guess2 != opened) );

noswitchedsum += doors[guess1]; // add up prizes when guess1 was correct.
switchedsum += doors[guess2]; // add up prizes when guess2 was correct.

}
printf("Sum of prizes when guest stays with initial guess: %d Sum of prizes when guest switches: %d\n",noswitchedsum, switchedsum);

}

62. Michael 2 says:

The includes got stripped.

#include (angle brackets) stdio.h
#include stdlib.h
#include string.h

63. Michael 2 says:

I see the logic in having the “switch” choice be correct 2/3 of the time but my simulation persists in being 1/2. The logic is simple enough; any first guess is correct 1/3 of the time; the other two choices combined are correct 2/3 of the time. Monty Hall then does you the favor of eliminating the wrong one of that 2/3, leaving the remaining choice with 2/3 probability of being the winning strategy. But is that good logic? 1/3 of the time the wrong one isn’t in either of his choices so his ability to reveal the wrong choice is 1/3 less of 2/3, and that makes it 1/2 which is what I get in simulation.

64. Michael 2 says:

It works as expected using a decision matrix simulation. In 1000 rounds staying with initial guess wins 341 times, switching wins 772 times.

65. Kalif says:

Greetings!
I am aware of the probability being 2/3 and that one should always switch the door, but If we are supposed to think about probability logically, the outcome of a single experiment is an either/or situation.
Whether a person decides to switch or not, they CANNOT get 1/3 or 2/3 of anything. They will get a prize or not, which makes it “sort of ” look like 50/50 (even though it is not, it is clearly 2/3 in favor of switching, but that knowledge does not help or guarantee anything).
Rather than imagining hundreds of doors, it might be better to imagine 99 people going to Monty for one trial per person.
Yes, there is a probability for a single event and yes they should switch (they are increasing their chances of winning). But, please, tell that to those 33 who picked the right door first and then switched (because it’s always good to do so, isn’t it?)
The problem is that the 2/3 in favor of switching is the number derived from repeated observations, in the long run. But one person, at one instance, going to Monty once, is not ‘in the long run’. He/she/it gets the prize or not.
Imagine one is offered a choice b/w two medical treatments, one that has a success rate of 2/1000 (mortality rate) and the other 5/1000. Clearly, the first is a much safer option and one “should” always choose it. However, both numbers are useless when applied to a single situation. You may select the second treatment and survive or select the first one and be one of the two that did not. Probability/statistics does not offer a mechanism to help with that as applied to a single instance. It’s all correct only ‘in the long run’ but we experience only one instance at a time. Each of us is not a data set, but a single data point.
Best

66. John B() says:

Michael 2

Your second to the last comment included:

never switching produced prize accumulation of \$33500 (or about 1/3 winning). A strategy of always switching once Monty opens a door produces prize accumulation of \$50700 (1/2).

Assuming \$100000, your missing \$10800! Maybe Jay or Johnny took it!
(equivalent to 108 plays no payout)

1000 :: 341 Wins :: 772 (113 too many plays!)

Either you’ve got some serious floating point issues or programming issues

67. John B() says:

It makes me wonder if Jay or Johnny absconded with the ‘apostrophe’ and ‘e’ from my you’re?

68. KCL says:

Has anybody actually analysed the results from the Monty Hall show? How many contestants were there over the years? How many stuck and how many changed? How many won the car when they chose?

69. Michael 2 says:

Found the problem; the escape clause from the do-while loops had the wrong sense. The idea is when it is Monty’s turn to choose a door, rather than a decision matrix which could get very complex fast (N^2 problem at least) I use a “monte carlo” method. Choose door at (pseudo)random and test for constraints. If that new choice happens to be what the contestant chose, try again. If it is the door with a prize, try again. Eventually it will “randomly” choose a door that isn’t the prize and isn’t what the contestant chose, and exit the loop having chosen a door.

The bit with (float)rand() exists because “rand” returns an integer whose upper limit isn’t known for sure but could be quite large 2^32 or so depending on implementation, but doesn’t matter because RAND_MAX is set by the compiler to whatever it is. So “normalize” to the usual range of a random 0 to .999… and then multiply by 3 then truncate to an integer.

It looks a bit clumsy but it works and is a lot less coding than a decision matrix.

Fixed parts are bolded (hopefully)

// gcc monty.c -o monty

#include (angle brackets) stdio.h
#include stdlib.h
#include string.h
void main()
{
int round; // prize game cycle are we in?
int prize; // random 0 through 2; this door contains the prize.
int guess1; // Guest guesses this door initially.
int guess2; // Guest guesses this door after switching.
int opened; // Monty’s choice of door.
int noswitchedsum; // Accumulates prizes staying with initial choice
int switchedsum; // Accumulates prizes if always switching door.
int doors[3]; // Array of doors. Prize is placed in one of these cells.

noswitchedsum=0;
switchedsum=0;

for (round=0;round<1000;round++)
{
memset(doors,0,sizeof(doors));

// Game host sets prize door is the prize.
prize=3.0 * ((float)(rand())/(float)RAND_MAX);
doors[prize]=100; //Put a \$100 prize in prize door.

// Game player guesses a door.
guess1=3.0 * ((float)(rand())/(float)RAND_MAX);

// For simplicity I'll just use pseudorandoms here
// Monty opens a door that is neither the prize nor the guest's choice
do
{
opened=3.0 * ((float)(rand())/(float)RAND_MAX);
} while ( (opened == guess1) || (opened == prize) );

// Guest switches choice; chooses the only remaining unchosen door.
do
{
guess2=3.0 * ((float)(rand())/(float)RAND_MAX);
} while ( (guess2 == guess1) || (guess2 == opened) );

noswitchedsum += doors[guess1]; // add up prizes when guess1 was correct.
switchedsum += doors[guess2]; // add up prizes when guess2 was correct.

}
printf(“Sum of prizes when guest stays with initial guess: %d Sum of prizes when guest switches: %d\n”,noswitchedsum, switchedsum);
}

70. Michael 2 says:

In my trials I also added counters to validate that the pseudorandom generation had approximately a uniform distribution across 0, 1 and 2.

71. Anthony Cook says:

72. Alan says:

I see a problem with this phrasing of the problem. The line:

“What Monty does next: If you did not pick the prize, Monty opens a door …”

This says immediately that if Monty opens a door, your initial pick was wrong. In that case, you should swap to the other remaining door, since that’s where the prize is (guaranteed – Pr=1)! I suspect this is a mistake in stating the problem.

The simplest way I’ve managed to solve the (original) Monty Hall puzzle is like this:

Sticking with your original choice gives you a probability of 1/3 (as shown in Briggs description). The 1/3 “sticks” regardless of whether 0, 1, 2 or 3 doors are subsequently opened. That’s the probability that your choice (which you’re not going to change) was correct – one chance in three.

At the end of the day you are faced with just 2 doors, and the prize must be behind one of them. The sum of their probabilities MUST be 1. Sticking with your original choice STILL has a probability of 1/3. Ergo, the probability that the other door hides the prize must be 1 – 1/3 = 2/3.

Job done.

Alan

73. Briggs wrote

“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.”

We cannot ever see a line (infinite in both directions), or measure my raised garden bed dimensions (infinitely precise measurements), we’ve never witnessed an actual circle, but pretty sure geometry and areas and engineering, etc., all work. Same with probability/statistics. Getting to within epsilon for small epsilon is quite alright- “all models are wrong, some are useful”. Assume .50 is the truth, then are you really nitpicking so much to claim something like getting to .50000000012 or .49999999875 instead of .50 as being devastating for the frequentism model?

If you flip a coin and keep track of cumulative number of heads / number of flips, it tends to converge around 50% (or more general, to p, whatever p is), empirical fact, backed up by the model of Strong Law of Large Numbers
frequency within the interval [p-e, p+e], for *any* small e > 0, provided n is large
(large does not require infinite)

Justin