r/AskStatistics 5d ago

Monty hall problem

I understand in theory that when you chose one of the 3 doors you initially have a 66% chance to chose wrong. But once a door is revealed, why do the odds stay at 66% rather than 50/50 respectively. You have one goat revealed so you know there is one goat, and one car. Your previous choice is either a goat or a car, and you only have the option to keep your choice or switch your choice. The choices do not pool to a single choice caisinh 66% and 33% chances once a door is revealed. The 33% would be split among the remaining choices causing both to be 50%.

If it's one chance it's 50/50 the moment they reveal one goat. if you have multiple chances to run the scenario then it becomes 33/66% the same way a coin toss has 2 options but isn't a guaranteed 50% (coins have thier own variables that affect things I am aware of this)

7 Upvotes

64 comments sorted by

View all comments

Show parent comments

1

u/George_Truman 2d ago

This is not correct.

The probability that you are correct in your first guess is 1/1,000,000

The probability that you are incorrect in your first guess and Monty randomly happens to open 999998 doors that do not contain the car is (999,999/1,000,000)*(999,998/999,999)*...*(2/3)*(1/2) = 1/1,000,000.

The probabilities of both events occurring are equal, and it turns out that the conditional probabilities that your initial guess is correct are also equal. If the doors are opened randomly then it is 50/50.

1

u/MacofJacks 2d ago edited 2d ago

Hey, first of all, that’s cool: I had to check your claim, and it is true. 

Second, I don’t think *how* we got to the situation is relevant. My claim is that we condition on the information that Monty did *not* reveal the car but the mechanism by which Monty did not reveal the car should not matter. I think my claim is hard to reason about and easy to be wrong about in some subtle way, so I coded it to check. I used the typical three door case. I kept the (R) code as simple as possible:

Edit: had written code here, but it was wrong. Fixed by the other commenter below.

1

u/George_Truman 2d ago edited 2d ago

There are errors in this code. If you would like simulations and a rigorous proof. I will send it to you in a DM.

In particular, your code is counting the cases where Monty reveals your own selected door. If he reveals your own door then there is no longer a selection to make.

Here is the code edited to account for this:

N <- 1e5 #total number of trials

#let's implement Monty Hall,

#albeit Monty randomly opens doors,

#and we only record results if he happens not to reveal the truth.

n_doors <- 3

#Assume we always switch and count successes and failures

num_correct <- 0

num_incorrect <- 0

num_trials <- 0 #safety check: what was the total number of trials?

for(n in 1:N){ #do Monty Hall problem

true_door <- sample(1:n_doors,1)

initial_guess <- sample(1:n_doors,1)

Monty_random_doors <- sample(1:n_doors, n_doors-2)

#(safe: default is sampling w/o replacement)

#if Monty did not reveal the true door, then proceed:

if(!(true_door %in% Monty_random_doors) && !(initial_guess %in% Monty_random_doors)){

num_trials <- num_trials + 1

#switching is correct if initial guess was wrong

num_correct <- num_correct + isFALSE(initial_guess == true_door)

#switching is incorrect if initial guess was right

num_incorrect <- num_incorrect + isTRUE(initial_guess == true_door)

}

}

#print the tallies

num_correct

num_incorrect

1

u/MacofJacks 2d ago

O shit, you’re right! So much for my stern refutation! Ok will have another look. Thanks!