Monty Hall Problem Revisited Again Again!

You’re misinterpreting what ZenBeam is saying.

In the original problem (we assume), the “door revealed” is NOT randomly selected. Since you’re doing so, your results are skewed.

It happens this way: In 1/3 of *all *your cases, the “prize location” and the “door selected” are the same, right? And in 2/3 of all your cases, these two doors are different. That matches what we’d expect contestants to do, right?

Now, in the cases where the “prize location” and the “door selected” are the same, you rule 1/3 of these cases “infeasible,” because the “door revealed” matches the “prize location”/ “door selected.” However, in the cases where the “prize location” and the “door selected” are different, you rule 2/3 of these cases “infeasible,” because the “door revealed” matches the “prize location” or “door selected” 2/3 of the time.

So in your group of “feasible” cases, cases where the “prize location” and the “door selected” are the same occur 1/2 the time, rather than the expected 1/3 of the time.

That’s why you’re skewing the results.

But what if Monty opens door B to reveal goatse?

Monty never Rickrolls.

I dunno if this will help but a while back when teaching a computer class I explained the Monty Hall problem to my students and asked them what they thought. They all replied that switching didn’t matter. I then gave them a homework assignment to write a computer program to simulate the problem and run it thousands of times. Afterwards every single one of them understood how it worked because writing the program showed how the problem could be broken down. I’ve tried to illustrate the steps using multiple Ruby programs.

The first one duplicates all the steps of the Monty Hall problem:
[ul][li]Program sets up three doors and randomly chooses the “winning” door.[/li][li]Contestant randomly chooses a door.[/li][li]Computer randomly chooses one of the other doors for Monty to open.[/li][li]If Monty’s random door is the winner, then switch Monty’s door to the last door.[/li][li]Displays the results.[/li][li]Determines if contestant wins if she stays with the original choice.[/ul][/li]The program runs this 1000 times and displays the win percentage if the contestant doesn’t switch. (I tried to stay away from ruby short-cuts to make it easier for those who don’t know ruby.)


stay = 0
trials = 1000

# Run the test 'trials' number of times.
(1..trials).each do
  # Initialize doors so all are empty.
  doors = []
  doors[0] = false        # First door
  doors[2] = false        # Second door
  doors[3] = false        # Third door

  # Randomly choose one door to have the winner.
  winner = rand(3)
  doors[winner] = true

  # contestant randomly chooses a door.
  contestant = rand(3)

  # Monty chooses a random door to open.
  random_door = rand(2)    # Monty will choose between one of two doors.
  monty = ( contestant +   # Take the contestant's door...
            1 +            # Add one so Monty doesn't choose contestant's door...
            random_door ). # Add the random door number that Monty chooses...
          modulo(3)        # Then take modulo 3 to make sure door # is valid.

  # If the random door Monty chose is the winner,
  # then switch Monty's door to the other, non-contestant, door.
  if doors[monty] == true
    # Oops, Monty chose the winner.  Switch to the other door.
    if random_door == 0
      monty = (contestant + 2).modulo(3)
    else
      monty = (contestant - 1).modulo(3)
    end
  end

  # Print the set-up:
  puts "Winner is door #{winner}, contestant chose #{contestant}, Monty opened #{monty}"

  # Sanity check: make sure Monty's door isn't the winner or the contestant's
  if monty == contestant or monty == winner
    puts "** DANGER DANGER WILL ROBINSON**"
    return 1
  end 

  # Determine if switching or staying wins:
  if winner == contestant
    stay = stay + 1
  end
end

puts "contestant won #{stay.to_f / trials * 100}% of the time if she didn't switch"

If you run this program the results are always around 33% (in my tests it has been as low as 30% and as high as 37%).

The first simplification we can make is noting that it doesn’t matter if Monty randomly chooses one of the two non-contestant doors. We can change the logic so that Monty always opens the “next” door (unless it’s the winner, then he’ll chose the one after that.) The slightly simplified version looks like this:


