Hacker News new | ask | show | jobs
by kragen 2235 days ago
It doesn't matter if there's a bias against one of the doors if you're only considering the cases where the door Monty opened did happen to reveal a goat. In two thirds of those cases, you can improve your choice by switching. It doesn't matter if Monty knew the goat was there ahead of time or not!

I was going to make a lengthy logical argument, but I started to wonder if maybe I was reasoning incorrectly as I tried to prune the redundant cases, so instead I took two minutes to write this Python program to enumerate all 27 equally probable possibilities; if you pipe its output to sort | uniq -c you will see that I am correct:

    xs = [(you, monty, car) for you in range(3)
                            for monty in range(3)
                            for car in range(3)]
    print(xs)
    for you, monty, car in xs:
        if monty == car:
            print("Monty revealed the car, too bad")
        elif you == car:
            print("You win only if you do not switch")
        else:
            print("You win if you switch")
1 comments

Now I realize this is dumb because I wasn't excluding the cases where Monty opens the door you picked. Excluding those cases takes us back to 50:50! So I guess it really does matter that Monty knows in advance where the goat is...

How embarrassing that it took me two minutes to get the wrong answer and two hours to realize it — just long enough that I couldn't delete my confident assertions above :) This probably forms some kind of evidence about the quality of evidence you can get out of computer experiments without careful thinking :)