by carleverett · 10y ago · 0 comments
You Pick Car Switch?
------- ----- ------
1 1 N
2 1 Y
3 1 Y
1 2 Y
2 2 N
3 2 Y
1 3 Y
2 3 Y
3 3 N
Without knowing anything else, switching means that you win 2/3 of the time.http://c2.com/cgi/wiki?NotTheMontyHallProblem
The switching strategy is effective because it relies on Monty's avoidance of the car. When Monty isn't trying to avoid the car, his revelation doesn't help you out at all. It just tells you that you either (A) now have a slightly better chance (50%), or (2) you've already lost. (0%).
EDIT: Also see the table on this wikipedia article. It lists probabilities for all the different variants of the MHP. Your scenario is referred to as the Monty Fall or Ignorant Monty variant.
https://en.wikipedia.org/wiki/Monty_Hall_problem#Other_host_...
"Monty Fall" or "Ignorant Monty": The host does not know
what lies behind the doors, and opens one at random that
happens not to reveal the car
(Granberg and Brown, 1995:712) (Rosenthal, 2005a) (Rosenthal, 2005b).
Switching wins the car half of the time.Let us take your approach, and have Monty flip a coin, revealing ANY door at random.
If he flips your door, and you have the prize - You have a 100% chance of winning. If he flips your door, and you have the goat, 0% chance of winning. Those two scenarios are easy, and we can ignore them.
Likewise, if he flips the coin, and shows one of the other two doors, and they have the prize - then, once again - easy - 0% chance of winning. We can ignore these scenarios.
I think up to this point, we can agree on all of the above scenarios. (They are win/lose)
Where it gets complex, he flips a coin, selects one of the doors you aren't on, and reveals a goat.
Given that you had a 1/3 chance originally of winning, and a 2/3 chance of not winning, and given that Monty has now revealed that one of the other two doors (By chance) does not have the car, your 2/3 chance of not winning is still the same, but now it applies to only a single door - I.E. You have a 66% chance of winning by selecting that other door - and the fact that Monty selected that door by chance, is irrelevant.
Unfortunately, despite my (flawed) apparently logical argument - I'm completely wrong, and you are correct.
from random import *
def putPrizeInDoor():
doors=[0,0,0]
door_winner=randint(0,2)
doors[door_winner]=1
return doors
trials=100000
testCount=0
win=lose=0
for x in range(trials):
doors=putPrizeInDoor()
userSelects=randint(0,2)
montyReveals=randint(0,2)
if montyReveals==userSelects: # Monty reveals the door user is on
pass
else:
if doors[montyReveals]==1: # Monty Revealed the prize.
pass
else: # this is where it's interesting - Monty reveals, at random, door not winning that user not on.
revealedDoors=set([montyReveals,userSelects])
newUserChoice=list(set([0,1,2])-revealedDoors)[0]
testCount+=1
if doors[newUserChoice]==1:
win+=1
else:
lose+=1
print ("Tested: {} Wins: {} Lost: {} Percentage: {:.2f}".format(testCount,win,lose,win/testCount))
Tested: 44484 Wins: 22220 Lost: 22264 Percentage: 0.50It's interesting that the deliberate selection by Monty of the goat, increases my chance from 33% to 66% if I switch, but the random selection by Monty of the goat, only increases my chance from 33% to 50% if I switch. I'm not really sure where the argument I made breaks down, but, empirically, it's clearly broken. I'll have to meditate on it a bit to see where I've gone awry.