stay = 0
trials = 1000

# Run the test 'trials' number of times.
(1..trials).each do
  # Initialize doors so all are empty.
  doors = []
  doors[0] = false        # First door
  doors[2] = false        # Second door
  doors[3] = false        # Third door

  # Randomly choose one door to have the winner.
  winner = rand(3)
  doors[winner] = true

  # contestant randomly chooses a door.
  contestant = rand(3)

  # Monty chooses the door after the contestant's to open.
  monty = ( contestant + 1).modulo(3)

  # If the door Monty chose is the winner, then choose the next one
  if doors[monty] == true
    monty = ( monty + 1).modulo(3)
  end

  # Print the set-up:
  puts "Winner is door #{winner}, contestant chose #{contestant}, Monty opened #{monty}"

  # Sanity check: make sure Monty's door isn't the winner or the contestant's
  if monty == contestant or monty == winner
    puts "** DANGER DANGER WILL ROBINSON**"
    return 1
  end 

  # Determine if switching or staying wins:
  if winner == contestant
    stay = stay + 1
  end
end

puts "contestant won #{stay.to_f / trials * 100}% of the time if she didn't switch"

Running this results in the same 33.% win rate if the contestant doesn’t switch. The next simplification we can make is getting rid of the ‘doors’ array. The only time it’s needed is when we execute “if doors[monty] == true” and we can change that to “if monty == winner”. Here’s the third revision (with some ruby simplifications as well):


stay = 0
trials = 1000

# Run the test 'trials' number of times.
(1..trials).each do
  # Randomly choose one door to have the winner.
  winner = rand(3)

  # contestant randomly chooses a door.
  contestant = rand(3)

  # Monty chooses the door after the contestant's to open.
  monty = ( contestant + 1).modulo(3)

  # If the door Monty chose is the winner, then choose the next one
  monty = (monty + 1).modulo(3) if monty == winner

  # Print the set-up:
  puts "Winner is door #{winner}, contestant chose #{contestant}, Monty opened #{monty}"

  # Sanity check: make sure Monty's door isn't the winner or the contestant's
  if monty == contestant or monty == winner
    puts "** DANGER DANGER WILL ROBINSON**"
    return 1
  end 

  # Determine if switching or staying wins:
  stay = stay + 1 if winner == contestant
end

puts "contestant won #{stay.to_f / trials * 100}% of the time if she didn't switch"

Now comes the surprising simplification. Note that after the following line


monty = (monty + 1).modulo(3) if monty == winner

we don’t use the variable ‘monty’ (except to print the intermediate state and the sanity check). Monty’s choice isn’t used when determining if the contestant should switch or not! This means that we can remove all the references to the ‘monty’ variable without changing the final results. Here’s the new program:


stay = 0
trials = 1000

# Run the test 'trials' number of times.
(1..trials).each do
  # Randomly choose one door to have the winner.
  winner = rand(3)

  # Contestent randomly chooses a door.
  contestent = rand(3)

  # Determine if switching or staying wins:
  stay = stay + 1 if winner == contestent
end

puts "Contestent won #{stay.to_f / trials * 100}% of the time if she didn't switch"

Again, running this gives us the same 33% win rate.

This means that what Monty shows the contestant is meaningless when determining whether she should switch or not. One way this can be explained is that Monty is showing the contestant that at least one of the other doors is not the winner but the contestant already knew that.

We can make one more simplification:


stay = 0
trials = 1000

# Run the test 'trials' number of times.
(1..trials).each do
  # Determine if switching or staying wins:
  stay = stay + 1 if rand(3) == rand(3)
end

puts "Contestent won #{stay.to_f / trials * 100}% of the time if she didn't switch"

The last program is logically performing 1000 runs of the Monty Hall program. (Other simplifications can be made but at this point they are trivial.)

Not so.

