Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Game Show Problem (1990) (marilynvossavant.com)
19 points by SanderMak on Sept 14, 2013 | hide | past | favorite | 31 comments


I really only understood the Monty Hall Problem intuitively when I sat down to write a simulation of it to convince someone else that the math (which had already convinced me) was actually correct. Here's Julia code for it:

    function monty_hall(switch::Bool; n=3)
      winner, guess = rand(1:n), rand(1:n)
      reveal = setdiff(1:n,[winner,guess])[rand(1:end)]
      if switch
        guess = setdiff(1:n,[guess,reveal])[rand(1:end)]
      end
      return guess == winner
    end
This allows you to simulate the switch and don't switch strategies:

    julia> mean([ monty_hall(false) for _=1:100000 ])
    0.33166

    julia> mean([ monty_hall(true) for _=1:100000 ])
    0.6676
But more importantly, you can see that in the don't-switch case, the reveal choice is dead code – it has no effect on wether the original guess was right or not. That's the key insight: since the original guess had 1/3 chance of being right before the reveal, it still has a 1/3 change of being right after the reveal. Before the reveal the other two choices also each had a 1/3 chance of being winners, but after the reveal their combined 2/3 chance is concentrated entirely on the door that wasn't revealed, making that the best option.

The code also lets us see what happens with a generalized Monty Hall problem for more doors:

    julia> mean([ monty_hall(false, n=4) for _=1:100000 ])
    0.24862

    julia> mean([ monty_hall(true, n=4) for _=1:100000 ])
    0.37462

    julia> mean([ monty_hall(false, n=5) for _=1:100000 ])
    0.19763

    julia> mean([ monty_hall(true, n=5) for _=1:100000 ])
    0.2666
Even for higher numbers of doors, it's better to switch.


What a shame that the title doesn't reveal what this is -- it's the original appearance of the Monty Hall problem, when Marilyn Vos Savant answered the problem correctly, only to be criticized (wrongly) by any number of well-educate academics, like this one:

"Since you seem to enjoy coming straight to the point, I’ll do the same. You blew it! Let me explain. If one door is shown to be a loser, that information changes the probability of either remaining choice, neither of which has any reason to be more likely, to 1/2. As a professional mathematician, I’m very concerned with the general public’s lack of mathematical skills. Please help by confessing your error and in the future being more careful. -- Robert Sachs, Ph.D."

Doctor Sachs was entirely wrong, as were about ten thousand other academics who ganged up on Vos Savant in the months following the appearance of this column.

The real outcome is that, if the contestant doesn't change doors, his probability of winning is 1/3, but if he does change doors, his chance goes up to 2/3. Details:

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


Is there a particular reason that so many people were wrong... that seems like a glitch in the matrix almost. I'm hungover, and suck at math, and understand after she explained it...

Even after she explained it she still received so many replies saying she was wrong, I just am wondering what's going on here that's causing this. That's just so bizarre.


Human brains didn't evolve to deal with these kinds of problems, so when we encounter them, we take mental shortcuts, like "There are three doors. There is one good prize. The odds are one in three".

It's actually a really big cognitive leap to get from there to the idea that, because the gameshow host knows the answer, that the visible answer differs from the mental shortcut.

I've got a good friend who speaks at a lot of risk management seminars, and a good deal of people who deal with financial risk every day get this question wrong. He's got a really good blog at http://behavioralrisk.net/


From the wikipedia article: "Paul Erdős, one of the most prolific mathematicians in history, remained unconvinced until he was shown a computer simulation confirming the predicted result."


Now I don't feel so bad for not getting it at first. :)


> Is there a particular reason that so many people were wrong ...

Yes. The difficulty with the Monty Hall problem has to do with grasping all the probabilities represented by all the outcomes at once. I personally didn't fully understand it until I wrote a list of all the possible outcomes and summed the probabilities.


It just seems so easy to discount the first part of the exercise. It's hard to distinguish between contestants & the 'alien' who comes in after.

I found her matrix rather messy & convinced myself with the following:

| chosen | revealed | hidden |

| car __ | empty __ | goat__ |

| empty_ | goat ___ | car __ |

| goat _ | empty __ | car __ |


Thanks for the comment; I wouldn't have looked at the article otherwise, and it's great, both historically and as an explanation of the problem. The most helpful part is where she simply lists all six possibilities in a table. That makes it clear that since the odds are 2/3 that you originally chose a goat, the odds must be 2/3 that "all the remaining doors" contain the car.

I also like how she suggested that people just run the experiment themselves.


What crystallized it for me was this:

Suppose you have a million doors, you pick one, and the host opens the other 999,998 doors. Should you switch or not?

Clearly, clearly the prize is behind the unopened door, merely because the other door you picked had a one-in-a-million chance. Now it becomes a "so, do you think the prize is behind the door you picked, or the one I have conspicuously left unopened?".


completely agree - that's what made me finally happy with the reasoning, even though I'd done the math by hand. It does get more subtle though if you have a million doors, and the host opens one, should you switch? The answer is still yes, but the margin is tiny.


Yep, exactly 10^-6.


