Remember The Problem of the Unfinished Game? And the almost 2,500 comments those two posts generated? I know, I like to pretend it didn't happen, either. Some objected to the way I asked the question, but it was a simple question asked in simple language. I think what they're really objecting to is how unintuitive the answer is.
Which reminds me of another question that you've probably heard of:
Suppose the contestants on a game show are given the choice of three doors: behind one door is a car; behind the others, goats. After a contestant picks a door, the host, who knows what's behind all the doors, opens one of the unchosen doors, which reveals a goat. He then asks the contestant, "Do you want to switch doors?"
![]()
Should the contestant switch doors?
This is, of course, the Monty Hall problem. It's been covered to death, and quite well I might add, by dozens of writers who are far more talented than I.
What's interesting about this problem, to me at least, is not the solution, but the vehemence with which people react to the solution -- as described in The Drunkard's Walk: How Randomness Rules Our Lives.
It appears to be a pretty silly question. Two doors are available -- open one and you win; open the other and you lose -- so it seems self-evident that whether you change your choice or not, your chances of winning are 50/50. What could be simpler? The thing is, Marilyn said in her column that it is better to switch.Despite the public's much-heralded lethargy when it comes to mathematical issues, Marilyn's readers reacted as if she'd advocated ceding California back to Mexico. Her denial of the obvious brought her an avalanche of mail, 10,000 letters by her estimate. If you ask the American people whether they agree that plants create the oxygen in the air, light travels faster than sound, or you cannot make radioactive milk by boiling it, you will get double-digit disagreement in each case (13 percent, 24 percent, and 35 percent, respectively). But on this issue, Americans were united: Ninety-two percent agreed Marilyn was wrong.
Perhaps the public can be forgiven their ignorance, but what of the experts? Surprisingly, the mathematicians fare little better.
Almost 1,000 Ph.D.s wrote in, many of them math professors, who seemed especially irate. "You blew it," wrote a mathematician from George Mason University. From Dickinson State University came this: "I am in shock that after being corrected by at least three mathematicians, you still do not see your mistake." From Georgetown: "How many irate mathematicians are needed to change your mind?" And someone from the U.S. Army Research Institute remarked, "If all those Ph.D.s are wrong the country would be in serious trouble." Responses continued in such great numbers and for such a long time that after devoting quite a bit of column space to the issue, Marilyn decided she whould no longer address it.The army PhD who wrote in may have been correct that if all those PhDs were wrong, it would be a sign of trouble. But Marilyn was correct. When told of this, Paul Erdos, one of the leading mathematicians of the 20th century, said, "That's impossible." Then, when presented with a formal mathematical proof of the correct answer, he still didn't believe it and grew angry. Only after a colleague arranged for a computer simulation in which Erdos watched hundreds of trials that came out 2-to-1 in favor of switching did Erdos concede that he was wrong.
You may recognize Paul Erdos from a particularly obscure XKCD cartoon last week. So if you feel like an idiot because you couldn't figure out the Monty Hall problem, take heart. The problem is so unintuitive one of the most notable mathematicians of the last century couldn't wrap his head around it. That's ... well, that's amazing.
How can something that seems so obvious be so wrong? Apparently our brains are not wired to do these sorts of probability problems very well. Personally, I found the text of Jeffrey Rosenthal's Monty Hall, Monty Fall, Monty Crawl (pdf) to be the most illuminating, because it asks us to consider some related possibilities, and how they might affect the outcome:
Monty Fall Problem: In this variant, once you have selected one of the three doors, the host slips on a banana peel and accidentally pushes open another door, which just happens not to contain the car. Now what are the probabilities that you will win, either by sticking with your original door, or switching doors?Monty Crawl Problem: Once you have selected one of the three doors, the host then reveals one non-selected door which does not contain the car. However, the host is very tired, and crawls from his position (near Door #1) to the door he is to open. In particular, if he has a choice of doors to open, then he opens the smallest number available door. (For example, if you selected Door #1 and the car was indeed behind Door #1, then the host would always open Door #2, never Door #3.) Now what are the probabilities that you will win the car if you stick versus if you switch?
Paul Erdos was brilliant, but even he realized his own limits when presented with the highly unintuitive Monty Hall problem. For his epitaph, he suggested, in his native Hungarian, "Végre nem butulok tovább". This translates into English as "I've finally stopped getting dumber."
If only the rest of us could be so lucky.
| [advertisement] Interested in agile? See how a world-leading software vendor is practicing agile. |
Will people who use the Monty Hall problem in interviews remember to explain Mr Hall's motivation (is he trying to make you win/lose).
Otherwise the question is unanswerable - it might have been useful 200years ago when the show was on TV, but now when people read it 10th hand out of a interview techniques book it doesn't make sense.
mgb on June 22, 2009 7:04 AMOf course plants don't create the oxygen in the air. They just debond it from carbon. What do you think plants are, fusion reactors?
chaos on June 22, 2009 7:18 AMI am microwaving a bowl of milk right now.
drs on June 22, 2009 7:29 AMThis even makes an appearance in the movie "21" doing one of the maths lectures, though it's refered to as "Variable Change" rather than the Monty Hall problem
Graeme Bradbury on June 22, 2009 7:32 AMThis problem nearly destroyed my relationship. Really. My fiance and I got into the biggest argument over this. I tried explaining the solution, my fiance called me stupid, and well, it erupted from there. I'm still a little angry about it quite frankly.
Lissy on June 22, 2009 7:33 AM"After a contestant picks a door, the host, who knows what's behind all the doors, opens one of the unchosen doors, which reveals a goat."
The important part is that the host opens a door which (he knows) contains a goat. He doesn't open randomly "one of the doors" which just happens to have a goat behind. This is important to include in the problem statement as it affects the probabilities.
As correctly explained in the second link.
Simon on June 22, 2009 7:33 AMAll I can imagine is the Benny Hill chase scenes between doors.
Ólafur Waage on June 22, 2009 7:35 AMJeff,
Have you ever said whether you got it right the first time? With such a big brain, I'd be surprised if you didn't ;)
I know I didn't. But by changing the story to 1,000,000 doors, where the contestant selects one door and then the host opens 999,998 other doors, leaving one un-opened, made it clear to me.
@Simon: actually, it makes no difference whether Monty opens the door accidentally or not. The bottom line is you have a 1/3 chance of your initial choice having been correct. If an incorrect door then opens, there is a 2/3 chance that the OTHER door is correct, therefore you should still switch.
Gabriel Ross on June 22, 2009 7:39 AMI don't like the construction of the "Monty Fall" problem. What happens if the host slips and reveals the prize? Is it possible for the host to slip and re-open the contestant's door or only one of the non-selected doors? Without knowing if these probabilities are possible, I can't address it.
Monty Crawl, though, is neat.
keith on June 22, 2009 7:41 AMThe best way to explain it is actually change the problem slightly.
Say you have a million doors. Only 1 has the car behind it. the 999 999 others have goat.
So you pick a door.
Similarly, the host then opens all the other doors but one.
Do you switch?
Before the odds were 1 in a million to pick the car. But after the host opens the doors, you know that one of the doors has a goat, and the other is the car. In this variant, you know, that switching is better. Because you've changed the odds of getting the car from 1 in a million, to 1 in 2. Shrinking the problem you can always reason the same way, that switching is better, and so on down to the usual case.
The moment I was informed of the variant in this way, I beleived. :)
Robert B on June 22, 2009 7:44 AMWow, this is really non-intuitive but fun to think about. I thought it would make no difference to switch at first, but after reading the replies from Marilyn, it does make sense to switch.
Our minds truly suck at statistics and probabilities.
What also frightens me is that plenty of mathematicians were against her, they're supposed to understand this kind of thing.
Michel Billard on June 22, 2009 7:44 AM@Gabriel Ross Actually it makes all the difference in the world. Read the link that Jeff provided (the pdf link)
ChrisD on June 22, 2009 7:45 AMGabriel, read the linked PDF and the description of the "Monty Fall" problem.
Simon on June 22, 2009 7:45 AMWait, I'll admit I don't understand, but after the first door is opened, she has a .5 probability of getting a car, substantially better than she had a second ago. Switching doors isn't going to change those odds one bit. What am I missing?
On a side note, and it's been decades since I saw the show, but I remember Monty pulling a $100 bill out of his pocket to offer the contestant a new choice altogether: Take the money and sit down, or proceed with the chance of getting a new car. Different decision, that.
Charles on June 22, 2009 7:48 AMRobert B: No, the odds are *always* better than 1 in 2 (and you don't need to use a million doors in an example to show that)
The important thing to realize is that the host always brings it down to a 2-door choice where one door has the prize. This is not a 1-in-2 choice.
If you initially picked the right door, switching will *lose* you the prize.
If you initially picked the wrong door, switching will *gain* you the prize.
So, the odds of winning are precisely 1 - (odds of you guessing from the original set of doors)
Gareth on June 22, 2009 7:51 AMI mean to say, the odds of winning if you switch doors
Gareth on June 22, 2009 7:52 AM"Some objected to the way I asked the question, but it was a simple question asked in simple language. I think what they're really objecting to is how unintuitive the answer is."
Or perhaps you're objecting to how unintuitive it is that the answer depends on what seem to be absolutely trivial pieces of information about how the information is obtained? (As you can probably tell, I agree with those who believe the wording does not lead to a clear mathematical answer.)
"Simple language" can very often be ambiguous, and in probability that can make a large and unintuitive difference - just as it does with the Monty Hall problem.
Jon Skeet on June 22, 2009 7:54 AMMy problem is that "switching" means "taking the other one" and intuitively, it's simply turning a 1-in-3 chance into a 1-in-2 chance, so there's no reason why switching should make any difference at all.
I'm with Erdos on this one. I only believe it because the statistics say it's correct.
I still don't understand how it's not a 50/50 chance, no matter how many times people tell me the one door being wrong increases your knowledge about the validity of your initial choice (so it's a 33/33/33 choice and you drop one -- how does that not make it a 50/50 choice?).
Alan on June 22, 2009 7:55 AMA very simple way to explain...
Your first choice is usually wrong (66%) and thus 66% of the time the host is essentially showing you the correct door.
>it's a 33/33/33 choice and you drop one -- how does that not make it a 50/50 choice?
There was a 0.33 chance you picked the right door in the first place. Probabilities have to add up to 1, so there's a 0.66 chance that you win if you switch.
Anonymous on June 22, 2009 8:01 AMIt took me a long time to figure it out (after being told I was wrong the first time) but I finally decided this was a good way to think about it:
The key is that the host CAN NOT open the same door you chose. His or her hand is forced if you chose wrong.
2/3 of the time, your initial choice will be wrong, so 2/3 of the time the host's choice is forced.
In those cases, the host MUST open the other wrong door, leaving the third door as the right one. So, 2/3 of the time, the switch will be beneficial.
xebecs on June 22, 2009 8:01 AMIs there a subtle difference between the questions for A. The Unfinished Game (answer = 2/3) and B. Nebulous Neighbours (answer = 1/2)
A. "Let's say, hypothetically speaking, you met someone who told you they had two children, and one of them is a girl. What are the odds that person has a boy and a girl?"
B. "Your new neighbours have two children of unknown gender.
From older to younger, they are equally likely to be girl-girl, girl-boy, boy-girl, or boy-
boy. One day you catch a glimpse of a child through their window, and you see that
it is a girl. What is the probability that their other child is also a girl?"
http://www.probability.ca/jeff/writing/montyfall.pdf
Ian on June 22, 2009 8:05 AMHypothetical Situation:
The Monty Maul problem. There are 1 million doors. You pick one, and the shows host goes on a bloodrage fueled binge of insane violence, knocking open doors at random with no knowledge of which door has the car. He knocks open 999,998 doors, leaving your door and one unopened door. None of the opened doors contains the car.
Are your odds of winning if you switch still 50/50, as outlined by the linked Rosenthal paper? It seems counter-intuitive even for people who've wrapped their head around the original problem.
Anonymous on June 22, 2009 8:09 AMCome ON!
There are two doors closed. One contains a car.
The fact a third door is opened that contains a goat is irrelevant.
This is NOT about your odds at the beginning, when you had more doors (conditional probability). The question is posed RIGHT NOW, with two doors from which to choose. Asking you to switch doors is just posing the question in a different way. Which door?
At that moment, there is a 50/50 chance, a .5 probability. All events leading up to this moment are irrelevant to the odds that the car is behind ONE of TWO doors.
Charles on June 22, 2009 8:11 AMYou call it the "Monty Fall" problem.
ABC calls it "Deal or No Deal".
Windrider on June 22, 2009 8:14 AM@Ian - the subtle difference is that in "Nebulous Neighbours" one assumed that the child you observe is taken randomly from the two children. In "The unfinished game", the parent tells you "at least one of my children is a girl", and you can don't assume that that information is randomly sampled (e.g. if the distribution is BG or GB, you don't assume there's an equal chance the parent would have said "at least one of my children is a boy),
Or at least, that's my understanding.
aux on June 22, 2009 8:14 AM@Charles - I really hope you're trolling.
aux on June 22, 2009 8:15 AMOh, wow, I just failed hardcore. I put my e-mail address in the "website" line. Jeff, if you feel like going ahead and fixing that (I've got it linked correctly here), I'd be grateful. And if you don't, no big deal!
Windrider on June 22, 2009 8:15 AMYeah, we did this problem in my Discrete Math course. We spent so long on it, but it's very insteresting stuff.
I love the blog, by the way.
Aaron T. on June 22, 2009 8:19 AMWhat's wrong with goats? I'd take a goat. They make good pets.
Seriously, one of the problems people (like @mgb above) have with this is over-reliance on knowledge of the real Monty Hall's motivations on TV. It's unfortunate that the naming of this has contributed in part to the difficulty. If you ignore the preconception that comes with it and just look at the conditions as stated, it will help some of those people come closer to understanding. "It's better to switch than fight." (How's that for some old TV?)
Dennis on June 22, 2009 8:21 AMThis seems like it would be 1 in 3. Is this not correct?
Practicality on June 22, 2009 8:25 AMThe Monty Fall PDF has a "Nebulous Neighbors" example which appears to be saying that the answer to the boy-girl problem is actually 50% after all.
Discuss.
KJB on June 22, 2009 8:27 AM>it's a 33/33/33 choice and you drop one -- how does that not make it a 50/50 choice?
That's the mistake. You're not dropping one, you're getting both doors that you didn't pick. He's just opening one of them early. I didn't understand this until I programmed up a simulation for myself.
eshepherd on June 22, 2009 8:28 AMOne way I like to think about the Monty Hall problem is to take out the player's second choice. Since the problem's question is 'Is it better to always switch or always stick?' then what we need is the probability of winning when one always switches, and the probability of winning when one never switches.
Then there is only really one choice; what door to pick to begin with (a priori, of course, all have 1/3 chance of being the winning door). Clearly there are two outcomes from this choice; you pick the right door (probability 1/3) and that you pick the wrong door (probability 2.3).
If you picked the correct door to begin with and ALWAYS switch, you will ALWAYS lose, if you picked the wrong door and ALWAYS switch you will ALWAYS win.
If you picked the correct door to begin with and NEVER switch, you will NEVER lose, if you picked the wrong door and NEVER switch you will ALWAYS win.
So when never switching, p(win in 2nd round) = p(win in 1st round) = 1/3. And when always switching, p(win in 2nd round) = p(lose in 1st round) = 2/3. QED
Mark P on June 22, 2009 8:30 AMThis problem is neat. Yes you would want to switch. It's a little more strait forward than the previous question, which had some ambiguity depending upon the semantics.
Practicality on June 22, 2009 8:32 AMYour Unfinished Game post was pretty helpful for me. I was recently in kind of an alternate software universe for about 4 years. I feel like I've been playing a losing game of catch-up on the current culture and, frankly, it's intimidating.
About an hour into the comments on that post, I got the message pretty clearly: Chasing down ideas uncritically just because they're incredibly popular might be a big mistake. And I chilled the hell out. Thanks.
Jefferson Taylor on June 22, 2009 8:33 AMI fail further. DoND is on NBC, not ABC.
Monty Crawl is interesting. Even more interestingly, even though it seems like the door you choose at the start should affect your odds, it doesn't; I initially thought it did, until I realized it's like the door I chose vanished and Monty is crawling between only two doors, and it really doesn't matter which one is gone.
The neat part is that Monty Crawl, like the original Monty Hall problem, still gives you a 2 in 3 chance of winning. Even if Monty's door-opening algorithm is completely deterministic, it gives you no bonus information over opening a non-goat door. Your answer- "always switch"- doesn't even need to change either!
Let's say you have pity on Monty, and take door 3. It really doesn't matter for your odds. There are three possible universes for the problem, with equal probability:
1:3 - goat behind door 1 (losing) - universe 1
1:3 - goat behind door 2 (losing) - universe 2
1:3 - goat behind door 3 (winning) - universe 3
Any of these can happen with equal probability. So what does Monty do in each case?
universe 1- open door 2
universe 2- open door 1
universe 3- open door 1
Note that for universes 1 and 2, Monty has no choice; he'd go for the same doors even if he wasn't exhausted. Only Universe 3 changes Monty's behavior.
But you know more about Monty's behavior! You know he won't open door 2 in universe 3. So if he opens door 2, you're in universe 1, and you must change doors to hit a goat. Universe 1 happens 1/3 of the time, so 1/3 of the time, you win the car because Monty's behavior tells you 100% that the car is in door 1. Switch.
2/3 of the time, Monty will open door 1. Now you're in universe 2 or 3. If he chose door 2, you would definitely have switched; now, the only information he offers is that it's not behind door 1, because he essentially would have told you if it was. His answer, therefore, tells you about door 1 and provides no information as to whether the correct door is 2 or 3. Universes 2 and 3 are equally probable, and both have the same "symptom"; door 1 provides no evidence as to whether you should switch or not, as there's a 50% chance on either door. If you switch, you get a 50% chance; if you don't, you also get a 50% chance. "Always switch" still works, although it's not necessary if door 1 opens.
Interestingly, this version of the problem is more obviously a 2/3, because it's conceptually identical to getting two chances to choose a door. You make your first choice; then Monty tells you flat-out whether or not the car is behind the lowest-numbered unchosen door. If it is, you win. (odds 1/3.) If it isn't, you get a second pick from two doors- which gives you 1/2 odds, but it only happens 2/3 of the time, so this contributes 1/3 to your chance as well.
I'm not completely sure I'm right on this. I haven't read the paper for its answers yet.
Windrider on June 22, 2009 8:36 AMThe girl-boy-problem-probability depends on the selection and the exact information:
"A randomly selected child is a boy"
"At least one of our children is a boy"
"The first-born child is a boy"
These pieces of information lead to different probabilities. In the Jett-Atwood-Version of the problem it's unclear which answer is correct because the provided information is vague.
Simon on June 22, 2009 8:37 AMThis is by no means the same as the boy-girl or flip-a-coin choice. BTW, it obeys the stats laws all the way. It simply says that you are more likely to pick the wrong door to the odds of 2 out of 3 times. Hence if you assume you picked the wrong door and the host shows you the other wrong door then then switching should give you 2 to 1 odds of being right. Buyer beware. What all the mathematicians are trying to say is if you have a 'truly' random chance of winning that no matter how many times you repeat a result over and over again, next result is the same chance as the first try. So if you flip a coin ten times and get heads as in HHHHHHHHHH the chance of getting another head is still 50%. That is non-intuitive not this half-baked example. Two seconds of "real" thought solves the door issue. I personally forgive the PhD's as the contrived"ness" of the example was very poorly worded. Hence the confusion. For the record, if there is a million doors and you eliminate all but one and your door and there is only one winning door you would want to switch even more because there is only one in a million chance that the door you chose is the right door.
Jim on June 22, 2009 8:42 AMCase 1: 33%
Goat <- you open this one
Goat <- host will open this one
Car
Case 2: 33%
Goat <- host will open this one
Goat <- you open this one
Car
Case 3: 33%
Goat <- 50% host opens this one
Goat <- 50% host opens this one
Car <- you open this one
In the first 2 cases (66%), you get the car if you switch. In the last case (33%) you get the car if you don't switch.
The host tells you something by his choice of which door to open.
Tim on June 22, 2009 8:44 AMI always found the proof of exhaustion really solidified it for me. The wikipedia article has the diagram proving that changing your solution wins 2/3 of the time, but it's trivial to do the same showing that not switching loses 2/3 of the time.
Steve-O on June 22, 2009 8:46 AMI find it funny in these cases that people think it's a choice to "believe" or not - as if this is something like believing in God or not. In one case, we have data, mathematical proof of the answer - how can you not believe this. It is not an issue of belief - it is an issue of whether you accept mathematics or not, and if you don't accept the math... there's a big problem. So what's next Jeff? The airplane on a treadmill? Lol :)
captcha: Mighty erect - WTF??!
Jasmine on June 22, 2009 8:46 AMOkay, for people who are still having trouble grasping the concept of 'switching changes your probabilities', try looking at it this way (which came to me while writing a simulator for the Monty Hall problem):
Don't think like a contestant. Think like Monty.
Initially, there are two possibilities:
1. You chose the winning door.
2. You chose a losing door.
The sum of these probabilities of these two events is 100%. I think everybody can agree that the chance of #1 is 1/3, and the chance of #2 is 2/3.
Monty, then has to choose a door that has the following attributes:
A. The door is not the door you chose.
B. The door is not the door with the car.
Requirement B is what throws people off: they think that Monty is revealing a random door. The problem is -- 2/3 of the time, he's NOT.
In case #1, A and B are the same door, so Monty has two doors to choose from. But no matter which one he picks, if you switch, you are guaranteed to lose.
In case #2, however, you've cornered Monty. Requirements A and B each rule out one door. With only three doors, there's only ONE door left for him to show. You picked the first losing door, and he picked the second losing door. Therefore, in this case, you are guaranteed to win if you switch to the third door.
Therefore, there are exactly two possible ways to win:
1. Pick the winning door and then do not switch.
2. Pick a losing door and then switch.
Once again, the chance of picking the winning door is 1/3. This means that 1/3 of the time, switching will lose.
Meanwhile, the chance of picking the losing door is 2/3 -- so 2/3 of the time, switching will WIN.
Therefore, if you switch 100% of the time, you will win 2/3 of the time. If you never switch, you will win only 1/3 of the time.
Stephen Oberholtzer on June 22, 2009 8:58 AMWhat I love about this problem is that even if you're wrong, you're still actively thinking and engaged in the discussion. It's hard to find this kind of passionate discussion outside of matters of religion, politics or morals.
Brandon on June 22, 2009 8:58 AM@Jasmine:
There's a serious problem in American culture where "what feels right" is believed over mathematical proof or scientific evidence. See any number of debates, from vaccines causing autism to evolution vs. intelligent design.
In the face of all of the evidence, some people replying to this post still believe that the odds are 50/50. Unless they're trolling.
sadnessbowl on June 22, 2009 8:59 AMOh no! It's sadnessbowl! ;) At least this time we agree.
What's this about vaccines causing autism? I heard that it was watching television at a young age (with some research to back up the correlation, although it may not be causation).
Practicality on June 22, 2009 9:04 AMSince my previous explanation was very similar to a previous one. Here's another attempt with the million door extreme example. Your first choice has a one in a million chance of being correct, so it is very more likely the winning/correct choice is not the room you picked. Now the host reveals all the incorrect choices until you have your original choice and the only remaining room that you didn't choose. If confronted with the these two rooms without the previous knowledge then you would have a 50/50 choice. Since you know your guess was "really" was a guess/"random" choice you now know the remaining room has the odds of being correct of 999999 times out of 1000000 tries, because the host told you what 999998 of the choices were wrong!
Jim on June 22, 2009 9:07 AMWhenever I am reminded of the Monty Hall dilemma I always wonder (and can never find out) if Monty and the producers of Let's Make A Deal were aware that they were giving the contestants a 2/3 chance to win the car. And if they were aware, who was the brain on that show who understood the counter-intuitive odds that stumps (apparently) 92% of the population. Is anyone aware of an interview with Monty where he is asked about the math puzzle named for him?
jmucchiello on June 22, 2009 9:13 AMPaul Erdos was brilliant, but even he realized his own limits when presented with the highly unintuitive Monty Hall problem. For his epitaph, he suggested, in his native Hungarian, "Végre nem butulok tovább". This translates into English as "I've finally stopped getting dumber."
If only the rest of us could be so lucky.
So you are suggesting we would be lucky to be dead?
There's another way to think of this problem that may make it easier to understand.
Imagine that there are 3 doors to pick from and you initially pick 1 of them like in the original problem.
But then BEFORE Monty Hall exposes which of the 2 doors you didn't pick has the goat, you get to decide whether to switch or not. You can have what's behind 2 of the doors or just the 1 you initially picked. (BTW, you don't have to take home any of the goats if you don't want to).
You don't have to be a math genius to know that your odds are better if you get to pick 2 doors as opposed to 1.
@Gregor Brandt.
So the punk really did feel lucky.
Practicality on June 22, 2009 9:17 AM"Or perhaps you're objecting to how unintuitive it is that the answer depends on what seem to be absolutely trivial pieces of information about how the information is obtained?"
Agreeing with Jon Skeet here. I think you are being a bit condescending to the smart people who simply disagree with you here. They do not find the math problem unintuitive but your wording made it unclear and ambiguous. I was surprised that you never made a correction/update to that post.
@Tim
Thanks for this explanation!
There are two DIFFERENT questions being argued.
1/ If you have a unbiased choice of two unopened doors, you have a 50% chance of winning the car. (The instinctive probability...)
BUT
2/ Monty WON'T open the door with the car! Therefore Monty is giving you better odds. Your odds are improved if you CHANGE your choice (as you demonstrate) to a 66% chance of winning.
(Still can't work out the baby thing though....)
Guy
Guy on June 22, 2009 9:21 AMJeff!!! would please read this OvercomingBias post to finally learn you are wrong about the boy/girl problem?:
http://lesswrong.com/lw/ul/my_bayesian_enlightenment/
(Note that according to that post you DID ask an incorrect version of the problem)
Jason M on June 22, 2009 9:23 AMProbability is much easier than all this. See The Daily Show's coverage of how most things are a 50/50 shot. (http://www.thedailyshow.com/video/index.jhtml?videoId=225921&title=large-hadron-collider)
GregB on June 22, 2009 9:24 AMMarilyn is wrong, and her logic is flawed.
Remember, Monty is ALWAYS going to choose a door with a goat! When Marilyn says that 2 out of three choices result in winning if you switch, she's assuming that one of the choices is the door that Monty opened...which is a goat.
In other words, you can't include the option where Monty opens door #2 and a car is there...because that can never happen! If you eliminate that option, the odds are 1:2...exactly what you would intuitively expect.
It's disturbing that eggheads at MIT wouldn't see the flaw in Marilyn's logic.
Troy Young on June 22, 2009 9:24 AMWell, it's pretty simple actually. You only lose if you initially chose the car, and that has a 1/3 chance of happening, so the other 2/3 chances are of you winning.
Ricardo on June 22, 2009 9:28 AMI think there are two problems:
1. Out of the remaining doors what percentage is the car behind. One car for two doors is 50%.
Out of the remaining doors what door has a better chance of getting the car based on the reveal of the first door and your ability to move to the other door?
Initially you only had 1/3 chance of picking the right door, here are the scenarios.
pick car - move Not Win
pick goat 1 - move Win
pick goat 2 - move Win
So, it is better to move, or just take the 100 bucks from Monty if you head hurts.
2/3
Jon Raynor on June 22, 2009 9:29 AMHere's a model of the situation in C. Over 100,000 iterations, it shows that by switching from the first choice to a new choice, the player wins in 2/3rds of the games.
#include
#include
int main (int argc, const char * argv[]) {
int doors[3];
int playerChoice;
int hostChoice;
int iterations;
int wins;
iterations = 0;
wins = 0;
for (int i = 0; i < 100000; ++i) {
// Reset doors
doors[0] = 0;
doors[1] = 0;
doors[2] = 0;
// Place the car behind a random door
doors[rand() % 3] = 1;
// Choose a door for the player
playerChoice = rand() % 3;
// Choose a door for the host that is not the player's door and does
// not contain the car
hostChoice = playerChoice;
while ((hostChoice == playerChoice) || (doors[hostChoice] == 1)) {
hostChoice = rand() % 3;
}
// Switch player choice to new door
int choiceMask = 1 << playerChoice;
choiceMask |= (1 << hostChoice);
int newChoice = (7 - choiceMask) / 2;
// Did we get the right door?
if (doors[newChoice] == 1) {
wins++;
}
iterations++;
}
printf("Iterations: %d Wins: %d Ratio %f\n", iterations, wins, (double)wins / (double)iterations);
return 0;
}
I couldn't believe there was a sentence in my native language. It took me a second to switch back. :)
pestaa on June 22, 2009 9:43 AM@Practicality:
I don't even remember where we disagreed. Anyway....
There's a pretty big anti-vaccine movement which is believed to be causing a resurgence in diseases which were once thought to be all but eradicated in developed countries. The movement stems from a belief that components of the vaccines cause autism.
If you search Google for the two words (vaccines and autism), you'll see a bunch of links. What's most damning is http://www.time.com/time/health/article/0,8599,1888718,00.html -- since it's a celebrity claiming it, people identify with her. Because they identify with her, they believe her over people with whom they do not identify (faceless scientists.)
sadnessbowl on June 22, 2009 9:43 AM@Troy- One of the choices *was* the door that Monty opened. After he opens it, it's no longer a choice. It's just that the door Monty opens depends on the door you open. He can't open the door you opened, and he can't open the door with a car; 2/3 of the time, that accounts for two separate doors, and he can only open the one non-car non-chosen goat door, leaving the non-chosen non-Monty door the car door. 1/3 of the time, he has a choice of goats, because you have the car- and then it really doesn't matter which one he opens, because if you switch, you lose.
The only false part about a "choice" is assuming that Monty has a choice. If the reveal-and-switch is mandatory (as it wasn't in Let's Make A Deal), then Monty only has a choice 1/3 of the time- the situation in which his choice doesn't matter.
Windrider on June 22, 2009 9:47 AM@Jon Skeet: +1
"Simple" questions are the ones that trouble the most by being ambiguous. IMO. YMMV.
@Anonymous - you should have posted your name. This comment did it for me...
>it's a 33/33/33 choice and you drop one -- how does that not make it a 50/50 choice?
There was a 0.33 chance you picked the right door in the first place. Probabilities have to add up to 1, so there's a 0.66 chance that you win if you switch.
Anonymous on June 22, 2009 8:01 AM
The way I usually explain this to others is like this: Instead of choosing one door, you choose two, but then *tell* Monty that you chose the other. If one of the two doors you chose contains the price (that is 66.666% of the time), Monty will now tell you which one of the two it is.
LKM on June 22, 2009 10:00 AMStop making it more enigmatic than it needs to be.
Try it again but considering one more thing.
Suppose the contestants on a game show are given the choice of three doors: behind one door is a car; behind the others, goats. After a contestant picks a door, the host, who knows what's behind all the doors, opens one of the unchosen doors, which reveals a goat. He then asks the contestant, "Do you want to switch doors?"
Solve it considering this :
The host know where is the car and will never reveal it. He will always open a door that he know contain a goat.
The original never said that the host knew what was behind the door, or if he had to open a door.
When the Monty Hall problem was updated to say that the host had to make a decision and that the host knew what was behind the doors, then we have a complete different proof.
Math and logic are not the same thing. We must be very careful on how we word our problems.
I have noticed (personal experience, not a scientific study)that most programmers fall into one of two categories: mathematicians or logicians. The two different types code very differently.
The point is that each type thinks that their code is self-documenting, while in fact it is only self documenting to that type of programmer.
We must be careful on how our code reads.
Actually, "Deal or No Deal" is not at all like the Monty Hall problem. If the host of DoND asks if you want to switch at the end when it's down to 2 cases (does he do that?) you're no better off switching or not switching.
Joe on June 22, 2009 10:10 AMAfter reading the pdf, it is clearer to me why math professors have this problem. It is about probabilities, not mathmatical equations. Probabilities involve equations, but probabilities are not representative of measurable things.
AC on June 22, 2009 10:12 AMI'm surprise no one has mentioned the agnostic mindset (there might be a better term for this but agnostic will have to do for the placeholder).
If the two sensibilities are switching doesn't hurt and switching helps I might as well switch even if I don't believe it will help as it will help if I'm wrong and will make me look better to those that believe if I'm right.
In other words the possibilities are:
A. I switch and am more likely to win
B. I switch and it doesn't change my odds but people think I'm smarter for taking the option that might increase my odds.
No matter the wording of the question if the choices boil down to switching helps or switching is dead even then my choice is simple.
Unless someone warns me of a wording where switching hurts my odds I'm not going to worry much about the different variations.
dhanson865 on June 22, 2009 10:16 AM<?php
// The Monty Hall Simulator
// editable settings
$debug = 0;
$switchanswer = 1; // toggle 0 or 1 to enable answer switching
$iterations = 1000; // number of times to run the simulation
// begin uneditable settings and code
$wins = 0;
$loss = 0;
$numcorrect = 0;
$numincorrect = 0;
$choices = array(0, 1, 2);
$i = 1;
while ($i <= $iterations) {
if ($debug) { print "--------\n"; }
$answer = mt_rand(0,2);
if ($debug) { print "A: ". $answer ."\n"; }
$guess = mt_rand(0,2);
if ($debug) { print "G: ". $guess ."\n"; }
if ($switchanswer) {
if ($guess == $answer) {
// If the contestant picks the right door, the host will open one of the other two doors, both of which are incorrect
// 1/3 chance of guessing correctly on first shot
// This leaves the correct door (chosen) and 1 remaining incorrect door. By always switching, the contestant will always lose.
// Remove the user's guess from the choices
$newchoices = array_diff($choices, array($guess));
//if ($debug) { print_r($newchoices); }
// Randomly select from the remaining choices
$newguess = array_rand($newchoices);
//if ($debug) { print_r($newguess); }
//if ($debug) { print "\n"; }
// Make this their guess
$guess = $newguess;
if ($debug) { print "NG: ". $guess ."\n"; }
$numcorrect++;
} else {
// If the contestant picks the incorrect door, the host will open the remaining incorrect door.
// 2/3 chance of guessing an incorrect door on first shot
// This leaves the incorrect door (chosen) and the correct door. By always switching, the contestant will always win.
// pick correct answer
$guess = $answer;
if ($debug) { print "NG: ". $guess ."\n"; }
$numincorrect++;
}
}
// Results check
if ($answer == $guess) {
$wins++;
if ($debug) { print "Correct!\n"; }
} else {
if ($debug) { print "Sorry, incorrect!\n"; }
$loss++;
}
$i++;
}
// Results Tally
if ($switchanswer) {
print "The contestant always chose to switch their answer\n";
} else {
print "The contestant always stayed with their original answer\n";
}
print "Out of ". $iterations ." iterations, there were ". $wins ." wins and ". $loss ." losses.\n";
printf("Win %%: %.2f\n", $wins/$iterations);
printf("Loss %%: %.2f\n", $loss/$iterations);
?>
BG on June 22, 2009 10:18 AMOur full possibility set:
33% #1{Car, Goat, Goat}
33% #2{Goat, Car, Goat}
33% #3{Goat, Goat, Car}
For simplicity sake, we'll assume that the guesser always chooses the first door. As is hopefully obvious, the chance of winning on the first choice is 1/3
We'll also assume the host is not an interested agent in this -- He doesn't care if you win or lose, he's just following a script. There are three possible cases allowed by most phrasings of the question. One: He opens a door entirely at random. Two: He opens a door he knows contains a goat. Three: He always picks the same door. We will also assume that he will never open the picked door in this question. (If you need help deciding to switch when the host shows that you have already picked the car, then your needs are beyond my capabilities.)
- Case one: True Random Pick -
33% #1a{Car, *Goat, Goat}(16.7%) : #1b{Car, Goat, *Goat}(16.7%)
33% #2a{Goat, *Car, Goat}(16.7%) : #2b{Goat, Car, *Goat}(16.7%)
33% #3a{Goat, *Goat, Car}(16.7%) : #3b{Goat, Goat, *Car}(16.7%)
If the door is chosen entirely at random, you have an equal chance that he shows you the car, you HAVE the car already, or the last door (neither shown nor picked) is the car. He didn't show you the car (eliminating #2a and #3b) and that leaves an equal choice of whether or not you should switch.
- Case Two - Known Goat Pick -
33% #1a{Car, *Goat, Goat}(16.7%) : #1b{Car, Goat, *Goat}(16.7%)
33% #2{Goat, Car, *Goat}(33%)
33% #3{Goat, *Goat, Car}(33%)
In this case, we have removed the host's choice as a random factor in two of the three base scenarios. The key here is that the 33% split is still valid. #1(a+b)=#2=#3. You have a 33% chance that you picked right (and should not switch) and a 67% chance that you picked wrong (and should).
- Case Three - Always Opens Door Two -
33% 1a{Car, *Goat, Goat}
33% 2{Goat, *Car, Goat}
33% 3{Goat, *Goat, Car}
Same as a random pick, only with fewer options. If he shows you a car, you're lost either way. If he shows you a goat, it's 50:50.
--
In summary, you should always switch. If you are dealing with Case One or Three, it won't make a difference. If you are dealing with Case Two, you will be better off for it. There are no cases where switching lowers your odds of car ownership. (Assuming, of course, that the host is not acting maliciously by only giving you the option when you've already picked correctly)
Trevel on June 22, 2009 10:21 AMIt seems that about 1/3rd of the commentators here believe that it matters if Monty Hall picks the one he knows doesn't have the car, or picks at random, the fact is that it doesn't matter since the problem states that the door opened didn't have the car behind it, whether this is due to prior knowledge, or just chance, you are still better off switching.
Refer to the chart on http://www.marilynvossavant.com/articles/gameshow.html and realize that there are some possibilities that are not listed, i.e. the door revealed by the host has the car behind it. Why is it not listed? Because we are told that he opened the door and there was a goat behind it. Whether these original potential outcomes are no longer possible by the time the question is posed is due to the host's knowledge or his luck, it doesn't matter.
Kearns on June 22, 2009 10:21 AMSee, the Monty Hall problem was easy for me to get my head around. The Unfinished Game however took me a long time, I argued vehemently with my friend about it, and ultimately decided a computer simulation would prove him wrong.
Even while coding it up I realized my mistake in logic, but I finished it anyway and conceded defeat. If I can't manage to do it through mathematics, simulation seems to always fix my thoughts (and upon reading "finishing the game" computer simulation was your method too, I feel like I'm awesome now)
aterimperator on June 22, 2009 10:23 AM"Marilyn is wrong, and her logic is flawed."
People who argue this point have obviously never actually sat down and tried to simulate this problem at all. Take the time to simulate it using cards and you will quickly see the error of your ways.
I think what this post shows is that people will argue anything to death even when it has been previously announced that there is nothing worth arguing about.
Just let it go people. If you want to argue the Monty Hall problem go somewhere else. Proving/disproving the Monty Hall problem is not the point of this blog post.
Matt on June 22, 2009 10:30 AM@Kearns - Commentators believe that it matters whether or not the host reveals a door purposefully or accidentally because the paper Jeff links to explicitly states that this is so. Are you arguing that the paper is incorrect?
aux on June 22, 2009 10:31 AMSuppose there are three doors: A, B and C.
Without loss of generality, let us assume the contestant picks A.
Let us enumerate the possibilities:
The car is in A, the host opens B, the contestant sticks with A and wins.
The car is in A, the host opens B, the contestant changes to C and loses.
The car is in B, the host opens C, the contestant sticks with A and loses.
The car is in B, the host opens C, the contestant changes to B and wins.
The car is in C, the host opens B, the contestant sticks with A and loses.
The car is in C, the host opens B, the contestant changes to C and wins.
There are 3 win cases and 3 lose cases. In 2 of the three win cases, the contestant switched to the other door.
QED.
Elongar on June 22, 2009 10:35 AMOh Lord. Not again. Please! The last set ruined my January.
As before, I side with Marilyn, but now I refuse to be drawn into explaining why. It's a redundant exercise trying to persuade people, because either you get it or you don't:
http://www.codinghorror.com/blog/archives/000781.html
Tobermory on June 22, 2009 10:35 AMAh, but suppose you pick a door, then Monty Hall falls down, and starts crawling. Meanwhile, one hidden goat gets bored, hops in the car, and takes it for a spin. He totals the car, but manages to drive it back, smoking and sputtering, and parks it behind a door. Not the same door it was behind before, the other door. The goat gets back behind the unoccupied door.
Finally Monty opens a door. It's the goat that didn't leave. You can win either a totalled car, or a goat smart enough to drive said car and bring it back. NOW should you switch doors?
Keep in mind that this is just what I came up with, and may be incorrect.
Monty Fall: Assuming that Monty will always open a door that is both unselected and does NOT contain the car, the probability distribution does not change. By ruling out the possibility of him opening the chosen door and/or revealing the car, the problem is reduced back to its original state.
Monty Crawl: For the game as a whole, switching doors still doubles the player's chances of winning. However, the player is *guaranteed* to win if they switch doors after Monty has opened the highest-numbered remaining door. Otherwise, the player's choice does not affect the outcome.
I'd like to propose a value, M, in a similar vein to the Erdos number.
M is the log(base 10) of the number of minutes it took you to be convinced that changing is the best tactic in the Monty Hall Problem.
I have an M of 2.08
Before Monty helps
1/3 picking right door
Monty helps:
Monty will open either door, since they're both wrong
Stay = Win
Switch = Lose
2/3 picking wrong door
Monty helps:
Monty has "2" choices - the 'right' door and wrong
Alas, Monty is forced into opening the 'wrong'
Stay = Lose
Switch = Win
1/3 of the time (initial scenario) switching WILL result in a loss
2/3 of the time switching WILL win.
I like to think of it this way:
If you pick a goat, Monty will reveal the other goat. Switching will win you the car.
If you pick the car, then Monty will reveal one of the goats. Switching will get you the other goat.
You have 2/3rds chance of picking a goat.
Matt Brunell on June 22, 2009 10:55 AMI like the Monty Maul example. Mostly for entertainment value.
Practicality on June 22, 2009 10:56 AMThe best way to understand the Monty Fall Problem is to change it slightly.
Monty Fall Problem: In this variant, once you have selected one of 1,000,000 doors, the host slips on a banana peel and accidentally pushes open all remaining 999,998 doors except one, all of which just happen not to contain the car. Now what are the probabilities that you will win, either by sticking with your original door, or switching doors?
You can see if you stick with your originally door, you only have a million in one chance of winning. If you switch you have 99.9999% chance of winning.
After you get over your initial amazement at Monties luck of *randomly* opening 999,998 doors without accidently opening the one that contains the car, you wisely switch doors.
WhatAreTheOdds? on June 22, 2009 11:03 AMNote that this sort of error isn't completely behind us yet - or at least it isn't very far behind us. It was recently discovered that psychological researchers have been making the same mistake for years on a problem equivalent (isomorphic?) to the monty hall problem. See http://blog.noblemail.ca/2008/04/combinatorics-debunks-psychology.html
Steven H. Noble on June 22, 2009 11:12 AM@WhatAreTheOdds
>The best way to understand the Monty Fall Problem is to change it slightly.
No, this is the _worst_ way to understand the "Monty Fall" problem, because you're absolutely wrong. If the host slips on a banana and randomly pushes open all 999,998 doors except your door and one other, you're chances are _exactly the same_ whether you switch or not. In the original problem, it is the host's _knowledge of the what's behind the doors_ that renders switching the better option. It doesn't matter if the host randomly opens a million trillion doors randomly, your odds don't change if he doesn't happen to reveal the car. The reason is that by virtue of the terms of the question, you are discounting all scenarios where a car is revealed, whereas in the original question you didn't have to discount any scenarios, because the host will never reveal a car, as he knows where the car is.
The interesting thing about this problem is not its solution but the reason why most people's intuition is wrong. In fact, I believe that it is due to the way that probability is taught in schools and universities.
There are two common interpretations of probability theory: the frequentist interpretation and the Bayesian interpretation. The former is usually taught in schools (though this may be changing), and starts with abstract axioms, e.g., a probability space is defined as "Given any set Omega, (also called sample space) and a sigma-algebra F}, on it, a measure P, defined on F, is called a probability measure if P(Omega)=1." - this is where you start building you intuition... (from wikipedia, but my old probability theory book is similar)
Edwin Jaynes was a firm believer in the Bayesian interpretation and his book "Probability theory: the logic of science" gives compelling arguments (a "beta" version is even available online). Most importantly his presentation of probability as an extension of classical Aristotelian logic is the most intuitive explanation of probability theory I have ever seen (i.e., no abstract concepts from measure theory). While the book requires a good amount of mathematical maturity in some of its arguments in the later chapters, reading just the basic chapters was very enlightening. Interestingly it turns out that the Bayesian methods are even more powerful than the classical frequentist methods. This comment is long enough, I'll post a more detailed explanation on my blog for those interested.
/Karl
Karl Krukow on June 22, 2009 11:16 AMI think mostly these questions (and especially these comments) demonstrate that most programmers need to take a writing class.
Seriously. Omit needless words. These explanations are so unclear it is difficult to determine whether the commenter is saying he agrees, he disagrees or that he wants to bring out some other point entirely.
Captcha: mural PXTCHOGUE (Is this thing Russian?)
Practicality on June 22, 2009 11:21 AMThe Monty Fall Problem does make a difference! The odds are only 1:3. That's because, the host is not supplying you with any information. It's as if Monty doesn't know which door has the prize and simply opens a random door himself. For example, imagine the prize is behind Door #1. There are six EQUAL possibilities (the fact that all possibilities are equal is important):
1). I pick Door #1, Monty opens Door #2
2). I pick Door #1, Monty picks Door #3
3). I pick Door #2, Monty opens Door #1
4). I pick Door #2, Monty opens Door #3
5). I pick Door #3, Monty opens Door #1
6). I pick Door #3, Monty opens Door #2
Notice I would lose if I switched in either situation #1 or #2. Also, notice I would win in situation #4 or #6.
However, in situations #3 and #5, I would lose whether or not I switched simply because Monty already revealed the prize (and I assume I am not allowed to switch to Monty's door). Thus, out of the six possibilities, I can only win 1:3 times.
But, you say, that's not the problem. The problem states that Monty opened a RANDOM door, but that still didn't reveal the prize. Wouldn't switching help you there? Answer is no. What we have now are four out of six possibilities to contemplate:
1). I pick Door #1, Monty opens Door #2
2). I pick Door #1, Monty picks Door #3
4). I pick Door #2, Monty opens Door #3
6). I pick Door #3, Monty opens Door #2
We threw out situations #3 and #5 because in those two, Monty revealed the prize. As you can see, there are four situations. Switching would make me lose in situation #1 and #2, but win in situation #4 and #6. In otherwords, switching is even odds. Considering the original 1:3 choice, switching doesn't improve or harm my odds. The odds are still 1:3.
So, why was the original Monty Hall problem favorable when you switched? Because the host was giving you information. The hose knew which door had the prize and gave you that information. Here are the six possibilities:
1). I picked Door #1, Monty opens Door #2
2). I picked Door #1, Monty opens Door #2
3). I picked Door #2, Monty is thinking of picking Door #1, remembers the prize is behind it, so picks Door #3 instead.
4). I picked Door #2, Monty picks Door #3.
5). I picked Door #3, Monty is thinking of picking Door #1, remembers that the prize is behind it, so picks Door #2
6). I picked Door #3, Monty picks Door #2.
Notice that situation #3 and situation #4 look identical, but aren't. Monty didn't randomly open a door, he specifically opened the door without the prize. Now, thanks to this new information, I can improve my odds.
It's like the problem of the friend with two children.
Friend: One of my two children is a boy.
What are the odds of both kids being boys? 1:3
Friend: My oldest child is a boy.
What are the odds of both kids being boys: 1:2. By supplying me with extra information, I can eliminate the possibility that the youngest is a boy, but the oldest is a girl.
I have to work out the Monty Crawl problem, however, I believe the odds are still better if I do switch. What they are is impossible to say without some work. But, there are certain situations where switching guarentees me a prize. For example, if Monty opens Door #3, switching guarentees me the prize. (I pick Door#1, Monty picks Door #3 because the prize is behind Door#2. I pick Door #2, Monty picks Door #2 because the prize is behind Door #1).
David W. on June 22, 2009 11:21 AMWhatAreTheOdds?
Of the two doors remaining after Monty's crazy fall, each has a 50% chance of being the door with the car. I recommend switching anyways, but in the Randomly Opened Door scenario, the choices are equal.
For N doors, there is 1 possibility where your door is correct, N-1 where another door is. Each possibility is equally weighted.
If someone knocks open all the doors except for yours and one other, there are n-2 scenarios where one of the doors shown will hold a car, and 2 that they will not. There is 1 where your door holds a car, and 1 where the remaining door does. The n-2 scenarios are discarded as no car is found, leaving 1 where you have the car already, and 1 where you do not. It is an equal choice.
--
If someone knowingly opened all the doors except for yours and one other, then there is 1 scenario where your door holds a car, and n-1 where the other doors do not. You have an advantage in switching that increases with larger values of n.
Knowledge matters.
The n-2/n chance can be discarded, as no car is shown.
Trevel on June 22, 2009 11:22 AMIgnore the last line in my last post -- I thought I'd deleted it.
Trevel on June 22, 2009 11:23 AMI didn't believe it either... until I coded it - here is my Java contribution:
import java.util.Random;
public class Test {
static Random r = new Random(System.currentTimeMillis());
int goodDoor = -1;
int guessDoor = -1;
int revealDoor = -1;
public Test() {
goodDoor = r.nextInt(3);
guessDoor = r.nextInt(3);
// This step is, technically, not required.
revealDoor = getRevealDoor();
}
// True if we guessed correctly at the start.
// Otherwise, false (which means we would have been right
// had we switched)
public boolean guess() {
return goodDoor == guessDoor;
}
// Identify a door that is neither the guess door, nor the correct door
public int getRevealDoor() {
while (true) {
int testDoor = r.nextInt(3);
if (testDoor != goodDoor && testDoor != guessDoor) {
return testDoor;
}
}
}
public static void main( String[] args ) {
int switchingWins = 0;
int notSwitchingWins = 0;
for( int i = 0; i < 10000000; i++ ) {
Test t = new Test();
if( t.guess() ) {
notSwitchingWins++;
}
else {
switchingWins++;
}
}
System.out.println( "Switching Wins = " + switchingWins );
System.out.println( "Not Switching Wins = " + notSwitchingWins );
}
}
I can understand why people really believe it should 50% and why switching should not matter. This game is really about choosing between one of two options, switch or not, so it is pretty much 50-50.
However...
That is NOT what is being asked in this problem. The *question* is should you switch doors after your initial choice. The answer is YES. For heaven's sake people, computer simulations confirm these results. I'm very sorry most of you people have an inability to understand this.
By the way, I saw mention of Deal or No Deal (DoND). While DoND is not the same as the Monty Hall problem, they are similar in that if you make it to the end of the game you *should* switch suitcases.
Here's the reason, and maybe, JUST MAYBE, this will help illustrate the Monty Hall problem. The reason you should switch cases in DoND is that you have a 1 in 26 chance of choosing the million dollar suitcase. Does that sound like good odds? So, if you make it to the end of the game there is a 25 in 26 chance that the model's suitcase contains the million dollar prize.
Get it now? With the Monty Hall problem you have a 2 in 3 chance of being wrong. If you are wrong then Monty Hall is *actually* telling you the door with the car.
Nicholas on June 22, 2009 11:31 AMWow I can't believe this post is close to 100 comments already... I really recommend The Drunkard's Walk, it's excellent - and contains a nice variant to the Monty Problem.
"in a family with 2 children, what are the chances, if one of the children is a girl named Florida, that both children are girls?".
It's not as trivial as it seems...
The simplest way to understand this is to imagine there are two goats. These goats have been fed a diet primarily consisting of alfalfa. Alfalfa (Medicago sativa) is a flowering plant in the pea family Fabaceae cultivated as an important forage crop. In the UK, Australia, and New Zealand it is known as lucerne and as lucerne grass in south Asia.
Alfalfa is a cool season perennial legume living from three to twelve years, depending on variety and climate. It resembles clover with clusters of small purple flowers. The plant grows to a height of up to 1 metre (3 ft), and has a deep root system sometimes stretching to 4.5 metres (15 ft). This makes it very resilient, especially to droughts. It has a tetraploid genome. The plant exhibits autotoxicity, which means that it is difficult for alfalfa seed to grow in existing stands of alfalfa. Therefore, it is recommended that alfalfa fields be rotated with other species (for example, corn or wheat) before reseeding.
Like other legumes its root nodules contain bacteria, Sinorhizobium meliloti, with the ability to fix nitrogen, producing a high-protein feed regardless of available nitrogen in the soil. Its nitrogen-fixing abilities (which increases soil nitrogen) and its use as an animal feed greatly improved agricultural efficiency. (The nitrogen comes from the air, which is 78 percent molecular nitrogen.)
Alfalfa is widely grown throughout the world as forage for cattle, and is most often harvested as hay, but can also be made into silage, grazed, or fed as greenchop. Alfalfa has the highest feeding value of all common hay crops, being used less frequently as pasture. When grown on soils where it is well-adapted, alfalfa is the highest yielding forage plant.
Alfalfa is one of the most important legumes used in agriculture. The US is the largest alfalfa producer in the world, but considerable area is found in Argentina (primarily grazed), Australia, South Africa, and the Middle East. Known as Kuthirai Masal in Tamil, alfalfa is mostly grown in the Coimbatore district of Tamil Nadu, southern India.
Within the U.S.A. the leading alfalfa growing states are California, South Dakota, and Wisconsin. The upper Midwestern states account for about 50% of US production, the Northeastern states 10%, the Western states 40% and the Southeastern states almost none. Alfalfa has a wide range of adaptation and can be grown from very cold northern plains to high mountain valleys, from rich temperate agricultural regions to Mediterranean climates and searing hot deserts.
Its primary use is as feed for dairy cattle—because of its high protein content and highly digestible fiber—and secondarily for beef cattle, horses, sheep, and goats. Humans also eat alfalfa sprouts in salads and sandwiches. Tender shoots are eaten in some places as a leaf vegetable. Human consumption of fresh mature plant parts is rare and limited primarily by alfalfa's high fiber content. Dehydrated alfalfa leaf is commercially available as a dietary supplement in several forms, such as tablets, powders and tea. Alfalfa is believed by some to be a galactagogue, a substance that induces lactation.
Meanwhile the car was produced by the automotive industry. The automotive industry designs, develops, manufactures, markets, and sells the world's motor vehicles. In 2007, more than 73 million motor vehicles, including cars and commercial vehicles were produced worldwide.
In 2007, a total of 71.9 million new automobiles were sold worldwide: 22.9 million in Europe, 21.4 million in Asia-Pacific, 19.4 million in USA and Canada, 4.4 million in Latin America, 2.4 million in the Middle East and 1.4 million in Africa. The markets in North America and Japan were stagnant, while those in South America and Asia grew strongly. Of the major markets, Russia, Brazil, India and China saw the most rapid growth.
About 250 million vehicles are in the United States. Around the world, there were about 806 million cars and light trucks on the road in 2007; they burn over 260 billion gallons of gasoline and diesel fuel yearly. The numbers are increasing rapidly, especially in China and India. In the opinion of some, urban transport systems based around the car have proved unsustainable, consuming excessive energy, affecting the health of populations, and delivering a declining level of service despite increasing investments.[citation needed] Many of these negative impacts fall disproportionately on those social groups who are also least likely to own and drive cars. The sustainable transport movement focuses on solutions to these problems.
In 2008, with rapidly rising oil prices, industries such as the automotive industry, are experiencing a combination of pricing pressures from raw material costs and changes in consumer buying habits. The industry is also facing increasing external competition from the public transport sector, as consumers re-evaluate their private vehicle usage. Roughly half of the US's fifty one light vehicle plants are projected to permanently close in the coming years with the loss of another 200,000 jobs in the sector, on top of the 560,000 jobs lost this decade.
Monty Hall was the host of the game show Let's Make a Deal, which he developed and produced with partner Stefan Hatos. Let's Make a Deal aired on NBC daytime from December 30, 1963 to December 27, 1968 and on ABC daytime from December 30, 1968 to July 9, 1976, along with two primetime runs. It also aired in syndication from 1971 to 1977, from 1980 to 1981, from 1984 to 1986, and again on NBC briefly from 1990 to 1991. He was producer or executive producer of the show through most of its runs. During the show's initial run, Hall became well known alongside model Carol Merrill and announcer Jay Stewart.
Monty Hall started his career in Toronto in Radio. Early in his career, Hall hosted such game shows as Bingo At Home and guest-hosted more established game shows such as Strike It Rich before hosting the first show of his own, Keep Talking in 1958. He succeeded Jack Narz as host of a well-received and unique game show called Video Village, which ran in 1960-1962 on CBS. On Video Village, contestants played on a giant game board consisting of three sections: Money Street, Bridge Street and Magic Mile. Players advanced with the roll of a large die. The further contestants advanced along the board, the better the prizes that were offered. A spinoff called Video Village Junior, featuring youngsters, was hosted by Hall and ran during the 1961-1962 regular television season. The first show he ever hosted was Bingo At Home. In 1962, with co-producer Art Stark, Hall sold his first game show to NBC, Your First Impression, which ran for two years. Stefan Hatos was the Producer of that show, and eventually, he and Hall formed a production company which is still running. Hatos died in 1999. Besides Let's Make a Deal, the game show Split Second which originally ran on ABC from 1972-75, and again in syndication in 1987 (with Hall also hosting that version) was the only other successful program from Hatos-Hall Productions. Other game shows from their production company included Chain Letter in 1966; a revival of the venerable 1950s-era panel quiz, Masquerade Party in 1974; 3 For the Money in 1975; It's Anybody's Guess in 1977, which reunited Let's Make a Deal announcer Jay Stewart with Hall, who also hosted the show, and the Canadian-based The Joke's on Us in 1983. Hall filled in as guest host on several daytime game shows while Let's Make a Deal was on NBC, most notably What's This Song? and PDQ. In 1979, Hall hosted the only game show since Video Village which he did not produce — Goodson-Todman's All-New Beat the Clock.
Hall received a star on the Hollywood Walk of Fame on August 24, 1973, a star on the Palm Springs Walk of Fame in 2000, and in 2002, he was also inducted into Canada's Walk of Fame. Hall is one of only two game show hosts on both Hollywood's and Canada's Walks of Fame, the other being Alex Trebek. In May 1988, the Government of Canada bestowed on him the prestigious Order of Canada for his humanitarian work in Canada and other nations of the world. For many years, he has been associated with Variety, the Children's Charity, helping to raise millions of dollars through their telethons and other related fund-raisers.
Hall was the recipient of the 2005 Ralph Edwards Service Award from Game Show Congress, in recognition of all the work the emcee-producer has done for charity through the years.
Hall graduated from the University of Manitoba, where he majored in chemistry and zoology, receiving his Bachelor of Science degree.
He has been married for many years to his wife, Marilyn, and has two daughters — actress and Tony Award winner Joanna Gleason and Sharon Hall, a television executive — and one son, Richard Hall, a television producer.
In addition to his work on game shows, Hall was a radio analyst for the New York Rangers of the National Hockey League during the 1958-60 season. Between 1956 and 1960, Hall worked as a host of NBC Radio's "Monitor" weekend broadcast. At least one recording of Hall on "Monitor" is known to exist.
Although retired, Hall still makes occasional television appearances. He played the host of a beauty pageant who schemed to become "the world's most powerful game show host" in the Disney animated series American Dragon: Jake Long. Monty appeared on GSN Live on March 14, 2008, and hosted a game of Let's Make a Deal for Good Morning America on August 18, 2008 as part of Game Show Reunion week.
In "The Monty Hall Problem," the player, having chosen a door, has a 1/3 chance of having the car behind the chosen door and a 2/3 chance that it's behind one of the other doors. It is assumed that when the host opens a door to reveal a goat, this action does not give the player any new information about what is behind the door he has chosen, so the probability of there being a car behind a different door remains 2/3; therefore the probability of a car behind the remaining door must be 2/3. Switching doors thus wins the car with a probability of 2/3, so the player should always switch.
max on June 22, 2009 11:35 AM@Nicholas:
Sigh. You're completely wrong. In DoND, you're selecting suitcases at random, so the Monty Hall problem is completely inapplicable. In the Monty Hall problem, the extra information comes from the host *knowing* which door the car is behind, and acting accordingly. In DoND, no-one knows which suitcase contains the million bucks. If you're lucky enough to get to the end, you can switch or you can stick, your odds are identical either way (50/50). If you don't believe me, look at the "Monty Fall" problem, either in the paper Jeff linked to or on the wiki page for Monty Hall.
moya on June 22, 2009 11:37 AMAs a poker player I always like explaining this problem using a poker analogy.
Imagine I approach you and offer to play a special game. I've got three cards, two kings and one ace. I shuffle these cards, deal one randomly to you and I get the other two. You're not allowed you look at your card. But I look at my two, pick one and discard it. Now how much are you willing to bet that your card beats my card? Remember you can't look at your card before betting. If we played 100 hands of this game betting the same every time do you think you would come out even?
It hardly takes a professional poker player to understand this is a losing proposition.
I think part of the reason this problem is so hard is because our minds tend to not start at the 'beginning' of the problem. We need to consider the probability of the first choice.
My 'proof':
When you make your first choice, you have a 2/3 chance of being wrong.
If your first choice is wrong and you choose the second door, your SECOND AND FINAL choice will be right. So switching doors for your second choice means you will be right 2/3 of the time. Q.E.D.
Asa on June 22, 2009 11:39 AMLet's say you are standing in front of three slot machines. No one else is allowed to play these machines but you. You are given an endless supply of coins and are guaranteed that any one of the machines will hit the jackpot, given enough attempts. All three machines have statistically equal chances of hitting the jackpot on a given pull. Let's say that a few hours into playing one of the machines, the power goes off to one of the two machines that you have not been playing. If you plan to play one of the two remaining machines until you hit the jackpot, would you be more likely to use less coins by switching to the other working machine or sticking with the machine you have been playing?
Brad Barker on June 22, 2009 11:39 AM@Gabriel I started to see the light
@Gareth made it all clear. So simple
I am going to call this thread "The Monty Hall Problem Problem".
@seth
Be careful, because Gabriel's assertion that it doesn't matter whether or not the host reveals a door randomly is completely false.
moya on June 22, 2009 12:00 PM@moya
I don't believe that analysis of the Monty Fall problem is correct. Consider writing a simulation. The only time the Monty Fall simulation results would be different from the normal Monty Hall case is when Monty randomly chooses the door with the car. However the problem explicitly states that we're excluding those cases; we're only calculating the probabilities of the two options given that we know he has selected a door with a goat. The results are identical to the Monty Hall problem.
Chris (ctcarton.at.gmail) on June 22, 2009 12:00 PM@moya
I don't believe that analysis of the Monty Fall problem is correct. Consider writing a simulation. The only time the Monty Fall simulation results would be different from the normal Monty Hall case is when Monty randomly chooses the door with the car. However the problem explicitly states that we're excluding those cases; we're only calculating the probabilities of the two options given that we know he has selected a door with a goat. The results are identical to the Monty Hall problem.
Chris (ctcarton.at.gmail) on June 22, 2009 12:01 PMIt's frightening how stupid some people are. And they don't even realize it. They acually believe they are smart.
People not understanding the Monty Hall-problem, why it is important wether the host opens a door randomly or not and the Girl-Boy problem shouldn't post "facts" here. Only questions.
Simon on June 22, 2009 12:06 PM"How many irate mathematicians are needed to change your mind?"
I am reminded of a quote where someone was asked a similar question (sadly, can't remember who) - "if I were wrong it would only take one".
This is very relevant to programming issues - the problem of not being able to see the obvious real world implications of your design (that the host must choose a door with a goat) and then trying to defend a bad result by saying the specification should have been mentioned it.
Paul Coddington on June 22, 2009 12:08 PMWhy the hell did you reopen this can of worms?
Here come a thousand posts complete with math and program examples to *prove* they are correct. I like you less.
Matt on June 22, 2009 12:09 PMOk, nevermind. I worked out the math and came up with the 50/50 probably if monty chooses randomly. Ignore my last post! :)
Chris (ctcarton.at.gmail) on June 22, 2009 12:13 PMHasn't the Monty Hall thing been beaten to death sufficiently by the billion other blog posts about it? Did you know how many E.T. cartridges were buried in a landfill...blah blah blah.
Anyone who feels the need to post a comment questioning this needs to just shut up, stop yapping, and just read up on it. And if it's new to you, you must be new to the web.
Dennis Forbes on June 22, 2009 12:14 PM@Chris
The fact that we discard the cases where Monty reveals a car is the crucial point.
If you try it yourself with a deck of cards, two kings and an ace, you'll see it makes no difference whether you switch or stick. When you pick randomly to "reveal" a second door, around 1/3 of the time you'll reveal the ace. When you discount these times, the ace will be the original card half the time and the last card half the time. i.e., of the 2/3s of the time you don't reveal the ace, half (1/3) of the time your original guess was correct, and half (1/3) of the time the last card it the ace.
The mistake in your logic comes from misunderstanding the terms of the question:
>The only time the Monty Fall simulation results would be different from the normal Monty Hall case is when Monty randomly chooses the door with the car. However the problem explicitly states that we're excluding those cases
"We will discard those times when he reveals the car" does not mean the same thing as "he will always reveal a goat" - if it did, he wouldn't be picking a door at random! Although we're only dealing with those cases where he doesn't reveal the car, we still have to *consider* the fact that he could have revealed a car - similar to "Finishing the Game"
moya on June 22, 2009 12:15 PMI found this video helpful on explaining the Monty Hall problem: http://www.youtube.com/watch?v=mhlc7peGlGg&NR=1
Lucas McCoy on June 22, 2009 12:19 PMThis is one of the many examples people should be shown over and over again until they learn to stop trusting their intuition! It is ALMOST ALWAYS WRONG! I would wager that almost all suffering in the world boils down to people refusing to ignore their intuition and deal with things rationally. We've got parents putting their children in mortal danger by not vaccinating them because of a stupid error of mistaking correlation for causation. We've got even more parents abusing their children savagely by sheltering them and preventing their maturation thanks to the parents following their "gut feelings" with regard to what information to teach their kids, what media to let them see, etc. The parents never stop to think where their children are going to learn how to handle adult situations, they just assume it comes with age (it doesn't, and if they go too long they may never be able to learn it). Billions of dollars are wasted every year trying to disprove the idiocy people come up with thanks to their "intuition" and even more money is wasted by being thrown at charlatans, homeopaths, and pseudoscientific con artists, all of that boils down to people refusing to defer to their rational abilities and relying on their massively unreliable intuition.
Intuition evolved in human beings to operate only on a very local, very personal level. Any time a situation involves more than 2 people, your intuition cannot be trusted. Intuition also tends to be very conservative, seeing patterns where none exist. This may not harm you if all you're doing is not eating from one bush that you feel might be poisonous (but actually isn't). But when it comes to things like vaccinations, parenting techniques, and things like that, "better safe than sorry" does not apply. By being conservative, you do tremendous damage for no good reason. Our culture is tremendously anti-intellectual and rabidly anti-rational. It's very difficult to even address many issues because people are so certain that their intuitions must be right and every corner of our culture teaches that reason and science are tricksters and liars.
"The Drunkard's Walk" is a fantastic book and I recommend it to everyone. It will include things you will likely refuse to believe, but are true (grading by teachers is random and significantly biased is one I find most people REALLY don't want to believe). Another book that has a couple counterintuitive things in it that are good to know is "Nine Crazy Ideas In Science." Its first chapter alone should end the gun control debate once and for all. It shows conclusively that the prevalence of gun ownership in a society has no correlation with violent crime, neither positive or negative. Counterintuitive, sure, but provable. How many lives are lost every year because people are wasting their energies in anti-gun movements when they could be doing something productive? Intuition costs our society an inestimable amount of money and lives.
We really should start teaching critical thinking skills around 5th or 6th grade. Teachers and parents would hate it because the kids would quickly be better at it than they are, but if we could convince people to once again at least TRY to be rational and have some intellectual integrity I think we would come out the other side a much happier world.
otakucode on June 22, 2009 12:28 PM# in pythonesque, version 3.x:
from random import choice
def pull(s):
k=choice(tuple(s))
s1=s.copy()
s1.remove(k)
return k,s1
def run(stay=True):
doors=set((1,2,3))
chosen,rest=pull(doors)
car,goats=pull(doors)
opened,closed=pull(goats)
while opened==chosen:
opened,closed=pull(goats)
if stay:
return chosen==car
else:
return choice(list(rest-set((opened,))))==car
n=0
cyc=10000
for i in range(cyc):
n+=run(True)
print("Frequency staying: "+str(n/cyc))
n=0
cyc=10000
for i in range(cyc):
n+=run(False)
print("Frequency switching: "+str(n/cyc))
# Output:
#Frequency staying: 0.3343
#Frequency switching: 0.6667
ooops!!!!
your site is not tabs friendly!
#last try
from random import choice
def pull(s):
k=choice(tuple(s))
s1=s.copy()
s1.remove(k)
return k,s1
def run(stay=True):
doors=set((1,2,3))
chosen,rest=pull(doors)
car,goats=pull(doors)
opened,closed=pull(goats)
while opened==chosen:
opened,closed=pull(goats)
if stay:
return chosen==car
else:
return choice(list(rest-set((opened,))))==car
n=0
cyc=10000
for i in range(cyc):
n+=run(True)
print("Frequency staying: "+str(n/cyc))
n=0
cyc=10000
for i in range(cyc):
n+=run(False)
print("Frequency switching: "+str(n/cyc))
# Output:
#Frequency staying: 0.3343
#Frequency switching: 0.6667
...and it also strips anything that starts with "less-than" and ends with "bigger-than", although it is obviously NOT html...
(I tried to simulate the indents with "less-than"intent"bigger-than")
For me, the solution to the Monty Hall problem "clicked" when I read the following variant:
Suppose there are 10,000 doors instead of 3. After you choose, Monty opens 9,998 doors, all of which do not have a car behind them, leaving only your door and one other door closed. Now it is immediately obvious that the chance you originally picked the right door is very small (1 in 10,000), while the chance the other door still closed is the right door is really high.
Jeroen
Jeroen on June 22, 2009 12:57 PMHah. Jeff just wants to boost his comments count.
I recommend doing 0.999999... == 1.0 next. That always generates lots of comments.
:-)
AndyL on June 22, 2009 1:10 PMRidiculous BS. Mathematicians can bite me. Once the goat door is revealed there is a 50/50 chance of getting the car, regardless of anything else. And the earth is round (mostly) and time is relative, etc. etc.
Kenneth on June 22, 2009 1:15 PMA good way to think about this problem for me was the following trick:
If you stick with your initial door, you basically selectd a single door, so your chance to win is 1 in 3, so 1/3. However, if you switched, you basically selected two doors and the moderator tells you the wrong door of these two doors. It is just confusing that the moderator first opens the door (thus telling you the information about the wrong door) and THEN you decide to take the other door (which in fact, is the sequence of selecting the TWO other doors and then trivially selecting the LAST door (because the other door has a goat, by moderator)), so overall, this is 2 in 3, 2/3.
tetha on June 22, 2009 1:27 PM@Kenneth:
I lol'd.
I wanted to toss two other statical quirk problem in humans.
You conduct two experiments of tossing a coin repeatedly. In the first experiment you toss the coin until you see HTT as a pattern. In the 2nd experiment you toss the coin until you see HTH as a pattern. You repeat both experiments a large number of times (to make the results accurate).
Will the two experiments have the same average # of tosses to see the pattern. If not which one occurs sooner and why?
A test for a disease is 99% accurate, 1/10,000 people have the disease. You are chosen randomly to be tested for the disease and you test positive. What's the probability that you have the disease?
See the problems and solutions here there's also a lot of other good ones.
http://www.ted.com/talks/lang/eng/peter_donnelly_shows_how_stats_fool_juries.html
How many goats behind each door? What kind?
Steve on June 22, 2009 1:53 PMJeff, you missed the point of Paul Bucheit's critique of your boy/girl question.
Just because it's "a simple question asked in simple language" doesn't mean it's well-formed and unambiguous. In fact, if anything, "simplicity" probably makes ambiguity MORE likely. This is especially true when calculating probabilities, where your assumptions make all the difference.
Let's translate your question into less ambiguous terms. There are 2 possibilities:
1) Ted has 2 kids. You ask him to tell you the sex of one of them. (either one, his random choice). He says "Girl". Given this, what's the odds the other child is the opposite sex? Answer: 50%
2) Ted has 2 kids. You ask him if one or more of his kids is a girl. If so, what's the odds the other child is a boy? Answer: 66%
Do you see the difference:
In the first question, the "Girl" reported to you is a random draw (the question would be the same even if "Boy" had been reported) and is thus independent of the second child's sex.
In the second question, the "at least one Girl" result is screened for, so the two-Boys possibility is being filtered out.
Your question is ambiguous because it doesn't say how the first reported result (the one he tells you) is chosen.
You may think this is trivial, but it's not: What if you wanted to write a simulation to test your calculation? Which algorithm do you choose? Do you throw out the Boy-Boy results or not? If you don't have enough information to write a simulation, you don't have enough information to give a definitive probability.
The problem with the Unfinished Game is that it does NOT distinguish properly between what Jeff Atwood intended it to be (hence ending with a 2/3 probability) and the "nosy neighbor" scenario.
It comes to the same downfall as Monty Hall/Fall: intent is KEY because it shifts the probabilities.
In Monty Fall, the probabilities shift to 50/50 because Monty is not adding information (more information is coming in, but that information is as likely to drop us out of the scenario a (he accidentally opens the door we chose, or he accidentally opens the door with the car behind it) as it is to guide us. Thus, the problem domain has contracted but no new information has been imparted on the existing choices.
In the Unfinished Game scenario, we are supposed to realize that the information offered is NOT random, but as a result of a pointed question ("Is one of your children a girl") but not TOO pointed question ("Is your oldest child a girl"). If it were random, you end up with the "nosy neighbor" scenario, wherein the extra information contracts the problem set (you are as likely to have seen a boy walking across as a girl) instead of ellucidating the remaining domain.
Which brings me back to the first paragraph of Atwood's piece, where he scolds us for telling him his formulation of the Unfinished Game problem was incredibly poorly stated. Sorry, but it was. He does not say if this person pointedly told us he has a girl at random or with some surrounding information, and supposes that we must infer that there was some surrounding context to that information.
Personally, as a parent, I answered "~1". If you are a parent and tell someone that "one of my children is a girl" you are saying that the other one is not. Simple human nature. If I have two girls, I'm going to say I have two girls, not one. The only possibilities then are:
1. The other child is a boy
2. The other child is a hermaphrodite of some sort
3. The person is being deliberately coy about their children's genders
Since 2 and 3 are generally very small probabilities, that leaves just about a 100% chance that the other child is a boy.
Of course, Atwood's scenario posits that (3) is the dominant probability, which then overwhelms the odds of the situation, and further that there is not a REASON that they are being deliberately coy (for instance, some odd societal stature loss from having two girls).
Tom Dibble on June 22, 2009 2:31 PM@Lint I found that explanation a little confusing so after working it out myself I'm going to restate my reasoning through it to hopefully help anyone else out as well.
G-G, G-B, B-G, B-B are the possible combinations.
If I ask the sex of one of the child I'm not in 3 of 4 states as you might assume. I'm putting myself in one of 8 states. The way I've asked the question makes ordering relevant for the G-G and B-B situation. So now I have the following states...
G-G expands to..
G1-G2
G2-G1
G-B expands to
G1-B1
B1-G1
B-G expands to
B2-G2
G2-B2
B-B expands to
B1-B2
B2-B1
Using those states 4 of them (G1-G2, G2-G1, G1-B1, G2-B2) are descriptive of my current situation of knowing the first kid I'm told about is a girl. Of those 4 states 50% of them are Boys 50% are Girls.
Now when you ask "At least one Kid is a Girl" you are wording the question such that it is order independent. G1-G2 is the same as G2-G1. In this case you have the following possible states you can be in
G-G, G-B, B-G.
Of the three states 2/3rds of them has a Boy for the other child.
I think the key to understanding stuff like this is to identify if ordering matters, break down the possible states, then count the probabilities.
For the record, a better statement of the "Unfinished game" problem would be:
In a random gathering of people, we asked everyone with two children to stand up and everyone else to sit down. We then asked those standing to only remain standing if one or more of their children was a girl. One woman was standing at this point. What are the odds that she had a girl and a boy?
The problem, though, is that making the problem clearer starts sending warning signals to the quizee. Not sure how to best pose this scenario in a "natural" manner without either causing critical ambiguity or tipping the quizee off that something unintuitive is afoot.
Tom Dibble on June 22, 2009 2:36 PMHmm... trying to explain the Monty Hall problem may be almost as bad as trying to convince your drunk friend not to bet $100 on the Superbowl coin flip.
"Well the last three Superbowls were heads, so this year it's definitely going to be tails!"
I won't name names.
Leah Culver on June 22, 2009 2:45 PMPlease, if you want to explain the answer, create your own blog that nobody reads, because that's about how interesting this problem is. The topic has been beaten to death. RIP
Orificer on June 22, 2009 2:52 PMOh dear I'm going to get dragged into this again. Here goes:
@Tom Dibble
>It comes to the same downfall as Monty Hall/Fall: intent is KEY because it shifts the probabilities.
I don't agree with this statement. I don't think the intent matters, just the actual outcome:
Monty Fall is the same as Monty Hall once the chance of accidentally revealing the car is gone.
However, intent is a good indicator of predicting what you should do before the event has passed.
Tobermory on June 22, 2009 3:12 PMIt looks like the only way to finish the game is to close the threads.
Practicality on June 22, 2009 3:16 PM@eshepherd OMG! THANK YOU! You've struck what, for me, is the best possible, most intuitive explanation of why the probabilities work out the way they do.
So people don't have to search, eshepherd said: "You're not dropping one, you're getting both doors that you didn't pick."
Perfect! If you switch it's probabilistically the same as getting to open two doors! 2/3! All the extra info about the host knowing and choosing is just there to make sure no situations arise where he accidentally opens the door containing the prize.
CynicalTyler on June 22, 2009 3:26 PMA better interview question would be:
"Given that the answer to the Monty Hall problem is to switch your answer, can you explain why that's true?"
I build robots. Check out my blog at:
http://forums.trossenrobotics.com/blog.php?u=3182
@Logo - I wasn't trying to detail the alternate solutions so much as make the point that the question phrasing critically matters in what result you arrive at. (Which Jeff seems to have dismissed as sour grapes)
Probably clearer than my case 1 question would be to phrase it like the "Nosy neighbor" scenario that Tom Dibble refers to, or "Nebulous Neighbors" in the pdf Jeff links. Tom didn't actually elaborate on it, so I'll paraphrase from the pdf:
Nebulous Neighbours: Your new neighbours have two children of unknown gender. One day you catch a glimpse of a child through their window, and you see that it is a girl. What is the probability that their other child is also a girl?"
To me, this makes it totally unambiguous what is being asked.
I think JC on June 22, 2009 7:58 AM was the first to write it so I could understand it. MarkP's comment was good too.
Though I think I'd kick myself if I switched and the car was behind the door I chose first time. That's probably why most people would want to stay with their first choice. Like choosing the same Lottey numbers each week because you'd feel like a fool if your regular numbers came up and you had changed that week.
John Ferguson on June 22, 2009 3:48 PMAh, people still arguing about this.
It really is a fantastic problem though, if for no other reason than the fact that it shows how violently even the most thoroughly educated people can react when something runs counter to their intuition.
Anyways, for anyone's made it alllll the way down here while still in the 50/50 camp, I'm going to take my own (hopefully non-redundant) crack at explaining it.
The question isn't about the probability of a car (prize) being behind a door, it's about the probability of the door you PICKED having a car behind it.
At the outset:
There are twice as many ways to pick a losing door in the first phase as there are to pick a winning door.
So you have a 2/3 chance of picking a loser, and a 1/3 chance of picking a winner.
Now we take one of the losing doors away... what's the probability of the car being behind the door you picked? The same as before! 1/3.
Why? Because there are two different ways (2/3) to pick a loser at the outset. This means the probability of having a loser after a door is taken away is 2/3 (there's two losers to chose from), which means the probability of having the winner is still only 1/3.
Another way to look at it is: How can taking one door away after you make your first choice change whether or not the door you picked is a winner?
DM on June 22, 2009 4:14 PMThe intuitive paradox on this problem comes from looking at the end game without considering the prior state. If you were to walk into a half completed Monty Hall game without prior knowledge of the original guess, the odds would truly be 50/50.
In reality, the prior state plays a huge part of the final odds.
Consider doors x, y and z. We'll define x as always being the winner without specifying the mapping between x, y, z and 1, 2, 3. Therefore when you pick a number, you don't know what letter you picked.
If you picked x, Monty will pick y or z and your best move is to stay.
If you picked y, Monty will pick z and your best move is to change.
If you picked z, Monty will pick y and your best move is to change.
You do not know what letter your initial selection was but two possibilities favor changing while only one favors staying. You're best bet is to act on the more likely probability that you initially chose y or z and not x.
CK on June 22, 2009 4:28 PMQuestion about the Monty FALL problem:
When the host slips and falls, does he sometimes open the door that the contestant picked, or is he magically immune from opening that door and only the unpicked ones?
Jason M on June 22, 2009 4:32 PMGood lord - I can't believe you losers are still debating this. There is SO much literature and precedent on this question you are not going to solve it here.
The people who say 50% are wrong. The people who say 66% are right.
Google it and read.
Try to understand.
Even if you don't understand, the answer is still the same.
b on June 22, 2009 4:59 PMAsk yourself, the car doesn't magically move once that non-winning door is opened, now does it? When all the doors were closed, and you picked one, you had a 1-in-3 chance of getting the car. That means there's a 2-in-3 chance the car is SOMEWHERE ELSE. So when the host opens one door, revealing a goat, that means that 2-in-3 probability has focused on the Other Door that you didn't choose.
If you play with a million doors, the odds the car is behind the last unopened door are not 1/2, they are 999,999-in-1,000,000! The car itself does not shift around, only the probabilities do.
just jeff on June 22, 2009 5:07 PMJeff, in the other article, the problem you stated was nothing like the Monty Hall problem. In this one, it's 66% because Monty Hall cannot open a door that has the car. In the other, it's 50% because we only need to know what the other child is.
The way I think of it is the only way I can lose by switching is if I picked correctly the first time which was 1 in 3 odds. If I picked either incorrect box switching means I win since the host must reveal an empty box.
Pete on June 22, 2009 5:18 PMThe combinations of boy and girl are a red herring. They're statistically meaningless unless you can get everyone on the planet to agree to having two children.
The sex of a child is always independent of the sex of other children.
BA on June 22, 2009 5:18 PMBA, Yes of course the sex of one child is independent of the other children. We know that. Everybody knows that.
Doesn't answer the question though. You've fallen for the red herring and completely skipped the question. Sucker.
Andy on June 22, 2009 5:33 PMWWJD = What Would Jesus Do.
Actually, it's a good messiah interview question. That and get the solutions to np-hard problems. Oh and while you're at it, ask if the moon landing was a hoax or not.
Man I love omniscience.
This blows my mind.
Jacob on June 22, 2009 5:52 PMSo what's the deal with the real Monty game anyways?
1. Does Monty always reduce the number of doors from 3 to 2?
2. Does Monty never open the door to the car in 1. ?
3. Does Monty have a tell, and did the outcome of the real Monty Hall games agree with statistical simulations?
"Good lord - I can't believe you losers are still debating this. "
Amen. What is it about Jeff's "it's been covered to death" don't you people get. If you want to debate it, go somewhere else. Better yet, just google it and read up on it and save yourself the headache. There is nothing to debate about this problem.
Matt on June 22, 2009 6:02 PMOk then, what's the question? I thought it was "What are the chances that the other child is CHOSEN_SEX?".
By concluding that all combinations of of boy and girl are equally likely you are making a statistical fallacy in assuming that a randomly selected subset has the same properties as the superset.
To illustrate, pretend we have a planet where people can choose to have either one child or two children (for whatever reason, the point is to reduce the sample space). And lets say that 2/3 the population chooses to have one child. Now, by some random chance, all of the people who chose to have one child all had boys. Statistically, that just ruins everything. Because in this scenario, if you have two children, it is more likely that you have two girls.
Why? Because half of all births are already boys. Assuming an even distribution of boys and girl births, we can expect two child couples to have only girls.
To use the general case that it is 50% likely for a given sex during birth as true for all subsets is wrong. Especially since we aren't scooping up a random subset, but a subset that also exhibits an additional specific quality.
So, in conclusion, we honestly cannot know with any degree of certainty the sex of a given child based on the sex of another child, no matter how you finagle the language. There are simply too many other variables.
It's also the problem with the "proofs" provided. They all just assume two child families and run data using two child sets without thinking about the likelihood of having a two child set in the first place.
Data from people I know:
My parents: GBGB
My older sister: G
Her husband's parents: BGB
My wife's parents: BGG
My younger sister: GGB
My aunt and uncle: GGB
My boss: B
My coworker: B
My step-father: GB
His daughter: GG
My sister's neighbor: BB
13 girls, 12 boys, 3 two child families out of 11. Not a terribly large sample size, true, but it is representative of the inherent instability of what the question is asking. The people who are claiming 66% are claiming to know more information than than actually have available. The event is so definitely random that the best thing to do is to flip a coin and call it 50%. Anything else is being dishonest on some level.
BA on June 22, 2009 6:14 PM"The event is so definitely random that the best thing to do is to flip a coin and call it 50%. "
And that's exactly what many of us proposed that you do to prove the final conclusion to yourself. And yet, you obviously haven't done that!
I really don't know why people keep arguing around in circles on these things instead of just doing a quick simulation with cards or a coin and figuring out the REAL answer. It's so much easier and you don't have to even think about it.
Matt on June 22, 2009 6:26 PMSounds like a fairly standard application of Bayes' Theorem.
I could be wrong, but I get the same answer as everyone that resorted to counting or simulations.
Just like a bunch of programmers to go back to basic counting and complicated simulations rather than use an existing, well tested algorithm.
Allen on June 22, 2009 6:40 PMThe linked article is ridiculous. A made up "Proportionality Principle" claiming to be a restatement of Bayes' Theorem, when the Wiki entry on Bayes' theorem actually uses Monty Hall as an example and gets the right answer.
Probability is a measure of information. People getting hung up on the "probability that an event occurred" without realizing that it doesn't matter. We *know* the event occurred.
People can make their own red/black cards as stated in the pdff. They can sit there and count how many times they flip the red card over and see red on the back. It will happen 1/2 the time (unlike the Monty Hall problem). You can play with a Monty Hall simulator online. Try it 100 times without switching, you'll win about 33 times. Try it 100 times switching every time, you'll win about 66 times. Sheesh.
Citizen Z on June 22, 2009 6:44 PM@BA:
The problem explicitly states that they have two children. So trying to take into account the number of children other families have is a wrong assumption. Plus, even if it was correct, two children out of a 7 billion people isn't going to make, statistically, much of a difference. Anyway.
I will note, however, that there is an assumption that the chance of a child being a boy or a girl is 50% each way.
The four possible combinations of children would be BB, BG, GB, and GG. We know there is at least one girl, so BB is impossible. Therefore, the only choices that are left are BG, GB, and GG. Which would say the choices for the other child are B, B, and G. There is a 1/3 chance of the other child being a girl.
It's not a classic case of "P(A) Given B," because A is a subproblem of B, not the other way around. The problem you're used to is "I've already had a child who is a girl, so what's the odds of my next child, which I haven't given birth to, being a girl?" This problem is "I've already had *two* children. One of those children is a girl; what's the probability the other one is as well?"
And I'd think, if you looked at a large group of people with two children, and you selected families with at least one girl, you'd see the same thing: 1/3 have two female children, 2/3 have a girl and a boy.
Birch on June 22, 2009 6:50 PMThen let's define some parameters and get some basic data.
What are the likelihoods for the following:
1 child families
2 child families
3 child families
4 child families
5 child families
6 +child families
Basically the algorithm will first determine the family size based upon the previous likelihoods. Then generate enough children to populate the family. Then we discard the family if it does not have two children.
Then we can get the statistics for all the different combinations and run it through the proper formula to find the ending result.
Repeat this for some sufficiently large number and aggregate the results to find the most likely answer within a standard deviation.
(Of course, the algorithm should randomly start new families and generate children and randomly deposit them into all active families instead of filling them in as they come, but it's a cut I can live with.)
Another way to go about it is to generate a sufficiently large number of children and divide them among the different sized families according to the size probabilities. And then just use the two child families.
That's my biggest problem with all of the mathematical and programmatic proofs provided. They all seem to be ignoring the fact that not all families have two children and the distribution among the different combinations may not be even.
In other words, why is it safe to ignore all the other children in the world when considering this problem?
BA on June 22, 2009 6:52 PM@Birch
But to treat the problem as simple combinations is to exclude a bunch of relevant data as I tried to show in my hypothetical world. Yes, in isolation the probabilities of each set is 25% and we can exclude one set because of what we know currently and each remaining set has equal probability which would then bring them all to 33% of which two of our choices are positives which would then give us a 67% chance positive.
Let me state that I understand that. Perfectly. In a world of two child families, this would be true 100% of the time.
But the problem does not stand in isolation from the world. Not statistically. Because the statistics of them being a two-child family is a consideration itself. Plus the ratio of girls to boys in non-2 child families would affect the ratio of girls to boys in 2 child families given that the ratio of all girls to all boys is 1:1.
I'm questioning the assumption of treating 2 child families as if they represented the whole.
BA on June 22, 2009 7:02 PMQuite interesting question, and debates thereafter.
That reminds me of Nicholas Nassim Taleb, who wrote two books "Fooled by Randomness" and "The Black Swan", and one of the themes in both the books is that human mind isnt really attuned to understand randomness(though this summary is perhaps an over-simplification).
@just jeff
"Ask yourself, the car doesn't magically move once that non-winning door is opened, now does it? When all the doors were closed, and you picked one, you had a 1-in-3 chance of getting the car. That means there's a 2-in-3 chance the car is SOMEWHERE ELSE. So when the host opens one door, revealing a goat, that means that 2-in-3 probability has focused on the Other Door that you didn't choose."
In other words, there is higher chance of choosing the wrong door than right one the first time it is choosen.
Actually, IMO there's actually a way to solve and resolve this Monty Hall Problem once and for all: Good old Empiricism.
Find lots of people or record high number of observations(high number need due to Law of Large Number in statistics) where the game of guessing which one of the three doors the object is behind. If it happens statistically that more people have gotten it wrong than right the first time they choose the door, then this proves that at least changing the door is a good choice.
Quite interesting question, and debates thereafter.
That reminds me of Nicholas Nassim Taleb, who wrote two books "Fooled by Randomness" and "The Black Swan", and one of the themes in both the books is that human mind isnt really attuned to understand randomness(though this summary is perhaps an over-simplification).
@just jeff
"Ask yourself, the car doesn't magically move once that non-winning door is opened, now does it? When all the doors were closed, and you picked one, you had a 1-in-3 chance of getting the car. That means there's a 2-in-3 chance the car is SOMEWHERE ELSE. So when the host opens one door, revealing a goat, that means that 2-in-3 probability has focused on the Other Door that you didn't choose."
In other words, there is higher chance of choosing the wrong door than right one the first time it is choosen.
Actually, IMO there's actually a way to solve and resolve this Monty Hall Problem once and for all: Good old Empiricism.
Find lots of people or record high number of observations(high number need due to Law of Large Number in statistics) where the game of guessing which one of the three doors the object is behind. If it happens statistically that more people have gotten it wrong than right the first time they choose the door, then this proves that at least changing the door is a good choice.
The first time I came across this problem was in "The Curious Incident of the Dog in the Night-time," and I thought it was explained very well there. I like the explanations above also to think of a million doors and narrowing down from there.
Scott Carpenter on June 22, 2009 7:13 PMQuite interesting question, and debates thereafter.
That reminds me of Nicholas Nassim Taleb, who wrote two books "Fooled by Randomness" and "The Black Swan", and one of the themes in both the books is that human mind isnt really attuned to understand randomness(though this summary is perhaps an over-simplification).
@just jeff
"Ask yourself, the car doesn't magically move once that non-winning door is opened, now does it? When all the doors were closed, and you picked one, you had a 1-in-3 chance of getting the car. That means there's a 2-in-3 chance the car is SOMEWHERE ELSE. So when the host opens one door, revealing a goat, that means that 2-in-3 probability has focused on the Other Door that you didn't choose."
In other words, there is higher chance of choosing the wrong door than right one the first time it is choosen.
Actually, IMO there's actually a way to solve and resolve this Monty Hall Problem once and for all: Good old Empiricism.
Find lots of people or record high number of observations(high number need due to Law of Large Number in statistics) where the game of guessing which one of the three doors the object is behind. If it happens statistically that more people have gotten it wrong than right the first time they choose the door, then this proves that at least changing the door is a good choice.
Guys: Don't call people stupid or idiots. This is a difficult problem and has fooled many statisticians and mathematicians. You especially don't call someone an idiot when they're right and you're wrong.
First of all, draw out a table of probabilities. After all, there are only 18 rows in the table (3 doors you choose x 3 doors where the car is located x 2 doors Monty can choose).
Let's consider the Original Monty Hall problem:
There are 6:18 rows in the probability table where you picked the car. That means, there are 12:18 rows where you didn't pick the car. Monty picks the car ZERO times in those remaining 9 rows. Since there is only one remaining door, picking it will give you the car 12:18 times.
Let's look at the Monty Fall problem:
Same initial condition: There are 6:18 rows in the probability table where you picked the car. That leaves 12:18 rows where you didn't pick the car. Now, Monty picks the car in six of those remaining rows (That is, there are two remaining doors, and he has a 1:2 chance of picking the door with the car).
Since the game states it isn't considering those 6:18 possibilities, we'll toss them out of our probability table. Now, there is a 6:12 rows that you initially picked the car, and a 6:12 rows that you didn't picked the car. In this case, switching doors does not improve your chances of getting the car.
BTW, it is still a 6:18 initial chance of picking the car, we simply tossed the six rows where you picked a door, Monty picks a door, and the car is behind it. Obviously, switching in those six instances doesn't help you in that situation unless Monty lets you pick the same door he just did.
===
Let's look at the Monty Crawl problem. Initially, it seemed to me that it still should be the same 12:18 times that switching will get you the car. What concerned me is that I could think of a few situations (where Monty picked Door #3) where you'll always win the car by switching.
Drawing out the probability table reveals that switching will get you the car 12:18 possibilities. However, if Monty picks Door #3 (which he'll do 4:18 times), you will 100% of the time by switching. If Monty picks Door #2 (which he'll do 6:18 times), you'll will 2:3 times by switching. But, if Monty picks Door #1 (which he does 8:18 times), switching doesn't give you an advantage. You lose 4 of those times and win 4 of those times.
====
Let's take the two kids where at least one is a boy. Let's give the kids names: One is Chris and one is Sandy.
There are three possibilities:
1). Chris is a girl and Sandy is a boy.
2). Chris is a boy, and Sandy is a girl.
3). Both Chris and Sandy are boys.
Yes, the odds are one out of three that they're both boys. Isn't possibility #1 and possibility #2 the same? If you were either Chris or Sandy, and one of you is a girl and one of you is a boy, would it make a difference to you which is which when you got dressed in the morning?
Still not convinced. Let's play a game where we flip two coins. I pay you if they both land on heads. Otherwise, you pay me. Now, what are the odds that both coins will land on heads. If you think it's still 2:1, I'd like to introduce you to a few investment opportunities.
No: The possibility of each coin landing on heads is 1:2, but when there are two coins, the possibility is 1:4.
1). Heads Heads
2). Tails Heads
3). Heads Tails
4). Tails Tails
If it is any help. Imagine the first coin is a dime, and the second coin is a nickel.
Let's change the game. I still pay out if both coins land on heads. You pay otherwise, but we'll consider it a do over if both coins land on tails. That makes three rows in our probability table:
1). Heads Heads
2). Tails Heads
3). Heads Tails
What is the probability that both coins land on heads? It's one out of three! Now, let Heads = Boy and Tails= Girl. You can see it's the same as before.
====
One more quiz:
There's a game called Chuck-a-Luck (aka Crown and Anchor) that's played on midways. The rules are simple. There are three dice kept in an hour glass cage. The cage is turned over and the three dice are rolled.
You bet on a number 1 to 6, and if that number comes up, you get paid even odds. That is, if you bet a dollar, you win a dollar. (You get two dollars back: The dollar you won, and your initial dollar you bet). That sounds very fair. The possibility of a number coming up on a die is 1:6 times. Since there are three numbers, the possibility must be 3 x 1/6 or 1/2 time. Even odds. Right?
However, the dealer gives a bit of a bonus: If two of the dice land on your number, you get double your money. If all three dice land on your number, you get triple your money! How can you lose?
But, lose you will. What is the actual odds of winning in this game?
David W. on June 22, 2009 7:22 PMBA you are a troll, or an idiot, or both.
Have a nice day :-)
MrT on June 22, 2009 7:23 PMThe psychological side of this question is far more fascinating than the question itself.
It's no wonder casinos are so profitable if (as someone said) 92% of the population get caught up on this type of question.
I've never played poker/blackjack etc for money. But it seems obvious that if you're ever going to be any good at it, you need a very clear understanding of exactly this type of unintuitive answer.
I would also suggest that many good players have an innate understanding of this, ie have never been taught.
AJ on June 22, 2009 7:38 PM@DavidW
Now flip ten million coins and randomly distribute them in sets of various sizes. Can you guarantee that all the sets of 2 results are evenly distributed among all possible combinations?
It's like if you were playing Blackjack. You know the possibility of getting every hand of 2 cards and then base your playing style off of that. But you are neglecting to take in account that cards already played affect the odds of you getting any particular 2 card hand.
Now, if we don't the ratio of girls to boys of non 2 child families, we are not equipped to make assumptions based on the ratio of 2 child families.
BA on June 22, 2009 8:16 PMOk, I see it like this. You pick a door at random, the host offers "Your door, or these other two doors?". Do you switch? According to the game rules, at least one of the two doors contains a goat: you don't have to be surprised by this.
Probabilities are tough. But then who seriously claims truth must be intuitive; does the sun actually rise?
Jim on June 22, 2009 8:44 PM@BA's comment to @DavidW
If you flip 10 million coins and *randomly* distribute them, you can saw with almost certainty the sets of two results are evenly distributed. And, beyond that, all the coins in sets of 1, 3, or more don't actually have any bearing on the sets of 2. In fact, all the other sets of two don't have a bearing on the single set you're looking at. It's an isolated case. Which is explicitly stated in the problem.
What you're neglecting to notice is that it is, essentially, the same as the Monty Hall problem. More specifically, it's the issue associated with switching. Girls represent the door you chose, and Boys represent door left by the Host. If you wanted your guess to be 'right' (that is, guess the gender, or win the car), you'd swap to the opposite gender (door) that you've chosen. Well, 67% of the time, anyway.
Birch on June 22, 2009 8:47 PM@Allen: "Just like a bunch of programmers to go back to basic counting and complicated simulations rather than use an existing, well tested algorithm."
No... because your the programmers here are arguing about how to apply your "well tested algorithm" (or else they don't understand it). In this case it is easier to just flip a coin or count. 60 seconds later you see the error of your ways. It is the people who want to try and prove this through mathematical means and refuse to just test out their own hypothesis that cause this to go on forever.
Create a hypothesis... THEN TEST IT! Don't sit here and tell us over and over again how something is supposed to work when you haven't even taken the time to make sure it works. ;)
Matt on June 22, 2009 8:50 PMon this matter i guess i can consider myself to be lucky
ARK on June 22, 2009 8:57 PM
@Tobermory:
"Monty Fall is the same as Monty Hall once the chance of accidentally revealing the car is gone."
"Intent" was bad choice of words on my part. Since Monty is not a random event generator, but has actual decision-making powers, his actions enhance instead of simply restrict the problem scope.
Lay out the possibilities end to end. It's not hard, there are only nine of them. Here, I'll start it for you:
1 0 0
0 1 0
0 0 1
That's three possibilities, where '1' is the door with the car, and the '0's are the doors with the goats. Assume that you always pick the first one.
That's three possibilities from your perspective. Now, cross-tab that with the three possibilities from Monty's accident perspective, and you have nine scenarios at the end. For the sake of discussion, daw this out as columns going across, where the first column is where Monty hits the first door, the second is where he hits the second door, and the third where he hits the third door. Because all three variables are independent, this is a valid and complete depiction of the problem space (with one of the three variables fixed; technically you could multiply the space by three, with identical setups where you chose the second door each time and then the third door each time but, again, being independent variables fixing one is legal).
100 -- 100 -- 100
010 -- 010 -- 010
001 -- 001 -- 001
Now, we know because the problem says it is so that the end state is such that Monty did not reveal your door nor the door with the car. That means that the entire first column gets eliminated from consideration, as well as the possibility at (2,2) and (3,3) (in both cases Monty would be revealing the car.
X00 -- 1-0 -- 10-
X10 -- 0X0 -- 01-
X01 -- 0-1 -- 00X
This leaves four outcomes:
1. (1,2) Monty reveals Door 2 and the car is behind door 1
2. (1,3) Monty reveals Door 3 and the car is behind door 1
3. (2,3) Monty reveals Door 3 and the car is behind door 2
4. (3,2) Monty reveals Door 2 and the car is behind door 3
50% of the time sticking your guns wins; 50% of the time switching wins. Thus, because the problem space has been reduced, we have a straightforward probabilities calculation.
Another way of thinking about this is this:
In the first starting condition, there's a 33% chance that Monty will mess up the whole scenario. In each of the other two starting conditions, there's a 66% chance that Monty will mess up the whole scenario (either by revealing the door you have already chosen or by revealing the car behind the other doors). This is the crux of it: since Monty has no guidance here, he is more likely to eliminate LOSING scenarios than winning scenarios.
Now, if Monty has INTENT, he is not just randomly reducing possibilities. He will always have two to choose from, and so what we need to look at is the pre-choice solution graph, not the post-choice one (because his choice is not an independent variable). Here, instead of a crosstab matrix, you have a tree.
The pre-choice graph looks, again, like:
100
010
001
The post-choice outcomes map from those starting points as:
100 -- 1-0 OR 10-
010 -- 01-
001 -- 0-1
In the first of the scenarios, sticking to your guns wins (no matter which Monty chooses to reveal). In two of the scenarios, switching to the other closed door wins.
Again, Monty isn't a random dummy here, and has exactly 0% chance of eliminating you in any scenario. Thus, the chance of your original choice selection being "right" remains at 33%, while the new information makes it twice as likely that the non-revealed other door is the right one.
Does that make more sense to you?
The fact that Monty can choose either of two outcomes in the first case does not make that case twice as likely to happen. Imagine giving Monty additional choices like opening the door with his left hand or right hand but only when you've picked the wrong door to start; these also would not make those possible outcomes any more likely.
Again, really: these problems are well-known and documented. If you think everyone has the Monty Hall or Monty Fall problems wrong, and you're not a professional statistician, it's like telling the world you know quantum mechanics better than Stephen Hawking. That's the realm of the crank.
I read your post in my blog reader, and this description of the problem is _very_ misleading.
"""It appears to be a pretty silly question. Two doors are available -- open one and you win; open the other and you lose -- so it seems self-evident that whether you change your choice or not, your chances of winning are 50/50. What could be simpler? The thing is, Marilyn said in her column that it is better to switch."""
When I see the problem, it is the classical Monty Hall _three_ doors, and you do a switch. Your description makes it sound like you have two doors to choose from, you choose, and then without any additional information, you switch your choice.
Like I said, your quick description is IMHo a very misleading description of the scenario.
BTW, this has made it into popular culture, being used in the movie "21" as a class exercise.
dpc on June 22, 2009 9:05 PMA widely read blogger has run out of useful and relevant material (a long time ago) but he must maintain some readership so that his ad revenues keep flowing. He looks into his bag of tricks to select topics that generate lots of traffic.
What is the probability that he will choose one of the following topics:
- NP complete
- Doors and goats
- Overclocking
- Developer workspaces
@BA:
"By concluding that all combinations of of boy and girl are equally likely you are making a statistical fallacy in assuming that a randomly selected subset has the same properties as the superset."
Umm, no. By concluding that the PROBABILITY of an outcome in a small sample is equal to the outcome in a large sample you are assuming that there is no small-sample bias. This is not a statistical fallacy, but instead the underlying assumption in most statistic-based calculations.
The question was not, at all, "What is the gender of the other child?". It was: what is the probability that the other child is a boy.
To run into your issue, we'd have had to state that there are four families each with two kids. Family 1 has two girls; family 2 has a boy and a girl; family 3 has two boys; family 4 has what? And then answer "a boy and a girl"with no margin of error. THAT would be a subset-superset fallacy, or more precisely, a failure to keep account of statistical error.
More interestingly, though, you do have a point on family size. Consider the social impacts of a male-dominant society crossed with a small-family-size inclination. If the main goal of having children was to have a boy to "carry on the family name", a lot of families would stop after their first boy was born. Thus, a large portion (we'll say all just to deal in round numbers) of the families with 2 children had a girl first, which means that the likelihood of having two girls is 50%. This type of information completely changes the problem space by reducing the possible outcomes.
Tom Dibble on June 22, 2009 9:25 PMIf you choose a goat on your first guess,
the host can't open your door,
so he has to pick the other wrong choice.
Therefore, the remaining door has a more likely chance
of being the car. (THE HOST ONLY HAS 1 CHOICE)
If you choose a car on your first guess,
the host can pick either of the two
wrong choices (THE HOST HAS 2 CHOICES)
"One more quiz:
There's a game called Chuck-a-Luck (aka Crown and Anchor) that's played on midways. The rules are simple. There are three dice kept in an hour glass cage. The cage is turned over and the three dice are rolled.
You bet on a number 1 to 6, and if that number comes up, you get paid even odds. That is, if you bet a dollar, you win a dollar. (You get two dollars back: The dollar you won, and your initial dollar you bet). That sounds very fair. The possibility of a number coming up on a die is 1:6 times. Since there are three numbers, the possibility must be 3 x 1/6 or 1/2 time. Even odds. Right?
However, the dealer gives a bit of a bonus: If two of the dice land on your number, you get double your money. If all three dice land on your number, you get triple your money! How can you lose?
But, lose you will. What is the actual odds of winning in this game?"
Interesting case. I'm not going to run down the full set of probabilities, but the trick of the game is in the double- and triple-roll dice.
Imagine a $1 bet on each of the sides. If all three come up differently, the banker pays back $6 and takes in $6. If all three come up on $1 the lucky sod who bet there gets $4 back (his original plus three payouts) while taking in $6 as always.
So, take the likelihoods of 2 dice coming up the same and the likelihood of all three dice coming up the same and compare those to the likelihood of all three being different and you have the deviation from "even".
You could look at the same game with 2 4-sided dice or 4 8-sided dice and plot the unfavorability of it ... Obviously 1 die/2-sides and you're at a coin toss (which is an even game), so I'd guess the favorability to house would steadily increase with the number of die and sides.
Tom Dibble on June 22, 2009 9:51 PMChoice Prize Reveal Should Switch?
1 1 2 No
1 1 3 No
1 2 3 Yes
1 3 2 Yes
2 1 3 Yes
2 2 1 No
2 2 3 No
2 3 1 Yes
3 1 2 Yes
3 2 1 Yes
3 3 1 No
3 3 2 No
I keep looking, and it still looks like 50-50 to me.
@Stephen Oberholtzer + 1
@Robert B + 1
Switching the door increases the possibility, tested with a simulation code.
I find it easier explaining to people with an example of 10 (or 100) doors.
Say you pick the first. 1/10 of the cases you are right, 9/10 you are wrong.
Now the host cancells doors 2-9. 1/10 you were right before, 9/10 - the car is behind door #10.
Much easier for people to grasp.
A D&D d10 or d20 can also help do the trick.
For more insight listen/view the TED talk by Dan Ariely "Are we in control of our own decisions", available on the TED website.
Tathagata on June 22, 2009 11:19 PMSheesh.
Please stop posting nonsense unless you have a mathematical proof backed up by some rigorous computer modelling.
Go read some beginner statistical analysis and come back in a year.
http://mathforum.org/library/drmath/sets/select/dm_coin_tossing.html
Frogger on June 22, 2009 11:25 PMOne thing that's really annoying is that everyone insists that what Monty "meant" to do makes some kind of difference. It doesn't - if you find yourself in that situation - you picked a door, another is opened that doesn't contain the prize, do you want to change? - then the probability of you having picked the right door initially is no different whether Monty meant to open the door with no prize or not.
Hence, the "Monty Fall" problem has no change in outcome.
Zelda on June 23, 2009 1:43 AMTwo things:
One. Jeff's statement of the problem is fine: "the host, who knows what's behind all the doors, opens one of the unchosen doors, which reveals a goat". It's not relevant whether he opened it randomly or not. All that's important is that on this occasion, he reveals a goat.
Two. Monty's motivation - whether he wants to help or hinder - is not relevant either (unless he has the option to not offer you the switch!). He opens one of two doors. If he reveals a goat, you're better off switching. If he were to pick randomly, and revealed a car, then you're DEFINITELY better off switching!
John H on June 23, 2009 1:47 AMOK, forget my last comment. I just wrote myself a simulation and it proved me wrong. I'm surprised by this result - need to go away and think about it for a while!
Zelda on June 23, 2009 2:15 AMWhen you make your initial choice, there is a 2/3 chance you are wrong. After the gameshow host shows you a wrong door, there is still a 2/3 chance you chose the wrong door, so switching gives you the 2/3 instead of the 1/3 chance you had with your original choice.
richyrich on June 23, 2009 3:21 AM
Trying to calculate probabilities directly for these sorts of problems is where pretty much all of us go wrong. The only way for (most of) us to be sure we have the right answer is to work through all the possible scenarios, then divide the number of desired results by the number of scenarios.
It's the one thing I do remember from all those probabilities subjects at uni.
Jim Cooper on June 23, 2009 3:50 AM@Confuse-us on June 22, 2009 10:41 PM
The options you list are not all equally likely, which is why you appear to be getting 50%.
The two options listed when you pick the right door are each only half as likely as the option when you pick the wrong door.
If you collapse the options so that each row is equally likely, you get:
Choice Prize Reveal Should Switch?
1 1 (2 or 3) No
1 2 3 Yes
1 3 2 Yes
2 1 3 Yes
2 2 (1 or 3) No
2 3 1 Yes
3 1 2 Yes
3 2 1 Yes
3 3 (1 or 2) No
This gives you the correct odds of success.
Pete on June 23, 2009 3:59 AMEveryone here seems to be making a massive assumption - that the car is a better prize than a goat.
;-)
Given that the choice and prize doors are 100% random, the revealed door must have modified chances to prevent the invalid case of revealing the prize door. It seems all "proof" simulations chose this method. This all feels to me like a silly word puzzle where reality somehow has no practical use, anybody care to disagree?
Confuse-us on June 23, 2009 4:23 AMSorry, could not resist, another version, this time in C#:
(based on the c-version of ant in the comments before)
using System;
class Program
{
static void Main()
{
const int iterations = 1000000;
const int NumberOfDoors = 3;
TestLoop(iterations, NumberOfDoors, false);
TestLoop(iterations, NumberOfDoors, true);
Console.WriteLine("(press a key to exit)");
Console.ReadKey();
}
static void TestLoop(int iterations, int NumberOfDoors, bool DoChange)
{
int wins = 0;
for (int i = 0; i
/// Monty Hall Simulation
///
/// Shall the player change door or not?
/// Number of doors total (only one is shown as wrong/goat)
/// has the player chosen right?
static bool Play(bool DoChange, int NumberOfDoors)
{
// Reset doors (each row is automatically initialized to "false" in C#)
bool[] doors = new bool[NumberOfDoors];
// Place the car behind a random door
doors[rand() % NumberOfDoors] = true;
// Choose a door for the player
int playerChoice = rand() % NumberOfDoors;
// Choose a door for the host that is not the player's door
// and does not contain the car
int hostChoice = -1;
while (true)
{
hostChoice = rand() % NumberOfDoors;
if ((hostChoice != playerChoice)
&& (doors[hostChoice] == false))
{
break;
}
}
int newChoice = -1;
if (DoChange)
{
// Switch player choice to a new door
for (int j = 0; j < doors.Length; j++)
{
if (j != playerChoice
&& j != hostChoice)
{
newChoice = j;
break;
}
}
}
else
{
newChoice = playerChoice; // do not change door
}
// just to be sure
if (newChoice == -1 || hostChoice == -1)
{
throw new ApplicationException("invalid choice, error!");
}
// Did we get the right door?
return doors[newChoice];
}
static Random moRand = new System.Random();
static int rand()
{
return moRand.Next();
}
}
What a dammned' comment-system:
It fails on less-than and greater-than-signs, what a pity and how unworthy.
Dear Steve, please update, that's so 2001 ...
C. Wissing on June 23, 2009 5:07 AM" I just wrote myself a simulation and it proved me wrong. I'm surprised by this result..."
That's what we've been saying all along. Just go simulate it people! Stop with the hypothesis and just go stinking simluate it! You don't have to write a program. Use coins, cards, your fingers or whatever. It takes two minutes, literally. It takes less time to run through a simple test than it does to keep rambling on and on here.
**********************************************************************
Listen people! Do us all a favor before posting: SIMULATE IT!
**********************************************************************
@LintMan, @Tom Dibble
Thanks for the clarifications on the Unfinished Game/Nosy Neighbour puzzles. Re-phrasing Jeff's question has cleared things up for me.
Ian.
Ian on June 23, 2009 5:43 AMTrying to explain this using only 3 doors is futile, it's utterly counterintuitive. The conceptual problem is that Monty isn't opening ONE door, he's opening ALL the doors that you didn't pick, minus 1. It's just that when there's only 3 doors, that means he only opens one door. If there's 1,000 doors, he opens 998 of them. In more detail:
Monty shows you 1,000 doors. You pick door 1. He opens doors 3 through 1000, revealing all goats. Now only doors 1 and 2 are closed.
What are the odds you happened to pick the car? (1 in 1000.) Since Monty knows where the car is, you have a 999/1000 chance of getting the car if you switch, and a 1 in 1000 chance if you stay.
Now extrapolate down to 1 in 100, 1 in 10, 1 in 5, 1 in 3, and it all makes sense.
dirtside on June 23, 2009 6:36 AM"Listen people! Do us all a favor before posting: SIMULATE IT!"
The thing I was simulating was the thing about "discarding cases" where the host picked the door. I already knew about (or "believed") the 66%, I just thought it wouldn't matter whether he knew what was behind the door or not.
I still can't reconcile the two. Putting myself in the game: I picked door 1. Monty opened door 2. It didn't have the prize. As far as I can see, there are two possible things that have happened:
1. I picked the right door, and Monty has shown me one of the wrong ones (66%)
2. I picked the wrong door, Monty has shown me the other wrong one. (33%)
But I'm missing something, aren't I? Because actually, there's something in point 1 to do with the fact that Monty *could* have shown me the car, by accident (if we're allowing that).
Can anyone help me understand it?
Zelda on June 23, 2009 6:41 AM@Zelda & Matt
Empiricism, best way to deal with illusion brought forth by language usage with which we unintentionally fool ourselves.
I think a better rephrase of the question should be: Assuming that one should switch if suppose there's higher chance of not guessing correctly which door the car is behind,and there are three doors in total while there's only a car,should u switch side once one of the doors which is not your 1st choice and does not have the car u sought for? In retrospect what's the possibility that one would choose the correct door in the 1st place?
The goat thingie IMO is just a strawman,goat or no goat the whole thing is that if the participant has chosen the wrong one from the start, the switch to the another door left unopened would certainly won him/her the car.
Or that the unadventurous ones could take the goat as consolation?;-b
@Confuse-us:
Why dont you try it out on your friends or relatives? Dont have to be computer simulation or do the whole Python Hall, but perhaps simple things like guessing which cup has the ball in it. Since the reason behind switching is that people are more likely to guess the wrong than right one the first time, all u need to do is to do statistics for one time guessing. Due to Law of Large number,remember to take huge amount of statistical records like hundreds of them.
This way it is much better than all those smack talks that all these arent "realistic". Heck, even those who have done computer simulations are above those who only talk the talk. Remember, empiricism.
liuzg150181 on June 23, 2009 6:51 AMBah!
You know what? There was a bug in my simulation - it was only playing a game with two doors! So it turns out it *doesn't* matter if Monty knows what's behind the door, so long as you throw away situations in which he accidentally reveals the car.
Thank heavens for that.
Zelda on June 23, 2009 7:03 AM@Zelda
Due to latency,I just posted before ur last post, actually think of it it is quite simple: You only need to change if ur first choice is wrong,but what's the chance u would get it right(1/3 I assume) vs wrong(2/3 I assume)?
I reckon the PDF's position on Monty Fall is wrong.
When the host opens the door, he is providing you with new information. It doesn't matter how he came by that information, whether he knew in the first place, or whether he's just found out by accident.
It bothers me, because the PDF appears quite learned, but it seems to reveal the author hasn't understood the Monty Hall problem in the first place.
John H on June 23, 2009 7:14 AMPeople who don't get this have "tunnel vision" and can't get past thinking "2 doors" => "50/50 chance". The thing is this ignores important extra information. You need to think of the probability of the outcome of a sequence of events: event 1 is picking 1 door out of three. event 2 is switching (or not). events 1 and 2 are not independent events. I think many similar problems try to trick you by giving extra info that is not necessary. These types of problems train you to ignore the extra stuff. But in this case the extra stuff matters.
DMR on June 23, 2009 7:21 AMI *already knew* about the 2/3 probability thing. I never disputed that. What I'm disputing is people are saying those are only the odds if Monty *knows* what's behind the doors. I've now run a simulation in which he *doesn't* know, and, if he opens a door without the prize, you're still better off switching. So, Monty Fall: yes, you'd still better switch.
As for Monty Crawl - well, if you knew he was going to crawl, then you could always pick door 3. If he then opens door 2, you know it was behind door 1. If you pick 2, then he picks 3, the same thing applies, and you know it's behind 1. There's not really enough info to do a simulation of this. Do you know he's tired?
Zelda on June 23, 2009 7:23 AM@zelda
Sorry, too many posts to keep track of,that I lost track of discussions, though it seems that the Monty Hall & Fall have been resolved.
@moya
I wrote in my post that Monty Hall was not the same as Deal or No Deal (DoND). What I tried to say was the *only* common thread between Monty Hall and DoND is the idea that your initial choice will be wrong the majority of the time.
By the way, you really think DoND is 50/50 at the end (assuming $1 million is still in play)? Run a simulation. Or, just watch the show. I use to watch that show a lot. Howie Mandell always reveals the person's suitcase. It seemed to me about 1 in 30 actually initially picked the $1 million dollar suitcase. I know, not a precise measurement. But hopefully you get the idea.
Nicholas on June 23, 2009 7:48 AM@ those who still thinks it is still 50/50 for Monty Hall problem:
Just ran a test myself using 3 identical name cards: one with my marking, others w/o. I shuffled them around and picked one to my fancy, and here's the result:
Total times tried:70
Wrong:48
Right:22
This says something about the accuracy of your first choice.
@zelda: that's because you are not counting the cases where the host accidentally reveals the car.
Generally, the reason the outcome changes is because the host inserts knowledge into the problem. People who think that the outcome is 50/50 think that the act of the host doesn't change anything, but it gives you extra knowledge.
Frederik on June 23, 2009 8:03 AM@frederik - the cases where the host accidentally reveals the car /should/ be discarded, because the problem states that this does not happen.
"In this variant, once you have selected one of the three doors,
the host slips on a banana peel and accidentally pushes open another door, which just happens not to contain the car."
This makes sense if you shift out of theory and into practicalities - presumably if this were to happen during a TV show, either the whole game would be abandoned, or you'd be allowed to choose the door which you now know to contain the car!
John H on June 23, 2009 8:11 AMZelda - in the original Monty Hall, the usually unstated assumptions are that:
1) the host *knows* where the car really is
2) will *always* reveal a goat behind an unchosen box
3) will *always* allow you to switch.
If you change these assumptions (such as for "Monty Fall"), the resulting odds can/will change.
The critical (but unintuitive) piece that separates "Monty Hall" from "Monty Fall" is that in "Hall", the host is acting on known information, not random chance like he is in "Fall".
In both Hall/Fall, your original chance of guessing correctly was 1/3, with a 2/3 chance it was in "one of the other two boxes".
But in "Hall", the host *always* eliminates a bad choice from "one of the other two boxes", which since there were only 2 boxes to begin with, now means that there is a 2/3 chance it is in "one of the other *ONE* box". Before the host acted, for you, each box had a 1/3 chance, and there were 2 boxes you didn't pick (so odds are 2/3 that the unpicked *set* contains the car). Then the host uses his special knowledge to reduce the number of choices in the unpicked set, but the probablity the unpicket *set* contains the car remains the same: 2/3.
On the other hand, with "Fall", the host randomly reveals a box. This is equivalent to if a second player was allowed to pick a box, and then his box was shown to have a goat: you have no *new* knowledge special to the unpicked box. When the second player is picking, there are 2 boxes left, and as before, there is a 2/3 chance one of them has the car. Then the second player chooses one of the two, so his odds of getting the car are 50% of 2/3, or 1/3. And the odds the remaining unselected box has the car are 1/3. Now, when the second player's box is opened and the goat is revealed, we know that one of the remaining two much have the car. The new odds remain proportional to the old odds: 1/3 each for player 1 and the unselected box, so the new odds are 50% each. You still don't know anything about the unpicked box.
----------------------
As an aside to all this, I once read a brief interview with the real Monty Hall asking *him* about this problem. His response was interesting: basically, he said he wasn't required to offer the switch, and he usually offered it more when the player *did* pick the correct box, to trick them into losing.
LintMan on June 23, 2009 8:11 AM@Confuse-us Listen to http://www.ted.com/talks/lang/eng/peter_donnelly_shows_how_stats_fool_juries.html . The Monty Hall problem is just a great example of how bad humans are at statistics. Our faults in statistics aren't limited to pretend questions about cars.
@Zelda The different between Monty Hall and Monty Fall is in the events.
(In the below I'm always assuming you pick door 1, it doesn't change the odds just makes the explanation easier).
In Monty Hall [Prize 1, Open 2] and [Prize 1, Open 3] are each 1/2 as likely as [Prize 2, Open 3] and [Prize 3, Open 2]. People have shown why before but basically it comes down to [Prize 2, Open 2] and [Prize 3, Open 3] being consciously turned into [Prize 2, Open 3] and [Prize 3, Open 3].
In the Monty Fall problem this transformation is not happening. [Prize 2, Open 2] is equally as likely as [Prize 2, Open 3]. Just because it didn't happen doesn't mean that it couldn't have happened.
So our potential states, all of equal odds are:
[Prize 1, Open 2]
[Prize 1, Open 3]
[Prize 2, Open 2] X
[Prize 2, Open 3]
[Prize 3, Open 2]
[Prize 3, Open 3] X
Now we know that the two states marked with X didn't happen. The remaining four states gives us a 50/50 shot at having the prize stay or switch.
Now compare to Monty Hall...
[Prize 1, Open 2]
[Prize 1, Open 3]
[Prize 2, Open 2] -> [Prize 2, Open 3]
[Prize 2, Open 3]
[Prize 3, Open 2]
[Prize 3, Open 3] -> [Prize 3, Open 2]
We're not dealing with an even distribution of probability. [Prize 2, Open 3] is twice as likely because Monty is forced to Open 3 if the prize is behind 2. I've represented that here by showing the transformation arrow from the case when monty would have made the 50/50 chance to open door 2 but then has to open door 3 instead in order to not reveal the prize.
Logo on June 23, 2009 8:15 AMZelda -- I question the terms of your simulation of the Monty Fall scenario. You need to completely discard the cases where he falls and opens the door with the car; if those cases are being considered as a probability anywhere, then you're doing it wrong.
These six scenarios are equally likely (assume you pick door #1, and the host does not knock it open:
a: You picked the car, the host knocks open door #2
b: You picked the car, the host knocks open door #3
c: The car is behind door #2, the host knocks open door #2
d: The car is behind door #2, the host knocks open door #3
e: The car is behind door #3, the host knocks open door #2
f: The car is behind door #3, the host knocks open door #3
Eliminating possibilities c and f (because they did not happen!) leaves four choices, each equally likely.
Similarly, consider this problem: I rolled a normal six sided die. I did not get a 5 or a 6. What is the probability that I got a 4?
(In the Monty Hall problem, d and e are NOT equally probable with a and b, but d=e=(a+b) -- hence the advice to switch doors.)
-- Simulationwise, roll 3 3-sided dice. (One for the placement of the Car (C), one for your pick(P), one for the door that Monty opens (M).)
if M = C or M = P, abort and do not add to ANY totals. (Monty opened your door or the door with the car, which did not happen)... Then compare the totals of C=P to C!=P. They should be roughly even.
If we want to run the 1-million door scenario that someone mentioned, I'd invert the M roll to mean the door that Monty DIDN'T open that isn't yours. Roll 3 1-million sided dice. If M=P or M!=C, discard. Again compare totals for C=P to C!=P. Again, they should be roughly even. (Although the count of discarded rolls will be enormous.)
These do NOT model the Monty Hall problem, which as mentioned before will give you a n-1/n chance of winning while switching, where n is the number of doors.
Trevel on June 23, 2009 8:18 AM@SanDiego - The Let's Make a Deal game show was fairly entertaining, as Monty Hall was a top-notch con artist. His mission was, of course, to limit the amount of stuff people would win, while still making it seem possible to win, and people would occasionally win the big prizes, but more often than not, they would make the wrong decisions. A lot of times, Monty would offer the person $100 to walk away instead of opening the door to reveal their prize, and he was an expert in reading people and predicting how they would react to the offer. There are interviews you can read where he describes how he treated people. Contestants on the show would wear costumes, sometimes quite outlandish, and they were in a very artificial and "Monty-controlled" environment from the start, so it was pretty easy for him to manipulate people. Sometimes people would win the cars and boats and stuff, but not very often. BTW, Howie Mandel uses similar techniques on Deal or No Deal, in order to get people to continue playing, even when they have been given a "bank offer" that exceeds the "current expected value" of the game - this fairly often leads them to eliminate high value boxes and reduce the expected value and the subsequent bank offers. It is all very interesting, but more from a psychology standpoint than a mathematical one.
Jasmine on June 23, 2009 8:33 AM@Jasime and it seems like they pick people who don't really understand odds to help with the manipulation. Though maybe the people do understand odds but crack under the pressure and manipulation. Either way it'd be fun to act all bubbly and personable before getting on the show then showing up and turning on the poker face and the statistical mind that should accompany it.
Logo on June 23, 2009 8:37 AM@John H - If you eliminate the possibility that the host can pick the box with the car, you have basically changed Monty Fall into Monty Hall. There is no difference - either way the host can *never* select the box with the car! In Monty Fall as described, it was a possibilty that just didn't happen. That matters.
LintMan on June 23, 2009 8:37 AM"I think what they're really objecting to is how unintuitive the answer is."
Six months later, and you are still flaunting your deliberate ignorance? Impressive.
As for the Monty Haul problems, at this point in my life I'm less disappointed by folks who get the answers wrong, than I am in the fact that we still don't have any new explanations for the correct solution. These discussions always seem to devolve into a series of dialogs from Garrett Morris. It sure would be nice to see something new.
VoiceOfUnreason on June 23, 2009 8:49 AM@Logo, that is what I would do... play the game based on expected value, but they would never pick me for the show. I have tried to get on a few game shows, and my personality isn't "fun" enough - that's what they told me at Wheel of Fortune... they want people who will jump up and down and giggle a lot.
Jasmine on June 23, 2009 8:49 AM@Trevel - there was another bug in the simulation. I was allowing the host to sometimes pick the same door as the contestant! Now I get 50/50 again.
What I don't understand is this. If I am playing the game, and I am asked "do you want to switch?", then what we're saying is I haven't got enough information, until I find out whether he *meant* to open a non-prize door. Is that right? Seems weird. I mean, in the 1000-door scenario, if he were to slip and accidentally open 998 doors, leaving mine and one other, is it really still 50/50? Surely after all those doors are opening my original door still has a 1/1000 chance of being corrent?
Zelda on June 23, 2009 8:49 AMActually after thinking about it for a while, my own 1/1000 example has clarified it for me. 50/50 it is.
Zelda on June 23, 2009 8:53 AMActually thinking about it, 50/50 does make sense to me in the Fall scenario now. Thanks for helping me hash it out!
Zelda on June 23, 2009 8:54 AM@Zelda
Your original door has a 1/1000 chance of being correct, yes. But the other door ALSO has a 1/1000 chance of being correct -- you're swapping 0.1% odds for 0.1% odds, which are even. In the Hall scenario, you're essentially swapping for whichever of the other n-1 doors is best, which means you're going from 1/n to n-1/n, which is an advantage; in the Monty Fall scenario, you're going from 1/n to 1/n, which are equal.
That said, as long as you know he's not offering it maliciously (as he did in actuality, specifically offering when they already picked the car), switching is always the better choice. After all, if the worst case is an even swap -- why not?
Trevel on June 23, 2009 9:00 AMMy initial analysis didn't take into probabilities at all. Not understanding that this was the rules of the gameshow, I thought the guy already knew I had picked the car and so was trying to trick me.
Anonymous on June 23, 2009 9:01 AMI just keep drawing parallels to the energy generated in these comments to that generated on software opinions (especially age-old ones) such as "sprocs vs. orm", "ddd", "test first", various pattern ideas, design concepts... many backed by a lot of reason and "proofs" in several different directions.
Being able to write this math debate off really relaxes me about chasing down opinionated blogs, ideas, and other blather. Nice.
Jefferson Taylor on June 23, 2009 9:10 AMThe way that I finally came to understand this is the following game:
Suppose there are 100 doors - 99 hide a goat, 1 hides a fancy pants car. The game show contestant chooses the game, and then the game show host opens 98 doors, revealing goats. Now, the host picks you, the humble reader, and asks you to guess who has the right door. Who do you guess? One of the two doors is right. 1 out of 100 times, the game show contestant will have picked the right door. If the game show contestant doesn't pick the right door, however, that means that the game show host has picked the correct door - which happens 1 - 1/100 = 99/100 times.
Once you wrap your head around this guy, the three door case makes sense.
Martin on June 23, 2009 9:42 AM@LintMan:
"If you eliminate the possibility that the host can pick the box with the car, you have basically changed Monty Fall into Monty Hall. There is no difference - either way the host can *never* select the box with the car! "
This is true, except that I didn't change anything. In Monty Fall as described, the host *does* reveal a goat. The question posed is - host stumbles, accidentally reveals a goat, now do you switch or not?
It *is* exactly equivalent to Monty Hall.
"In Monty Fall as described, it was a possibilty that just didn't happen. That matters."
That would be true if the switch/no switch decision has to be made before he stumbles. But that's not what was described.
John H on June 23, 2009 9:42 AMThe real answer is that there is not car, only goats. It's all a scam. Rigged!
Anonymous on June 23, 2009 9:44 AMYou have one prize and two doors. Clearly 50/50 chance to win.
I will now add another door which does not have prize.
Are you chances of winning 1 in 3?
I now give you the opportunity to change your choice, but NOT to the new door. You have a 1 in 2 choice, but I will measure your probability as if it were 1 in 3.
-------
If I change the problem by adding information why should I expect the probability to remain the same as the original problem?
If he had accidentally fallen through the door with the car, am I allowed to now choose that one? Does it matter whether the door with the car he fell through was already the one I had chosen first?
Gary on June 23, 2009 9:58 AMThink about it like this:
You pick door 1. The chance is 1/3 that the car is behind door 1, and chance is 2/3 the car is behind door 2 or 3. The host removes door 3. The chance that the car is behind door 2 or 3 is still 2/3. But door 3 is removed. So the chance that the car is behind door 2 is 2/3.
alwin on June 23, 2009 9:59 AM@alwin
That explanation makes Monty Hall and Monty Fall the same, which everyone is disputing.
Gary on June 23, 2009 10:10 AMJeff,
So let me get this straight, all I gotta do is quote other people and that allows me to make money out of useless blog posts?
Joe on June 23, 2009 10:27 AM@Gary
My explanation is only for understanding Monty Hall, which is difficult enough for many people... It wasn't a reply to you.
For a long time, the only thing I *did* understand about Monty Hall was that the host knows where the car is, and that he intentionally removes a door without the car.
alwin on June 23, 2009 10:45 AMJC - thanks, I get it now.
ronnie on June 23, 2009 10:58 AMThese are ill-posed questions, and the answers are unintuitive only because they give you information but don't indicate whether you're supposed to use it or not.
If I get back a positive cancer test result, I'm immediately put into a different group than someone who hasn't had a test yet. I'm going to get my affairs in order. It means that now I have an 80% chance of having cancer. Ignoring what the test result tells you is nonsense.
Monty could be evil, angelic, stupid, smart, tired, completely random, whatever. It's not always 2/3rds in favor of switching. You have one example of the sample space and try to make a generalization.
Enough already! Talk about Swoopo some more.
Fine. Make it a well defined question:
Suppose the contestants on a game show are given the choice of three doors: behind one door is a car; behind the others, goats. After a contestant picks a door, the host, who knows what's behind all the doors, *must always* open one of the unchosen doors, which will always contain a goat. He then asks the contestant, "Do you want to switch doors?"
Tim on June 23, 2009 11:02 AMCan we have another post about something interesting? Like stack overflow statistics or something?
Practicality on June 23, 2009 11:18 AMIt really doesn't fail Monty Fall. The problem there is that the host had an equal chance of opening the car door, whether or not it was your door, too. If you picked the car the first time, he has a 2/3 chance of doing that. If you didn't pick the car, then he has a 1/3 chance of doing that. Thus, the fact that he accidentally managed to open a goat door and therefore did NOT ruin the game adds even more information to the player, telling him that he's more likely to have the right door picked in exactly the same proportion as he was unlikely to get it right in the first place.
The two probability events cancel out perfectly, and you end up with a 50/50 chance. The "switch chooses all other doors" rationale does not break down here.
@Gary on June 23, 2009 12:05 PMIt's really a mathematical sleight of hand. If you have 3 choices, and choose one that is wrong, are then offered a new chance, it is really BOTH answers that are correct.
case 1. you have a 2/3rds chance of winning because the 1/3 "losing" choice has been eliminated. switching makes sense.
case 2. you NOW have a 50/50 chance of winning. It is physically and mathematically impossible for it not to be 50/50. however....
if your first choice lost, of course you have better odds of winning by switching. why would you keep the losing choice? here is where the 2/3rds comes in.
Most things in probability or statistics are "provable bullshit". It works, but does not make sense to the brain because the rules are ambiguous, chaotic, or random, and often have several answers depending on context. No wonder most people avoid maths. They suck.
El Guapo on June 23, 2009 12:13 PMI wrote up a little Monty Hall computer simulator in C# back in September 2008, which empirically shows the benefits of switching doors:
http://scottonwriting.net/sowblog/posts/13534.aspx
Although, to me, the most clear explanation is drawing out the probability tree and summing up the probabilities:
http://en.wikipedia.org/wiki/File:Monty_tree_door1.svg
Your odds DO NOT IMPROVE.
Here is the proof along with a C# program. Source and exe.
http://picklepumpers.com/wordpress/?p=130
Pickle Pumpers on June 23, 2009 1:19 PMAnd please stop drawing that flawed chart.
When people use that chart they are saying, "When we get to state 3 the host gets into his time machine and changes his choice to door 3."
Sorry, no time machines are allowed. Once he picks door 3 it no long exists.
Pickle Pumpers on June 23, 2009 1:23 PM
When people use that chart they are saying, "When we get to state 3 the host gets into his time machine and changes his choice to door TWO from door 3."
Monty motivation's could actually make a difference if, sometimes, he chooses NOT to open ANY door... Which means that he could then choose to open a door only when you chose the car or with some algorithm that can guarantee that whenever you pick the car, switching won't be for good.
philibert on June 23, 2009 1:56 PM@Logo,
A test for a disease is 99% accurate, 1/10,000 people have the disease. You are chosen randomly to be tested for the disease and you test positive. What's the probability that you have the disease?
From this example, it must be assumed that the test is 99% accurate whether you have the disease or not. If you have the disease, then the test will come back positive 99% of the time and 1% of the time it will come back with a false negative. So with 1 million people ~100 people will be expected to have the disease. Of those 100 who have the disease 99 will come back positive {and correctly} that they have the disease, 1 will come back negative {a false negative} indicating that they don't have the disease.
If you don't have the disease, then the test will come back negative 99% of the time and positive 1% of the time it will come back with a false positive. So with 1 million people ~999,900 will be expected to not have the disease. Of those 999,900 who don't have the disease 989,901 will come back negative {and correctly} that they don't have the disease, 9999 will come back positive {a false positive} indicating that they have the disease.
With these numbers, it is clear that if the test comes back positive you have less than a one percent chance that you have the disease, only a ~0.98% chance that you have the disease (99 / (9999 + 99) = (people who have disease / (people who test positive, both correctly and incorrectly). If the test comes back negative it is almost assured that you don't have it, ~99.9999%. Of course if you didn't take the test, your odds of not having it were already relatively low, 99.99%.
I believe a question similar to this was posed to breast cancer doctors in regard to mamograms that have a fairly high false positive rate compared to the rate of breast cancer. Unfortunately, almost all the doctors couldn't figure out that the rate of false positives greatly outnumbered the number of correctly identified postitives. This lead many of the doctors to scare their patients into believing that they might have cancer even though they most likely didn't have it {I believe this is also why tumor samples are taken which are much more accurate}.
MostGetItWrong on June 23, 2009 2:05 PM@philibert: Monty does not have a choice. In fact forget about Monty.
Monty HAS to open a door. It's a valid idea you have but it's really just a problem with the question. Take all human choice out of it.
I just had a discussion with one of those smart people that think changing improves the odds and he was making the mistake of multiplying odds from the previous state. That's fine if you are asking a different question but the question is, will changing your choice NOW make a difference?
Nope. The number of doors Monty reviles is irrelevant. The point is he ALWAYS comes down to two doors. One has a car, one doesn't.
@philibert: Monty does not have a choice. In fact forget about Monty.
Monty HAS to open a door. It's a valid idea you have but it's really just a problem with the question. Take all human choice out of it.
I just had a discussion with one of those smart people that think changing improves the odds and he was making the mistake of multiplying odds from the previous state. That's fine if you are asking a different question but the question is, will changing your choice NOW make a difference?
Nope. The number of doors Monty reviles is irrelevant. The point is he ALWAYS comes down to two doors. One has a car, one doesn't.
@MostGetItWrong
Yeah that is the correct solution and good job writing out the explanation.
Logo on June 23, 2009 2:33 PM@Pickle Pumpers
So basically what you're saying is that as long as you take out the part that makes the chances of a switch being better correct, it's not correct.
Interesting logic. I'd like to subscribe to your newsletter.
PR on June 23, 2009 2:37 PM@Pickle Pumpers
There is a huge gap between saying that something DID not occur (Monty Fall) and COULD not occur (Monty Hall). You talk of the host picking the door with the car and then, with a time machine, changing his choice. We say that could never have happened, because the host ALREADY knows what is behind each door. If the car is behind door #3 and we choose door #1, the host KNOWS and always opens door #2. ALWAYS. There's no time machine involved -- why would he need one? He already KNOWS what is behind that door.
Similarly, if the car is behind door #2, the host ALWAYS opens door #3. If the car is behind door #1, we don't care WHAT the host opens, because it's going to be the same scenario either way: He'll pick a goat and the remaining door also has a goat.
To put it another way -- the host is giving you the choice between what you initially picked and the best of all the other doors. Take the switch.
Trevel on June 23, 2009 3:27 PMI liked Benny Hill better. He was hilarious.
david on June 23, 2009 3:58 PMI didn't read all the comments, but has anyone tried it this way? What if you are allowed to pick two doors to start. Monty shows you a goat behind one of the doors you picked. If you switched to the other door, wouldn't your odd of picking the car go down? So, when you pick one door and he shows you one with the goat, by switching, you are now picking two doors.
Joseph on June 23, 2009 5:25 PMIdon'tGetItIdon'tGetItIdon'tGetIt!
I'm not a crack probabilist, but I'm smart enough to mistrust my intuition and reasoning on these questions, so I actually ran some code (don't laugh, perl guys!):
Monty Hall:
#! /usr/bin/perl -w
use strict;
my ($i, $prize, $door, $open, $win_switch, $win_keep);
for ($i = 0; $i < 500; $i++) {
$prize=int(rand(3));
$door=int(rand(3));
do {$open=int(rand(3))} while ($open == $door || $open == $prize);
($prize == $door) ? $win_keep++ : $win_switch++;
}
print "Keep:\t$win_keep\nSwitch:\t$win_switch\n";
This produces the correct results - 1:2
But for Monty Fall, I get exactly the same thing, as many posters here have argued, against many others and the Rosenthal paper Jeff links to!
#! /usr/bin/perl -w
use strict;
my ($i, $prize, $door, $open, $win_switch, $win_keep);
for ($i = 0; $i < 10000; $i++) {
$prize=int(rand(3));
$door=int(rand(3));
$open=int(rand(3));
next if ($open == $door);
($prize == $door) ? $win_keep++ : $win_switch++;
}
print "Keep:\t$win_keep\nSwitch:\t$win_switch\n";
This yields exactly the same results, not unsurprisingly, since it's basically the same code, just that the first version makes Monty always choose between the two unpicked doors, while in the second we let him pick any one, but we abandon the cases where Monty slips against the door that we originally picked. Am I making some wrong assumption here? More to the point, has anyone who is defending Rosenthal's solution actually run a simulation confirming it - this is a programming blog, after all!
Celejar on June 23, 2009 7:07 PMI started to look through Pickle's code to see where he went wrong, but Celejar's post convinced me writing my own simple Monty Hall simulator would be more fun. So here's Yet-Another-Monty Hall Sim, this time in Python!
-----
# A simple simulator for the Monty Hall problem
from random import randrange
def MontyHallTest( rounds ):
winsIfSwitch = winsIfKeep = 0
for i in range( rounds ):
prizeDoor = randrange(3) # pick an integer from [0,1,2]
pickedDoor = randrange(3) # pick another integer from [0,1,2]
randomOffset = randrange(-1,1,2) # pick +1 or -1 at random
# modulo arithmetic makes sure our door stays in range
excludedDoor = (pickedDoor + randomOffset) % 3
# can't exclude the prizeDoor, exclude the other one
if excludedDoor == prizeDoor:
excludedDoor = (pickedDoor - randomOffset) % 3
# we had the winner, so keeping it wins
if pickedDoor == prizeDoor:
winsIfKeep += 1
# we didn't have the winner, so switching wins
else:
winsIfSwitch += 1
return [100 * winsIfKeep / rounds, 100 * winsIfSwitch / rounds ]
-----
What I thought was really interesting about doing the exercise of writing the code for the pseudo-empirical (since the number generator is only pseudo random) experiment is how clearly the excluded door falls out of the problem. As you can see in the code, I figure out which door Monty can exclude... but it doesn't matter. I tried my darndest to make it matter, but it just wouldn't! You'd get the same results if you took out all the lines involving the excluded door.
If I picked a winner before, I still have a winner. If I picked loser before, I still have a loser. P(Picked a loser the first time) = 2/3 and P(X=Picked a winner the first time) = 1/3
The only way you can get to 50/50 is throw away your choice and chose again randomly. But why take 50/50 when you can exploit the information you have to get a 2:3 chance of winning?
DM on June 23, 2009 8:47 PM...and the comment system ate my indents. Sorry about that, you'll have to add them back in if you want to try my simulator (you win this round, Perl, with your not-getting-eaten by the comment system... you win this round... :P)
DM on June 23, 2009 8:49 PM@Celejar
You need to discard the cases where he opens the door with the prize in it, as well.
Trevel on June 23, 2009 8:54 PMQ: If I were to flip a coin 999 times and have it land heads every time, what are the chances of heads the next flip?
I always liked to jokingly answer 100% it's either a heavily biased coin or it has heads on both sides.
Now that I understand the Monty Hall problem, this looks more correct than I first imagined. When the other doors are revealed, the numerator part of the odds goes up for each remaining door instead of what I first assumed, the denominator going down.
Can I now put the coin toss argument to rest by saying that the odds of the next flip are biased by the previous results which I personally just witnessed? I mean, did I kill Schrödinger's cat after all?
Just that one niggling issue which I can't quite shake is this... If I build a Monty simulation just like everyone else, I accidently bias the outcome just like everyone else by doing something like the following:
while (reveal == choice || reveal == prize)
{
reveal = rand() % door_count;
}
Or I could just rename those variables to something like…
while ( my_dice_roll_gives_undesirable_results(dice_roll) )
{ dice_roll = perfectly_random_result(); }
Now that computer simulation does indeed mimic the (real) story behind the problem. However, I can just as easily tell my computer to just pick a single row from my possible outcome table. No simulation required here, I'm rolling my n-sided dice only one time.
I don't know where I'm going with this to be honest, I'm obviously not comprehending one little piece of the puzzle. I know with more coin tosses / dice rolls, my statistics form a lovely bell curve just like any self respecting polynomial should.
Somehow I get this feeling that we all just divided by zero metaphorically speaking and we all agree that that's the correct thing to do.
Note to self. Time for a beer. Lets go shopping. Monty Burns is my hero.
Frogger on June 23, 2009 9:54 PMNo seriously. We're done here. Go home.
Frogger on June 23, 2009 9:56 PMIn the election of signal to noise, I voted noise.
Frogger on June 23, 2009 9:57 PMMonty Hall is only counter intuitive to people who haven't had basic college level math -- normal people, I guess. It's a super easy Bayes problem otherwise. I don't know why Erdos had a problem with it, but to most mathematicians it is indeed intuitive. And to normal people, simply imagining the example with a million doors usually sets them on the right path.
And Jeff's original Boy/Girl problem is indeed too vaguely specified to answer. The reason we can answer Monty Hall is because we know how the show worked -- ie, we know that the host never reveals the prize.
Anonymous on June 23, 2009 10:28 PMMonty Hall is only counter intuitive to people who haven't had basic college level math -- normal people, I guess. It's a super easy Bayes problem otherwise. I don't know why Erdos had a problem with it, but to most mathematicians it is indeed intuitive. And to normal people, simply imagining the example with a million doors usually sets them on the right path.
And Jeff's original Boy/Girl problem is indeed too vaguely specified to answer. The reason we can answer Monty Hall is because we know how the show worked -- ie, we know that the host never reveals the prize.
Finn on June 23, 2009 10:28 PMHint: Monty Hall never revealed a prize on the show. They did not edit out (throw out) the episodes where this happened.
Anonymous on June 23, 2009 10:40 PMHere is my Monty Fall simulator in Ruby. It may help make sense why the probability is 50%.
def monty_fall(guess, switch)
srand()
car = 1 + rand(3) # put the car behind a random door
srand()
opened_door = 1 + rand(3) # door is opened randomly
if car == opened_door || guess == opened_door
return 0.5
elsif car == guess && switch
return 0
elsif car != guess && switch
return 1
elsif car == guess && !switch
return 1
else # car != guess && !switch
return 0
end
end
You can run the simulation like this:
good_guesses = 0
1.upto(10000) do |i|
srand()
good_guesses += monty_fall(1 + rand(3), ARGV[0] == 'true' ? true : false)
end
puts good_guesses
Mischa on June 23, 2009 10:58 PMSuch a nice thread, I really want to add to the total confusion. The key to understanding is to not concentrate on the other door, but to the original choice.
When chosing 1 out of 3 doors, and behind 1 of these is a car, I think everybody with a basic understanding of math agrees that you have a chance of 1/3 to get the car. If you stick to this door, then it DOESN'T MATTER what happens next, it will remain on 1/3. Except for the trivial case that the thing behind the door is removed, it doesn't matter if
- No other door is opened.
- Both other doors are opened.
- A million doors with goats are added.
- A million doors with cars are added.
- Monty slips on a banana peel, causing a microexplosion of matter and antimatter when hitting the floor.
- Jeff finds a prove for P=NP, but writes such a confusing blog post about it that nobody believes him.
No matter what, if you stick to your initial door of choice, you still have a chance of 1/3 to get the car. How should it change as long as this door is not affected by the following actions?
So, if there is one other door left, and behind one of the two doors (your original choice and the other) there definitely is a car, the total probability for a car MUST add up to 1. Now do the math, and no, 1/3 + 1/2 is NOT 1.
Let me give some pseudocode for it:
Case 1: immediately open the door
Value = Random(1..3)
if Value = 2 then print "You won!"
Case 2: Wait for a looooong time before opening the door
Value = Random(1..3)
...
// Many actions here that DON'T change Value
...
if Value = 2 then print "You won!"
When you run this 99,999 times, how many times (on average) will you get "You won!" in case 1 and in case 2 (modification of the random seed does not count)?
Secure on June 24, 2009 12:58 AM@Mischa
"if car == opened_door || guess == opened_door
return 0.5"
Can you explain to me why car == opened_door would return 0.5?
Gary on June 24, 2009 1:44 AM@Mischa
Yes, what Gary said.
I would have thought:
if car == opened_door
return 1
-- if Monty reveals the car, and I'm now allowed to switch, I'm going to pick the door that I know contains the car!
HOWEVER, the original description of Monty Fall specifically states that car != opened_door: "the host slips on a banana peel and accidentally pushes open another door, which just happens not to contain the car"
John H on June 24, 2009 2:14 AMOkay, I've got a new question for you Monty Fall lovers:
A man rolls a 3 on a die. What's the probability that he rolled a 6?
@confuse-us
"while ( my_dice_roll_gives_undesirable_results(dice_roll) )
{ dice_roll = perfectly_random_result(); }"
this actually sums up my response to a number of the Monty Fall responses here.
"the host slips on a banana peel and accidentally pushes open another door, which just happens not to contain the car" -- yet some contend that you can't discard results where he pushes open a different door.
I just rolled a 6. What's the probability that I rolled a 3? ZERO!
All the possible other numbers I might have rolled become irrelevant as soon as the result is announced.
Ugh, in case it's not obvious, Gary and I are sat next to each other having a conversation, but independantly posting comments here. Sorry about the dupes!
John H on June 24, 2009 3:33 AMI didn't believe it. I had to write a program to see that it actually is so. Indeed, the odds of winning go from 33.(3)% to 66.(6)% simply by switching! The answer to why it is so begins to be simple once you understand how it really works.
Here's a short piece of the output of the program; Legend:
The "100" is the initial choice of the guest.
The "1" is the choice where the prize is.
A value of "101" is where the guest managed to guess the prize in the first try.
A value of "-100" depicts the door that is shown to the guest after the choice.
Arrays' indices begin at 0.
"-I" at the end shows an Initially correct choice. too bad we switch.
"---W" at the end means we switched into a correct choice.
Arr:[1,-100,100] switching from [2] to [0]---W
Arr:[100,1,-100] switching from [0] to [1]---W
Arr:[-100,0,101] switching from [2] to [1]-I
Arr:[-100,100,1] switching from [1] to [2]---W
Arr:[1,-100,100] switching from [2] to [0]---W
Arr:[-100,1,100] switching from [2] to [1]---W
Arr:[101,-100,0] switching from [0] to [2]-I
Arr:[100,-100,1] switching from [0] to [2]---W
Arr:[-100,101,0] switching from [1] to [2]-I
Arr:[100,-100,1] switching from [0] to [2]---W
Arr:[100,-100,1] switching from [0] to [2]---W
Arr:[0,101,-100] switching from [1] to [0]-I
Arr:[-100,101,0] switching from [1] to [2]-I
Arr:[100,1,-100] switching from [0] to [1]---W
Arr:[1,-100,100] switching from [2] to [0]---W
Arr:[100,-100,1] switching from [0] to [2]---W
Arr:[-100,1,100] switching from [2] to [1]---W
Arr:[0,101,-100] switching from [1] to [0]-I
Arr:[-100,100,1] switching from [1] to [2]---W
Arr:[-100,101,0] switching from [1] to [2]-I
Arr:[1,100,-100] switching from [1] to [0]---W
Arr:[-100,1,100] switching from [2] to [1]---W
Arr:[100,1,-100] switching from [0] to [1]---W
Arr:[1,100,-100] switching from [1] to [0]---W
Arr:[-100,1,100] switching from [2] to [1]---W
Arr:[100,1,-100] switching from [0] to [1]---W
Arr:[-100,1,100] switching from [2] to [1]---W
Arr:[1,-100,100] switching from [2] to [0]---W
Arr:[0,101,-100] switching from [1] to [0]-I
Arr:[101,-100,0] switching from [0] to [2]-I
Arr:[100,1,-100] switching from [0] to [1]---W
Success rate with changing:0.709677 (form 30 items).
For large groups should tend towards 0.66
What does this show? That we have 33% chance to guess initially.
The other 2 choices represent 66%. One of them is eliminated, it means that the other choice still has the value of 66%.
Or simpler put. We aren't shown another door really.
What the host is actually asking us is this:
Do you want to keep your one choice of 33%, or take the two other choices of 66%? (Since he will always show you one).
Monty Fall state table:
http://spreadsheets.google.com/ccc?key=r7A7ACY3f2G5ZbNon8UjUDA
Takes into account various interpretations of the rules. Turns out you get 50/50 if you declare games where the host's stumble reveals a car, void.
John H on June 24, 2009 4:30 AM@Secure
"If you stick to this door, then it DOESN'T MATTER what happens next, it will remain on 1/3."
Err, so I pick a door, Monty opens both doors shoing a goat and a car, and I still have a 1/3 chance of winning - cool.
Steve on June 24, 2009 5:09 AMIt took me about a minute of reading vos Savants initial column post (before she explained it) to see the validity of her statement and how it was correct. The key absolutely is the foreknowledge on the host's part.
The host must pick the door without the car, with no restrictions if neither door contains the car. You pick a door, with a 1/3 chance. There is then a 2/3 chance that the host HAS to pick a certain door, meaning there is a 2/3 chance that the door the host doesn't pick has the car behind it. The foreknowledge is an additional constraint to the problem that affects the outcome.
workmad3 on June 24, 2009 5:29 AM@Trevel: Yes, after a good night's sleep I realized what I had done wrong. Replacing
next if ($open == $door);
with
next if ($open == $door || $open == $prize);
does indeed result in parity.
Celejar on June 24, 2009 5:39 AM@Steve,
run the test 1000 times, with Monty opening both doors. Do you think you will win any other number than 333 cars (on average)? If yes, which number -- and why?
After you've made the choice, any following action will only show if you've made the right or the wrong choice, i.e. if you are in the right 1/3 or the wrong 2/3 part of the probability -- but it won't change the probability IN THE EXACT MOMENT you've made the choice.
Secure on June 24, 2009 6:28 AMHere is a chart, with ALL the possible options for 3 doors.
http://spreadsheets.google.com/ccc?key=rdo_jMEwKLSVAtYmwajgIyw
Augustin on June 24, 2009 6:40 AMMonty's law: every year or so an A-list blogger will mention my problem, causing an avelanche of millions of stupid replies.
Hope you learned a lesson, Jeff.
Wim on June 24, 2009 6:53 AM"Hope you learned a lesson, Jeff."
Yes. He learned a lesson a long time ago. If you want to increase traffic to your site and increase your potential revenue for ads, post about the Monty Hall problem.
I think I'll create a site specifically dedicated to the Monty Hall problem. And then I'll rake in the moola from all of the idiots who keep arguing the problem into the ground when it has already been done 100 times before.
Matt on June 24, 2009 7:04 AMThat's all very well, but Monty Fall and Monty Crawl are new to most of us.
John H on June 24, 2009 7:06 AM@secure
"run the test 1000 times, with Monty opening both doors. Do you think you will win any other number than 333 cars (on average)? If yes, which number -- and why?"
Before selecting a door, the probability you will chose the car is 1/3.
Once you've selected a door the probability is either 1 or 0, and this will not change.
But, as you don't know if you have coden the car or not there is an inferred probability based upon your knowledge, and this will change as dooors are opened.
Your post is trying to have it both ways, in talking about a 1/3 chance that does not change regardless of the what new information you are provided with. The inferred probability, which is what all these Monty problems is about will change, the actual probability will not change, but is 1 or 0, not 1/3.
Steve on June 24, 2009 7:18 AM"Yes. He learned a lesson a long time ago. If you want to increase traffic to your site and increase your potential revenue for ads, post about the Monty Hall problem"
My guess is that the next post will be on Zeno's paradox, or that one about a plane on a conveyor belt.
Steve on June 24, 2009 7:25 AMHe, I never heard about the plane on the conveyor belt. Thanks! :-) But it is a silly problem, only misleading people who don't grasp the elementary physics of plane lift.
Zeno's paradox is of course nonsense. Apply it to TCP packets, and you could not be reading this!
Anonymous on June 24, 2009 7:40 AM@Steve
"Before selecting a door, the probability you will chose the car is 1/3.
Once you've selected a door the probability is either 1 or 0, and this will not change."
You're talking about two different probabilities here. The second doesn't substitute the first, as you seem to argue, but it is correlated to the first: 1/3 of the times you get a 1, 2/3 of the times you get a 0.
"But, as you don't know if you have coden the car or not there is an inferred probability based upon your knowledge, and this will change as dooors are opened."
So you are argueing that when running 1000 tests with
a) Chose a door, both other doors kept close, open the selected door
b) Chose a door, both other doors are opened, open the selected door
then the number of cars you win in a) are different from the number of cars you win in b)? Unfortunately you did avoid my question: How many cars will you win in a), how many will you win in b)? Please give hard absolute numbers, anything else is theoretical blahblah. Here are my numbers: 333 for both.
Hey forget the math problem...I wanna know why there are goats on the show.
Kit on June 24, 2009 8:34 AMWhen I first heard about plane on a conveyor belt (on Mythbusters), I initially thought that it wouldn't move. But then they did something that made me realize that I had neglected something in my initial reasoning: They held the plane still (they used a model plane on a treadmill for a small-scale demonstration).
This made me realize that a plane's wheels are connected to any sort of axle or gearshaft and are actually allowed to freely rotate. So any motion of the conveyor belt would just cause the wheels to spin faster and not have any affect on the plane at all. Once you realize that the reason a plane has wheels isn't locomotion but because overcoming the static friction of a plane resting on the ground is a lot harder than the rolling friction of a wheel.
BA on June 24, 2009 8:40 AMI meant to say that "a plane's wheels are _not_ connected"
BA on June 24, 2009 8:41 AMIt seems to me that the *only* reason one should switch doors based on the host's selection is that the host's selection is *not random*. If it was (if he didn't know what was behind each door) and yet he opened a door to reveal a goat, it still wouldn't make any difference to switch.
Brad on June 24, 2009 9:52 AMThis answer by xebecs on June 22, 2009 8:01 AM
EXPLAINS IT FULLY AND COMPLETELY. I can't see how Charles or anyone else missed this explanation. Simpe and succint.
-------------- REPOST -----------------
It took me a long time to figure it out (after being told I was wrong the first time) but I finally decided this was a good way to think about it:
The key is that the host CAN NOT open the same door you chose. His or her hand is forced if you chose wrong.
2/3 of the time, your initial choice will be wrong, so 2/3 of the time the host's choice is forced.
In those cases, the host MUST open the other wrong door, leaving the third door as the right one. So, 2/3 of the time, the switch will be beneficial.
-------------- THANKS XEBECS -----------------
Nari on June 24, 2009 10:09 AMLookit, when you first picked the door, you had 1/3 chance of getting the car. Agreed? Now close your eyes. While you are not looking, maybe somebody opens another door, maybe they don't. Still 1 in 3, because nobody changed what was behind your door.
If you have the chance to change your selection to, in effect, *ALL* of the doors you didn't initially pick, that's a 2/3 chance of containing the car. Regardless of whether any of those doors opened or closed while you weren't looking.
So when Monte opens a door and reveals a goat, all he's doing is presenting you with the opportunity to switch your selection from the ONE door you already chose, to instead selecting BOTH of the unchosen doors. Which is a no-brainer, since the not-originally-chosen two doors has a 2/3 chance of having the car.
Duh.
Larry on June 24, 2009 11:47 AM@secure
"Unfortunately you did avoid my question:"
Oh sorry, the answer to your question about how many cars I'd win in 1000 guesses is obviously 333 1/3. But that wasn't what your first post was saying. You were saying that having made the choice, the odds wouldn't change however many doors were opened, and so the probability of there being a car behind the door would always be 1/3. From this you made the eronious claim that,
"So, if there is one other door left, and behind one of the two doors (your original choice and the other) there definitely is a car, the total probability for a car MUST add up to 1. Now do the math, and no, 1/3 + 1/2 is NOT 1."
For example in the Monty Fall problem there is only two doors, one of which contains a car, but there is now a probability of 1/2 that your door has the car.
Steve on June 24, 2009 12:09 PM@max: That was hilarious.
@Jeff (Atwood): If nothing else this entry demonstrates the need for a better comments system. A programming blog needs a good way to put codes in the comments. Always pastebin I guess.
Bernard on June 24, 2009 7:06 PM@Gary
Because according to the problem statement those two cases (accidentally opening the chosen door or the door with the car) have to be discarded. Be returning a value of 0.5 those cases are discarded.
The code below is essentially the same, only it makes it clearer that those cases are discarded:
def monty_fall(guess, switch)
srand()
car = 1 + rand(3) # put the car behind a random door
srand()
opened_door = 1 + rand(3) # door is opened randomly
discard = 0
success = 0
if car == opened_door || guess == opened_door
discard = 1
elsif car != guess && switch
success = 1
elsif car == guess && !switch
success = 1
end
return [discard, success]
end
And then you can do:
discard = 0
success = 0
1.upto(10000) do |i|
srand()
result = monty_fall(1, switch)
discard += result[0]
success += result[1]
end
puts success.to_f / (runs - discard).to_f
Mischa on June 24, 2009 8:17 PM@Steve,
"Oh sorry, the answer to your question about how many cars I'd win in 1000 guesses is obviously 333 1/3."
"For example in the Monty Fall problem there is only two doors, one of which contains a car, but there is now a probability of 1/2 that your door has the car."
Beside that we are not talking about Monty Fall, and beside that Monty Fall is identical to Monty Hall (read and understand the descriptions -- one of the main problems here in this thread), don't you see the contraction in your own statements? For a probability of 1/2, I would win 500 cars in 1000 guesses.
Secure on June 24, 2009 11:00 PMs/contraction/contradiction/
Secure on June 24, 2009 11:03 PM@secure
"Beside that we are not talking about Monty Fall, and beside that Monty Fall is identical to Monty Hall"
Yes you were, and no it isn't.
"(read and understand the descriptions -- one of the main problems here in this thread)"
Have _you_ read and understood the pdf.
"don't you see the contraction in your own statements? For a probability of 1/2, I would win 500 cars in 1000 guesses."
No. You don't win 500 cars in a 1000, you win 333 1/3 cars in 666 2/3 guesses.
Steve on June 25, 2009 1:12 AM@Steve,
now at least I know where all the confusion comes from. You, and the document, are talking about two completely different probabilities. I'm talking about the probability for FULL RUNS of the game:
Select a door -- some action happens -- open the selected door (NO CHANGE)
A probability of 1/2 means 500 cars in 1000 runs, 1/3 means 333 cars in 1000 runs.
"No. You don't win 500 cars in a 1000, you win 333 1/3 cars in 666 2/3 guesses."
And I don't even want to know the confused math behind this statement. What's with the remaining 333 1/3 guesses, where are they in the probability calculation? Schroedinger guesses, car and no car at the same time? Well, you can't know if you win the car until you open the door, better keep it closed and you have a probability of 1 for a win.
Secure on June 25, 2009 3:00 AM@Secure
"I'm talking about the probability for FULL RUNS of the game:
Select a door -- some action happens -- open the selected door (NO CHANGE)"
That's a trivial problem - always 1/3. The whole point of the problem is how the odds change given certain information after you've mad your selection - and hence if you should switch.
"And I don't even want to know the confused math behind this statement. What's with the remaining 333 1/3 guesses, where are they in the probability calculation?"
OK, then I won't tell you, Rosenthal document explains it better than I will in any event.
However, for the benefit of anyone else mad enough to still be reading this - the remaining third of the guesses are those where the random door that is opened reveals the car. This possibility is not part of the Monty Fall problem, so has to be excluded from the set of possible outcomes.
@Steve,
last try, I promise. ;)
"That's a trivial problem - always 1/3. The whole point of the problem is how the odds change given certain information after you've mad your selection - and hence if you should switch."
Whoa, you did it again -- contradicting yourself. You say the odds for my originally chosen door are trivially always 1/3. Then you tell me that the odds will change. This includes a change for the odds of the originally chosen door, because the probability always adds up to 1. So the odds for my door are ALWAYS 1/3 -- except when they change. Or what?
"where the random door that is opened reveals the car. This possibility is not part of the Monty Fall problem, so has to be excluded from the set of possible outcomes."
So Rosenthal is just as confused, which comes at no surprise given the controverse discussion about this problem. He gives a definition of a problem (Monty Fall: "...accidentally pushes open ANOTHER door, which just happens NOT to contain the car..."), and then calculates the probability for a complete different problem, which you state as the solution for the original Monty Fall problem -- which it isn't, as you said yourself.
"Whoa, you did it again -- contradicting yourself. You say the odds for my originally chosen door are trivially always 1/3. Then you tell me that the odds will change."
No contradiction. The odds of chosing the door with the car are 1/3. Once you have chosen the door the odds change in the light of new knowledge. (As I pointed out before these are the inferred odds, not the actual odds that are always 1 or 0).
You claim that the inferred odds do not change regardless of which doors are opened. This is wrong.
For example, if one of the two remaining doors is chosen at random and opened - if it shows a goat the chances that your door now contains the car has increased to 1/2. This seems confusing, but it is more clear if you consider the case when the random door is opened to show a car. Now do you think you still have a 1/3 chance of a win?
And if both doors are opened, to show two goats do you think there is still a 1/3 chance of you having the car? What if Monty now offers you half the value of the car rather than whatever is behind your door. Would that be a good deal?
Steve on June 25, 2009 6:00 AMPeople have trouble with this because in grade school they make a mistake in chain probabilities (two coinflips should be independent) and overgeneralize. Now they treat the door choice as the event - coinflip. No. The car and goats are not reshuffled after Monty opens a door. If they were, that would be the 50% independent event people confuse this for.
Serious on June 25, 2009 6:31 AM@Steve,
OK, promise broken, but now I have a very last question to clarify:
"if one of the two remaining doors is chosen at random and opened - if it shows a goat the chances that your door now contains the car has increased to 1/2"
You really want to tell me that the INTENTION makes the difference? For the very SAME ACTION (opening one of the two other doors and revealing a goat), the probability for your selected door is 1/3 when the action happened by will and 1/2 when the action happened by accident?
Do you REALLY want to tell me THIS?
How does it happen? Psychokinetic influence of mathmatic rules?
Secure on June 25, 2009 7:15 AMThis probably too late for anybody to see but here's another take.
Let's say there are 26 doors. Chances of you picking the right one is 1 in 26. Monty opens 24 of the doors showing goats. He always does this. It will always be your door and one other. Do the odds still say 50/50. I would switch instantly since Monty narrowed it down for me.
I would lose only once in 26 times on average. That would be when I picked the right door. The other 25 times I would win, as an average.
So whether it is 3 doors or 300, it makes sense to switch.
Rich S. on June 25, 2009 7:49 AM@Steve,
Finally, I've simulated it -- it was about time. 1/2, I have to say. Intention makes a difference, it's psychokinetic influence. ;)
I was right in the sense that when sticking to the selected door, even when another door with a car was opened, the probability is 1/3. But when these cases are removed, then of course it will change the overall statistics, as a simple truth table will show (Player always choses Door1 and sticks to it).
Door1 - Door2 - Door3 - Opened
Car - Goat - Goat - Door2 - Win
Car - Goat - Goat - Door3 - Win
Goat - Car - Goat - Door2 - Removed
Goat - Car - Goat - Door3 - Lose
Goat - Goat - Car - Door2 - Lose
Goat - Goat - Car - Door3 - Removed
The trick is that the random selection of the door is part of the game; it influences the distribution, because all 6 combinations are equally likely with 1/6.
In the normal game, a door with a goat is always opened, thus there is no randomness and the door opening does not influence the distribution of states.
Door1 - Door2 - Door3 - Opened
Car - Goat - Goat - Door2 or 3 - Win
Goat - Car - Goat - Door3 - Lose
Goat - Goat - Car - Door2 - Lose
Only three different states with a probability of 1/3 are possible, the first state is not partitioned into two states. It can be done, but then the probability of the state is partitioned, too, given that Monty opens one of both doors at random:
Door1 - Door2 - Door3 - Opened
Car - Goat - Goat - Door2 - Win (1/6)
Car - Goat - Goat - Door3 - Win (1/6)
Goat - Car - Goat - Door3 - Lose (1/3)
Goat - Goat - Car - Door2 - Lose (1/3)
Now everything is clear and easy. Thanks for a very inspiring discussion with a happy end. ;)
Secure on June 25, 2009 8:38 AMJeff - "I think what they're really objecting to is how unintuitive the answer is."
That's is a bizarre interpretation given the discussions in the comments. The question was roundly condemned as being unclear by mathematicians and academics. Maybe you only skimmed the first couple of comments???
Reading the comments makes it entirely clear how the sentence could have been phrased to avoid any ambiguity.
Philip on June 25, 2009 5:16 PMForget about the montey hall problem, that's a peice of piss. What I'm angry about is that Jeff still won't admit he fucked up when he asked the boy/girl problem. His explanation for why people are pointing this out is bullshit. I'd respect him more if he was willing to admit a mistake, but this is just annoying and smug.
Breton on June 25, 2009 10:51 PMI love listening to the whining of the many so called "intelligent" people who were simply wrong.
It's very easy to attack and criticise the semantics of the question. How about being honest with yourself and realising that you can actually (shock! horror!) be wrong.
It's painfully obvious that most of the angry, dismissive responses here are just face saving, pure and simple.
"It's very easy to attack and criticise the semantics of the question. How about being honest with yourself and realising that you can actually (shock! horror!) be wrong."
I'm not sure who you're actually directing this at, but if it's regard with the boy/girl problem- Properly phrased, as in the original source material that he derived the original question, it is easy to arrive at the same answer that Jeff did. When the question is mutilated, and presented in the way that jeff ACTUALLY presented the question, you arrive at a different solution than that which was intended. Jeff screwed up the wording of the problem, simple as that. We didn't get the solution wrong, he got the question wrong and won't admit it.
I don't care a wit about face saving. I just hate smug idiocy.
Not that any of it actually matters. It is just the internet after all.
Breton on June 26, 2009 12:54 AMAlso, can I Just point, again, to the link Jason M posted to the High Priest and Primary Advocate, the go to guy for anything Bayesian Statistics, demonstrating how the wording that jeff used is mangled and wrong. Are you going to tell him that he's only saying that because he doesn't want to admit that beyesian statistics is too unintuitive for him to understand? I mean, how much more do you need to understand what happened here?
Breton on June 26, 2009 1:11 AMI find it hard to believe that so many mathematicians would so vehemently protect a stance they haven't proved. Any intuition about conditional probability even would direct one in the right direction.
The reasoning is simple. You have a 2/3 chance of getting it wrong in the first place, so changing will result in a correct choice two times versus one.
Andre on June 27, 2009 10:02 AMHard to believe
sexy costumes on June 28, 2009 4:28 AMI created a learning object to help my statistics students (Year 2 university) to better understand the probabilities underlying the Monty Hall Dilemma. The learning object gives you a chance to play both the classic three-door game and a modified 20-door version. It also provides a set-based explanation of the probabilities for each version. In the three-door game, you really are twice as like to win by switching, and in the 20-door game, you are 19 times as likely to win by switching. The learning object is quite easy to use, and my students tell me it's actually rather fun. Give it a try!
David on June 28, 2009 5:11 PMThe way in which I understood the Monty Hall problem easiest was to examine starting conditions.
You have a 33% chance of choosing the car at the outset. If this is the case and you swap after the host reveals a goat, you choose a goat.
You have a 66% chance of choosing a goat at the outset. If this is the case and you swap after the host reveals a goat, you choose the car.
Andrew Care on June 28, 2009 8:53 PMI was thinking for a while on the same puzzle, but now, I am happy that so many great minds have been tricked by this puzzle.
OFF:
"They just debond it from carbon"
Nope, the oxygen is released from the water.
E.g.:
http://en.wikipedia.org/wiki/Water_splitting
http://en.wikipedia.org/wiki/Photodissociation
I was thinking for a while on the same puzzle, but now, I am happy that so many great minds have been tricked by this puzzle.
OFF:
"They just debond it from carbon"
Nope, the oxygen is released from the water.
E.g.:
http://en.wikipedia.org/wiki/Water_splitting
http://en.wikipedia.org/wiki/Photodissociation
I was thinking for a while on the same puzzle, but now, I am happy that so many great minds have been tricked by this puzzle.
OFF:
"They just debond it from carbon"
Nope, the oxygen is released from the water.
E.g.:
http://en.wikipedia.org/wiki/Water_splitting
http://en.wikipedia.org/wiki/Photodissociation
I was thinking for a while on the same puzzle, but now, I am happy that so many great minds have been tricked by this puzzle.
OFF:
"They just debond it from carbon"
Nope, the oxygen is released from the water.
E.g.:
http://en.wikipedia.org/wiki/Water_splitting
http://en.wikipedia.org/wiki/Photodissociation
I was thinking for a while on the same puzzle, but now, I am happy that so many great minds have been tricked by this puzzle.
OFF:
"They just debond it from carbon"
Nope, the oxygen is released from the water.
E.g.:
http://en.wikipedia.org/wiki/Water_splitting
http://en.wikipedia.org/wiki/Photodissociation
Can I finally post this comment?
András on June 29, 2009 5:09 AMI was thinking for a while on the same puzzle, but now, I am happy that so many great minds have been tricked by this puzzle.
OFF:
"They just debond it from carbon"
Nope, the oxygen is released from the water.
E.g.:
http://en.wikipedia.org/wiki/Water_splitting
http://en.wikipedia.org/wiki/Photodissociation
Can I finally post this comment?
András on June 29, 2009 5:10 AM>
In my experience, there are the functional programmers, systems programmers, and Yoda-talkers.
Big difference in approach. Functional programmers normalize their data, so that they can cleanly express their algorithms in terms of functions and function combinators. Functional programmers tend to do things like writing parsers and code generators to solve their problems -- after all, every program that produces output does two things: parse input, and apply a function can be parametrized by context. (Of course, modern functional languages have made these tasks extremely easy and transparent, through the use of pattern matching on a Turing complete type system)
The other guys... don't. After all, an "object system" amounts to a fancy function combinator that knows to look up functions to apply from a hierarchy. Using it to "encapsulate" structures that aren't objects or object-like is merely an abuse of the combinator, and actively gets in the way of cleanly expressing algorithms. It reminds me of Yoda-speech, or like having the terrible habit of starting every declarative sentence with "And then it". (What do you do when there is no "it" to be referred to? You have to squirm and abuse intelligibility or grammar or both. For better or worse, bad grammar is unacceptable in computer languages, which means you're stuck with unintelligible programs) Some patterns are quite okay by me, like the template pattern (surprise, you use an analogue of it when you're writing templates for code generators or other related constructs). Others, like the Interpreter pattern, are CLEAR symptoms of this speech impediment.
Try writing a parser for a non-trivial grammar in Java or your favorite object oriented language. Typically, this is bug-prone and bad idea. You are much better off using a code generator -- which essentially takes a functional program (the grammar) as input and applies the necessary transformations to turn it into valid Java or C++ or whatever. This is what your brain has to do, every time you use a objects for domains that are not object-like. It is a waste of brain power better suited to solving real problems, instead of made up ones.
Systems programmers can fall on either side of this spectrum, but even the clever, C-macro using ones are often limited by their product program's environment. That's fair enough -- the much of the crappiness of bare-metal can be abstracted away, from the programmer's point of view, with cleverly crafted macros. Unfortunately, dullards shun macros, for the same reasons they shun other functional programming languages.
Captain Oblivious on July 2, 2009 5:35 PMI'll admit that I still have a hard time with MH problem. Trying working backwards: You have two doors to choose from with the car and goat respectively. Your odds of winning: 50/50. Now suppose the host "tells" you that he eliminated another door with a goat. According to the MH solution, you should switch because your odds are better. Now suppose I tell you that Monty was lying. Suppose Monty tells you with a pinky to his lip that he eliminated 1 billion other doors. That would make your odds of winning on a switch virtually 100% and yet that is clearly not the
Still Skeptical on July 2, 2009 8:59 PMI'll admit that I still have a hard time with MH problem. Trying working backwards: You have two doors to choose from with the car and goat respectively. Your odds of winning: 50/50. Now suppose the host "tells" you that he eliminated another door with a goat. According to the MH solution, you should switch because your odds are better. Now suppose I tell you that Monty was lying. Suppose Monty tells you with a pinky to his lip that he eliminated 1 billion other doors. That would make your odds of winning on a switch virtually 100% and yet that is clearly not the case.
Still Skeptical on July 2, 2009 8:59 PMI'll throw my resolution of the problem in, in case it helps someone. When I formulated it this way, it became very clear and transparent to me.
There are two STRATEGIES: SWITCH or STAY.
Focus on one strategy at a time. Compute the probability of winning under each strategy.
SWITCH: Pr(win | SWITCH ) = Pr(choice 1 is not car AND "choice" 2 is car) = 2/3 * 1 = 2/3
STAY: Pr( win | STAY ) = Pr( choice 1 is car ) = 1/3
Which strategy has a higher win probability? SWITCH.
So simple when framed like this. Before I did it this way, my head spun around over all the car-here-car-there-switch-stay combinations.
I think also, expressed this way, (isolating strategies) you can assess different strategies for n-door, m-reveal problems. (E.g. 7 door, Monty reveals 2 after your choice, what should you do?)
Andrej on July 5, 2009 7:36 PMI'll throw my resolution of the problem in, in case it helps someone. When I formulated it this way, it became very clear and transparent to me.
There are two STRATEGIES: SWITCH or STAY.
Focus on one strategy at a time. Compute the probability of winning under each strategy.
SWITCH: Pr(win | SWITCH ) = Pr(choice 1 is not car AND "choice" 2 is car) = 2/3 * 1 = 2/3
STAY: Pr( win | STAY ) = Pr( choice 1 is car ) = 1/3
Which strategy has a higher win probability? SWITCH.
So simple when framed like this. Before I did it this way, my head spun around over all the car-here-car-there-switch-stay combinations.
I think also, expressed this way, (isolating strategies) you can assess different strategies for n-door, m-reveal problems. (E.g. 7 door, Monty reveals 2 after your choice, what should you do?)
Andrej on July 5, 2009 7:37 PMI'll throw my resolution of the problem in, in case it helps someone. When I formulated it this way, it became very clear and transparent to me.
There are two STRATEGIES: SWITCH or STAY.
Focus on one strategy at a time. Compute the probability of winning under each strategy.
SWITCH: Pr(win | SWITCH ) = Pr(choice 1 is not car AND "choice" 2 is car) = 2/3 * 1 = 2/3
STAY: Pr( win | STAY ) = Pr( choice 1 is car ) = 1/3
Which strategy has a higher win probability? SWITCH.
So simple when framed like this. Before I did it this way, my head spun around over all the car-here-car-there-switch-stay combinations.
I think also, expressed this way, (isolating strategies) you can assess different strategies for n-door, m-reveal problems. (E.g. 7 door, Monty reveals 2 after your choice, what should you do?)
Andrej on July 5, 2009 7:38 PMThe problem I have with the MH solution is that the door doesn't know how many other doors from which you made your choice. The door doesn't know whether Monty eliminated one door or one million doors.
Whatever door you pick or even that you had a "choice" feels truly irrelevant. In the end you are left with two doors with which to choose. Think of it this way. Suppose you walk into the studio and they show you two doors. Does Monty spinning a tale of eliminating a dozen other doors really make a difference?
This is like having a 10 cups with a coin underneath. They eliminate nine coins and "tell" you that all nine are heads. That has absolutely no impact on whether the last coin is heads or tails.
Thomas on July 5, 2009 8:06 PMI must confess that I also vehemently opposed the absurdity of suggesting that with a 50/50 choice you had better odds one way or the other - could not wrap my brain around it - until I was proven wrong to my face and had to accept it.
It helps to scale up the example. What if Monty offered you the choice of 1000 doors to begin with instead of 3? The odds are 999 to 1 that you are going to pick the wrong door. Then he eliminates 998 of the options and gives you the choice to switch... In effect, 999 times out of 1000 what just happened is Monty is telling you the right door and you win by switching. There is of course the slim chance (1 in 1000) that you made the right pick in the first place, but you're kinda crazy to bet the farm on that. Make sense?
The same is true with 3 doors - the odds are just not as egregiously apparent.
Casey on July 5, 2009 8:40 PMI suppose the key to entire puzzle is that Monty ensures that the car is one of the final two choices. If Monty randomly eliminates door so that you could in theory end up with a goat behind both doors, then the odds of the car being behind either door is 2/DoorCount.
Thomas on July 6, 2009 10:48 AMOkay, for anybody still on this topic about Monty Fall :) (Since I'm bored.)
Monty Hall : Monty RANDOMLY opens a door (not the door you picked, nor the car door.)
Monty Fall : Monty RANDOMLY opens a door, which turns out not to be the door you picked, nor the car door.
Seem different? I don't think so.
For more proof, let's just go through everything.
1. We can assume I picked door #1 without loss of generality.
2-1 : Car door is #1. 1/3 chance.
2-1-1 : Monty stumbles on door #2. 1/3 * 1/2 chance. Changing fails.
2-1-2 : Monty stumbles on door #3. 1/3 * 1/2 chance. Changing fails.
2-2 : Car door is #2. 1/3 chance.
2-2-1 : Monty stumbles on door #3. 1/3 chance. Changing succeeds.
2-3 : Car door is #3. 1/3 chance.
2-3-1 : Monty stumbles on door #2. 1/3 chance. Changing succeeds.
Chance of failure : 1/6 + 1/6 = 1/3
Chance of success : 1/3 + 1/3 = 2/3
So, the odds are the same as Monty Hall :D
For those of you who are still confused, will help.
I meant to add Conditional probability at the last line. Sorry
Y. Kim on July 6, 2009 8:53 PMFor the Monty Fall problem (the second variation) there is too much controversy and that is I think because the description is kinda weird and I can't think of a way I could possibly simulate that in reality nor can I have a good insight (yet) of what is the difference or what hard math or a very deep perception of statistics or probability that I could possibly lack. Till now I thought this was also 2/3 and tried to find out why they say (Marilyn, the PDF with the probability math I still haven't read, etc) it's 1/2.
One think that is not explained is what happens if the host accidentally opened the car. This is not defined. It says that he slips in a banana and randomly happens to get the goat. So, does he always randomly slips and gets the goat (so that the game show makes sense) or is revealing the goat just a specific run (and what happens in this case) and in the other runs the host would possibly reveal the car too. Yet we are asked if in the specific run that a goat is revealed (but a car could be revealed in other runs too) what would happen?
Although to be able to check it in a simulation a rule must be set for what happens if the host chooses the car. So I invented my own two different rules for my simulation:
1) The unfair rule: The game goes on and the player switches from a goat to a goat and looses anyways. So, the host can accidentally reveal the car and make the player instantly loose. In a C programm the simulation really gets us the proposed 1/2. That's easy.
2) The rerun rule: If the host randomly reveals the car then that run is simply discarded (and not counted in the total runs) and we setup a new one and try again. Now in this one I initially made a 2/3 but when I explained the monty hall/fall problem to my brother he surprisingly came with nice ideas to use in my simulation. My mistake was that when I had a new run with the 3 doors, getting the car I started the simulation again but with the same contents in 3 doors. That means, if I had GOAT CAR GOAT and the host opened the 2nd door with the car, I reran with the same GOAT CAR GOAT (didn't randomized again a new set of doors) and randomly the host would select the 3rd door and let the run continue. But this was like canceling the mistake of the host and selecting always the goat, bringing it back to the old monty fall (not hall) problem, thus 2/3.
He actually told me:
CAR | GOAT GOAT
GOAT | CAR GOAT
GOAT | GOAT CAR
"In the occasion of the second or third row the host has a 50% probability to fuck up and select CAR. In the 1st row the mistake will never happen. So if you change your simulation programm so that a wrong choice actually reruns the game by shuffling the car/goats order in the doors, you will get twice times the first row than the others. In the first row if you switch you certainly loose. So you have two cases that switching makes you loose (two times the 1st row) and two other rows (2nd and 3rd) that switch makes you win. This is 2/4 aka 50%."
And so it actually worked in simulation for both rules getting 50%.
p.s. Although I don't think that the people who originally invented the Monty Fall version of the problem thought of these rules for the solution. If they had they would be more precise. Somehow I feel that the Monty Fall is a slight variant of the Monty Hall deliberately made to get a 1/2 effect maybe to justify the several PHDs who did it wrong on the first problem and say that, they understood the Monty Fall variation from the description, not the Monty Hall description. They say that Marilyn had an unclear description of the initial problem. But Marilyn's description is just plain right. It's the Monty Fall variation that has an unclear or misleading or not complete (needs more data) description for me. It's just a counter-intuitive problem that most of us reply 1/2 at first sight. Did all of us thought of the Monty Fall problem? No. We just didn't see the whole image, just hide the revealed car and worked independently of the initial choice. A common pitfall. I don't believe that all those PHDs and especially other non-mathematical people just got it different. They got it wrong with a first guess as I initially and my brother and my friends did.
Optimus on July 9, 2009 6:28 AMFor the Monty Fall problem (the second variation) there is too much controversy and that is I think because the description is kinda weird and I can't think of a way I could possibly simulate that in reality nor can I have a good insight (yet) of what is the difference or what hard math or a very deep perception of statistics or probability that I could possibly lack. Till now I thought this was also 2/3 and tried to find out why they say (Marilyn, the PDF with the probability math I still haven't read, etc) it's 1/2.
One think that is not explained is what happens if the host accidentally opened the car. This is not defined. It says that he slips in a banana and randomly happens to get the goat. So, does he always randomly slips and gets the goat (so that the game show makes sense) or is revealing the goat just a specific run (and what happens in this case) and in the other runs the host would possibly reveal the car too. Yet we are asked if in the specific run that a goat is revealed (but a car could be revealed in other runs too) what would happen?
Although to be able to check it in a simulation a rule must be set for what happens if the host chooses the car. So I invented my own two different rules for my simulation:
1) The unfair rule: The game goes on and the player switches from a goat to a goat and looses anyways. So, the host can accidentally reveal the car and make the player instantly loose. In a C programm the simulation really gets us the proposed 1/2. That's easy.
2) The rerun rule: If the host randomly reveals the car then that run is simply discarded (and not counted in the total runs) and we setup a new one and try again. Now in this one I initially made a 2/3 but when I explained the monty hall/fall problem to my brother he surprisingly came with nice ideas to use in my simulation. My mistake was that when I had a new run with the 3 doors, getting the car I started the simulation again but with the same contents in 3 doors. That means, if I had GOAT CAR GOAT and the host opened the 2nd door with the car, I reran with the same GOAT CAR GOAT (didn't randomized again a new set of doors) and randomly the host would select the 3rd door and let the run continue. But this was like canceling the mistake of the host and selecting always the goat, bringing it back to the old monty fall (not hall) problem, thus 2/3.
He actually told me:
CAR | GOAT GOAT
GOAT | CAR GOAT
GOAT | GOAT CAR
"In the occasion of the second or third row the host has a 50% probability to fuck up and select CAR. In the 1st row the mistake will never happen. So if you change your simulation programm so that a wrong choice actually reruns the game by shuffling the car/goats order in the doors, you will get twice times the first row than the others. In the first row if you switch you certainly loose. So you have two cases that switching makes you loose (two times the 1st row) and two other rows (2nd and 3rd) that switch makes you win. This is 2/4 aka 50%."
And so it actually worked in simulation for both rules getting 50%.
p.s. Although I don't think that the people who originally invented the Monty Fall version of the problem thought of these rules for the solution. If they had they would be more precise. Somehow I feel that the Monty Fall is a slight variant of the Monty Hall deliberately made to get a 1/2 effect maybe to justify the several PHDs who did it wrong on the first problem and say that, they understood the Monty Fall variation from the description, not the Monty Hall description. They say that Marilyn had an unclear description of the initial problem. But Marilyn's description is just plain right. It's the Monty Fall variation that has an unclear or misleading or not complete (needs more data) description for me. It's just a counter-intuitive problem that most of us reply 1/2 at first sight. Did all of us thought of the Monty Fall problem? No. We just didn't see the whole image, just hide the revealed car and worked independently of the initial choice. A common pitfall. I don't believe that all those PHDs and especially other non-mathematical people just got it different. They got it wrong with a first guess as I initially and my brother and my friends did.
Optimus on July 9, 2009 6:29 AMFor the Monty Fall problem (the second variation) there is too much controversy and that is I think because the description is kinda weird and I can't think of a way I could possibly simulate that in reality nor can I have a good insight (yet) of what is the difference or what hard math or a very deep perception of statistics or probability that I could possibly lack. Till now I thought this was also 2/3 and tried to find out why they say (Marilyn, the PDF with the probability math I still haven't read, etc) it's 1/2.
One think that is not explained is what happens if the host accidentally opened the car. This is not defined. It says that he slips in a banana and randomly happens to get the goat. So, does he always randomly slips and gets the goat (so that the game show makes sense) or is revealing the goat just a specific run (and what happens in this case) and in the other runs the host would possibly reveal the car too. Yet we are asked if in the specific run that a goat is revealed (but a car could be revealed in other runs too) what would happen?
Although to be able to check it in a simulation a rule must be set for what happens if the host chooses the car. So I invented my own two different rules for my simulation:
1) The unfair rule: The game goes on and the player switches from a goat to a goat and looses anyways. So, the host can accidentally reveal the car and make the player instantly loose. In a C programm the simulation really gets us the proposed 1/2. That's easy.
2) The rerun rule: If the host randomly reveals the car then that run is simply discarded (and not counted in the total runs) and we setup a new one and try again. Now in this one I initially made a 2/3 but when I explained the monty hall/fall problem to my brother he surprisingly came with nice ideas to use in my simulation. My mistake was that when I had a new run with the 3 doors, getting the car I started the simulation again but with the same contents in 3 doors. That means, if I had GOAT CAR GOAT and the host opened the 2nd door with the car, I reran with the same GOAT CAR GOAT (didn't randomized again a new set of doors) and randomly the host would select the 3rd door and let the run continue. But this was like canceling the mistake of the host and selecting always the goat, bringing it back to the old monty fall (not hall) problem, thus 2/3.
He actually told me:
CAR | GOAT GOAT
GOAT | CAR GOAT
GOAT | GOAT CAR
"In the occasion of the second or third row the host has a 50% probability to fuck up and select CAR. In the 1st row the mistake will never happen. So if you change your simulation programm so that a wrong choice actually reruns the game by shuffling the car/goats order in the doors, you will get twice times the first row than the others. In the first row if you switch you certainly loose. So you have two cases that switching makes you loose (two times the 1st row) and two other rows (2nd and 3rd) that switch makes you win. This is 2/4 aka 50%."
And so it actually worked in simulation for both rules getting 50%.
p.s. Although I don't think that the people who originally invented the Monty Fall version of the problem thought of these rules for the solution. If they had they would be more precise. Somehow I feel that the Monty Fall is a slight variant of the Monty Hall deliberately made to get a 1/2 effect maybe to justify the several PHDs who did it wrong on the first problem and say that, they understood the Monty Fall variation from the description, not the Monty Hall description. They say that Marilyn had an unclear description of the initial problem. But Marilyn's description is just plain right. It's the Monty Fall variation that has an unclear or misleading or not complete (needs more data) description for me. It's just a counter-intuitive problem that most of us reply 1/2 at first sight. Did all of us thought of the Monty Fall problem? No. We just didn't see the whole image, just hide the revealed car and worked independently of the initial choice. A common pitfall. I don't believe that all those PHDs and especially other non-mathematical people just got it different. They got it wrong with a first guess as I initially and my brother and my friends did.
Optimus on July 9, 2009 6:30 AMI either tried to post a big text or I have to wait or the posts are locked. Just a test. Delete me..
Optimus on July 9, 2009 6:32 AMI am sorry. The replies didn't appear on firefox even if I reloadd. Just delete the uunnecesary..
Optimus on July 9, 2009 6:36 AMwell when it comes right down to it the problem has more to do with Schrödinger's goat there is secretly a goatcar behind each of the dorrs until you open it.
Andrew on July 25, 2009 12:42 AMyou chose the first door with a 33.33% chance of being right, after one of the doors is opened you are left with 2 doors, the door you chose you did so with a 33% chance of being right, choosing again increases your chances of being right to 50% so you gain 26.77% by choosing the other door.
Anonymous on September 6, 2009 9:34 PMIt was a very nice idea! Just wanna say thank you for the information you have shared. Just continue writing this kind of post. I will be your loyal reader. Thanks again.
Wow gold on September 30, 2009 12:07 AM| Content (c) 2009 Jeff Atwood. Logo image used with permission of the author. (c) 1993 Steven C. McConnell. All Rights Reserved. |