Look at it this way:

  • You pick door A.
  • Monty reveals a goat behind door C.
  • 2 doors now remain, each with a 50% chance of containing the car.
  • Therefore, you are exactly as likely to win by keeping door A as by switching to B.

The easy mistake to make is comparing your new 2-door choice to your earlier 3-door choice. This is irrelevant. Even if you started with 50 doors, and Monty systematically showed you 48 goats, this would not change. Every time a door is eliminated, the one you initially chose still has the exact same probability of having the car as every other unopened door. Switching offers no advantage (or disadvantage) at any point in the process.

Maybe you should read the thread first Wheelz.

The problem with your version, is that for the probability to “reset” to 1/x (x is the number of remaining doors), the prize would have to be free to move to a random door each time one is opened.

Since the prize doesn’t move between openings, the result of one “influences” the result of the next opening. Think about it. Try it with a deck of cards, trying to pick out the ace of spades or something.

You are only correct if you assume that Monty randomly opens doors (and therefore *could *randomly open the door that does contain the prize).

If you assume Monty intentionally never reveals the prize (which is the standard interpretation of the problem), then you’re wrong. Read Cecil’s column for a more thorough explanation.

After re-reading Cecil’s original column I humbly retract my previous post.

(I don’t feel too bad about it, though, as my take on it was remarkably similar to Cecil’s original answer, before he admitted he’d gotten it wrong.)

Bottom line – Monty Hall is just fucking with us. :slight_smile:

This is what’s causing me problems. In the Wikipedia entry on the Monty Hall problem it says:

It’s that last statement by vos Savant, that the odds change depending on the host’s memory.

Let’s say that, rather than Hall simply forgetting (in which case the contestant should stay rather than switch), he has an erratic memory problem, ie he remembers, 10 seconds later forgets again, remembers again, forgets again, and so on. Do the odds somehow change in lockstep with his memory, flickering every 10 seconds between best to change/best to switch? That seems just weird.

The odds aren’t tied to Monty’s memory, they’re tied to his decision process in determining which door to open. Or, in other words, his “memory” is only important at the exact point in time where he’s deciding which door to reveal.

But won’t his decision process always lead him to opening the door with a goat?

Let’s say door 3 always has a goat behind it, and he always opens door 3. You choose door 1, but before it’s opened, he shows you the goat behind door 3.

If you were going to choose door 1 to start with, and he’s going to open door 3, then we know for a fact that the car is either behind door 1 or door 2, right?

That’s why it seems that the decision is a 50% chance no matter how you look at it. Because he’s never going to open the door with the car, he’s only going to open the door with the goat, and after he opens that door, you are now faced with two doors to choose between.

If Monty is always going to choose door 3, then you are correct, it’s 50-50 chance that the goat is behind door 1 or 2.

However, you’re changing the problem assumptions–you’re essentially allowing Monty to pick first. That’s different from forcing Monty to pick from the “leftover” doors after the contestant chooses, so it’s not surprising that a different problem gets a different answer.

I don’t disbelieve you, I merely want to understand.

How is it different?

It’s not that Monty is always going to choose door #3, it’s that Monty is always going to choose the 1 door that a) you didn’t choose, and b) does not have the car. So when I say that Monty always chooses door #3, I’m just simplifying the examples, not changing the game.

If car is behind door #2, and you choose door #1, which door is Monty going to open? He doesn’t get a decision - he’s always going to open door #3 to reveal the goat, right?

So, the odds aren’t based on Monty’s decision. Or which door Monty opens (he’s always going to open the same one, which a) you didn’t choose and b) always has a goat). There’s no decision on his part.

Therefore, after he does his pointless dismissing of the non-valid choice, you are based with what … a 50/50 decision. Right?

At that point it doesn’t matter if you change your decision or not. (At least, that’s the way it appears to me right now, having read Cecil’s post, and this entire thread…) Maybe we’re saying the same thing, but I’m phrasing it differently.

But if we aren’t saying the same thing, then I really do want to understand.

I see you retracted this post later, but I’m quoting it because you use basically the same example my old high school math teacher used to explain to us how the problem worked.

He asked us to envision TEN doors, and that after the player chooses one door the host opens eight of the other doors to reveal eight goats. At this point the player can stick with the originally selected door, or switch to the one other closed door. When some of the class was still uncertain at this point, he asked some of the doubting students to play “I’m thinking of a number” with him. He said “I’m thinking of a number between 1 and 10”, and the student guessed a number (say 7). Then he would say “Okay, it was either 7…or it was 3. Do you want to stay with 7 or switch to 3?” After a couple of rounds of this everyone saw that switching was the wiser choice.

I think part of what confuses some people is that the difference between a 1/3 chance and a 1/2 chance isn’t overwhelmingly obvious. They think they have a 50% chance of winning if they stick with their original choice of 3 doors, and the reality of the situation isn’t so far off as to make this blatantly incorrect. But if there are 10 doors the odds of guessing right the first time are only 1/10 so switching will be the right choice 90% of the time. This more dramatic difference makes it easier for people to understand that the odds were very much against their first choice being correct and that switching is the smart move.

Right.

You’re correct up until here, but then you jump away, so let’s stop here for a moment.

First, think back to the beginning of the problem. The first thing that happens is that you choose a door, one out of three, right? What is the probability that you’ve chosen the prize door? It’s 1/3, right?

OK, now suppose Monty says, “there are two other doors here, and let me tell you, at least one of them has a goat behind it.” Does that change the probability that your original door has a prize behind it? No, because you already knew that.

Now Monty opens one of the doors and says, “here’s a goat.” Does that change the probability that your original door has a prize behind it? No, because Monty always does that. You knew he was going to do it. The fact tha he did it doesn’t change the probability that your original door has a prize behind it.

But it does change the probability that the final door has a goat behind it.

(Really, the best way to intuitively see this result is to increase the number of doors, as Lamia says. Take a look at the “ace of spades” example in the original column, and play it yourself with a deck of cards.)

The major flaw with that sentence is that, combining a) and b), it implies that you never choose the door with the car.

For if you initially choose the door with the car (probability = 1/3), then there are 2 doors that a) you didn’t choose, and b) do not have the car.

In that case, which of the two goat-doors does Monty decide to reveal?

In that case, it doesn’t matter which one he chooses to reveal. Because after he reveals (read: eliminates) one of them, you’re still faced with the exact same decision you would have been faced with in other conditions: Two doors, one of which you’ve chosen - I’m going to contend it doesn’t matter which one you’ve already selected.

But you know the one you selected has only a 1/3 chance of being right because your initial choice was 1 of 3. Therefore the other one, no matter how it ends up being presented to you, has a 2/3 chance of being right.

I think that is where the confusion comes in. The one you are being offered to switch to had 1/3 chance of being a winner. The one you selected had 1/3 chance of winning. That leads to an intuitive 50-50 on the switch. The subtle distinction appears to be that, from a probability perspective you are being offered this situation: After the door has been selected, before a reveal, what is the win probability of a switch if you win where the prize is behind either of the other two doors?

That is, the reveal is just a distraction because it really gives no information. You know that one of the two non-selected is not a winner. Telling you that one is not a winner is not new information.

Note: My earlier spreadsheet analysis not withstanding, this post is trying to reconcile the common intuition with the generally accepted answer of “switch”.

Think of it this way,

Monty: Pick a door.

Contestanat: Door number 1.

Monty: OK now, I am going to make you an offer, keep door number one OR you can have what’s behind both Doors 2 and 3. Would you like to switch?

Contestant: Of course.

Monty: Ok wait,befoire you decide let me just show you that there is a goat behind door #2. Do you still want to switch.

Contestant: Yes, because I already knew there was a goat behind one of those doors and so did you.