I think it's actually about 1^-12. Given that you have N doors, you (N-1)/N chance of picking a door with a goat. If the host then shows you another door with a goat, and you decide to switch, then you have 1/(N-2) odds of picking the door with the car. So your overall probability of picking the door with the car if you switch is (N-1)/N * 1/(N-2) = (N-1)/(N(N-2)). For N=3, this is 2/3. For N=10^6, this equals roughly 10^-6 + 10^-12. So you have only a 10^-12 margin over the original 10^-6 shot of picking the car.


I don't think that's right. Why is the probability of winning after switching the product of the initial probability times the one after the switch (which I think is also wrong)?

You pick one door, the probability of winning is 1/N. The probability of losing is (N-1)/N, which stays fixed no matter how many doors the host opens. If you switch, the probability of winning is (1/(N-2))-(1/(1/N)).

If he opens all doors except two, and you switch, the probability of either of the two having the car is 50% minus the original 10^-6/2. Each door decreases the probability by one in a million, not one in a trillion. If that were the case, it would be highly unlikely that you won even if you switched after all but one of the doors were opened.


You're wrong and I wrote a simulation to prove it. To repeat my original assertion, the probability of winning if you switch is (N-1)/(N(N-2)). For N=4, this equals 3/8. Run the following simulation and you'll get roughly 0.375, as my formula predicts.

http://pastebin.com/i89M4GZU


I agree, that is a clever way to shed light on the problem. It's easier first to see that the host is giving you 999,999 choices for the price of one, and then see that the same logic applies when there are only 3 doors.


i've seen this problem several times, and I still think its a case of the statistics not representing the reality. For example, if you consider the case where you have originally chosen the correct door, there are two possibilities to consider (host reveals door A vs door B) in which switching/staying results in the same outcome, but considering results in 8 possibilities and puts the odds for both actions at 1/2


Read the article; your theory has been disproven by hundreds of independent experiments. Better yet, go write your own simulation and find for yourself that you are incorrect.


One of the core 'assumptions' is that the host would never reveal the door with the goat behind it. Therefore, in your scenario where you choose the winning door in the first place, there is only one option for the host: reveal the door without the goat / car / whatever.


I finally got it! It's because whether the host has opened a door or not doesn't matter.

You know from the start that one out of three doors has a car behind it, and his opening one of the remaining doors doesn't change it. He just shows you what you already know.

When you select your door, you know there is a 1/3 chance that your door has a car behind it, and a 2/3 chance that it doesn't. The host opens another door, and there is still a 2/3 chance your door has no car. It has only been proven that the door the host opened has no car behind it.

EDIT: To clarify, I'll rephrase. When you select your door, you know it has a 1 in 3 chance of hiding the car, and importantly, you know that there is a 2 in 3 chance that the car is not behind your door.

When the host opens his door, you still know there is a 2 in 3 chance that your door doesn't have a car behind it, but are now guaranteed that, if you chose the wrong door in the first place, you will now choose the right door.

It's not that the host's door is eliminated from the possibilities, it's that you can either open your door or effectively open all the rest of the doors to find the car. Which would you choose?


Correct. Intuition fools us in this situation. To illustrate, extend it to 100 doors, only 1 car. You choose 1. The host opens 98 doors with no car (remember s/he knows where the car is so can always do this). NOW do you want to change your door for the single door held by the host? Of course.


Thanks :) I updated my initial comment, and noticed that you'd replied only after I edited. After thinking about it some more it seems so intuitive.


Understanding this problem means you can differentiate between the two scenarios below:

(1) If the host reveals an empty door at random, your odds are 1/3 and you should switch.

(2) If the host reveals a door at random that happens to be empty, your odds are 1/2 and it doesn't matter.

The reason that so many people get confused is that they read the words and their minds automatically jump to scenario 2.


To clarify this, (1) means the empty door, as revealed, was not picked from a random set of doors with anything or nothing behind them. Rather, (1) and the link, both refer to a case where the game show host picks a random door only from doors known to be empty, presumably to raise the tension in the show. (Opening the door with something behind it would eliminate the tension, after all.)

I also like the answers later in the HN comments where someone mentions the host opening a bunch of empty doors, leaving one closed, then asking if you'd like to switch to the door he or she conveniently left closed.


“And a very small percentage of readers feel convinced that the furor is resulting from people not realizing that the host is opening a losing door on purpose. (But they haven’t read my mail! The great majority of people understand the conditions perfectly.)“ — Marilyn vos Savant


Interesting. I guess I'm part of that small percentage! But I really do think that's the case. Even if people say the words ("the host opens a losing door"), they may not be processing what it means ("the host purposefully opens a door that is known to be losing"). I wonder if I'm wrong.


Nonetheless, blind swaps are generally suspicious, and there could be a genetically programmed heuristic for humans to undervalue them.


I find it easist to understand if you increase the number of doors. Imagine you have to pick one of ten then the host removes eight wrong answers.


Thank you! This is an incredibly intuitive explanation of this.


For those who like these sorts of problems, I find this to be another tough one to wrap your head around:

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


I think people incorrectly try to simplify the problem by combining equivalent events without adding the probabilities of those events.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: