Help me understand Monty Hall

I thought I’d just drop in and mention a column on the Monty Hall problem written by a mathematician over on the Mathematical Association of America’s web site.

I like the angle he takes - not just addressing the problem, but trying to understand why some people get so worked up about it.

Take 3 cards from a deck - 2 red and 1 black. Pretend the black card is worth 1000 and the reds are worth .05.

A friend shuffles the 3 and you pick one (but don’t look at it). The friend them looks at the 2 you didn’t pick, and turns over a red one. You then have the right to stay with your chosen card or switch to the one that remains.

If you actually do this, you’ll say “AHA” after just a couple of rounds. It becomes completely obvious that switching wins two-thirds of the time.
I’ve had success explaining this by altering the rules slightly. You pick one door, and then are given the choice: stay with that door, or give it up and take what’s behind both the other two. The only catch is that after you’ve opened both those doors, you have to give back one of the two prizes - your choice.

Odd that this should come up now; an office-mate of mine was just asking about this yesterday. He coded up a short C program that I’ll post in case anyone wants to empirically verify the results of switching. (Obviously, you’ll need some kind of C compiler. With the GNU compiler, just use “gcc -o monty.exe monty.c”, assuming you save the file as “monty.c”. Then run the “monty.exe” executable. Sorry about the formatting - it would seem that this board doesn’t preserve spaces.)

The program will play 10 games and then print out the number of times you won. The door choices are 0, 1, and 2. If you switch each time, odds are that you will win 6 or 7 games out of 10.

/************* begin monty.c code **************/
#include <stdio.h>
#include <stdlib.h>
#include <time.h>

int main()
{
int i, j, winner, choice, dummy, alt, sw, wins = 0, games = 10, total;
int partarray[2];
total = games;
srandom(time((time_t)NULL));
while(games > 0) {
winner = random() % 3;
printf(“Choose a door: “);
scanf(”%d”, &choice);
printf("You chose %d
", choice);
if(winner != choice)
alt = winner;
else {
for(i = 0, j = 0; i < 3; i++) {
if(i != choice) {
partarray[j] = i;
j++;
}
}
alt = partarray[random() % 2];
}

printf("All doors other than %d have been opened and do not contain the prize.

Would you like to switch to %d [0 = no, 1 = yes]? “, alt, alt);
scanf(”%d", &sw);
if(sw)
choice = alt;
if(choice == winner) {
printf("You win!
");
wins++;
} else {
printf("You lose!
");
}
games–;
}
printf("Your total number of wins is: %d
", wins);
}
/************* end monty.c code **************/

Enjoy!

Kramer

Many people are putting the extra rule “you never switch” to show that there’s a 2/3 chance that you should switch (ie, saying you win 1/3 of the time if you never switch). Well, um, duh. You had a 1/3 chance when you picked–if you never switch, it doesn’t matter what Monty does.

So, if you ALWAYS switch, your chances of winning must be 2/3 (since that’s all that’s left).

Here’s where the intuitive explanation comes in. If you switch half of the time, your odds are now 50/50 (right?).

So, your choices are never switch (win 1/3 of the time), always switch (win 2/3), or switch half of the time (win 1/2). So, if you travel back in time and go on Let’s Make a Deal… always switch.

Please let me know if there’s a bug in my logic, but thinking of it this way finally made it clear to me (I was about to post a complaint about the added “never switch” or “always switch” restraint, when I realized what the odds became in those situations :slight_smile: )

Ah, but there’s the rub. On the real show, Monty didn’t always offer the switch. Sometimes he did, sometimes he didn’t. Since Monty was a smart guy, and he knew that if he always offered the switch, people would figure it out and take it, he instead offered the switch more frequently when the player picked right on the first guess. In fact, he would offer the switch just often enough that it put the player in a position that he didn’t know which to do. In this scenario, you could expect to win about half the time if you switch.

This is what Cecil was talking about in his (second) explanation, and it’s the thing that many people don’t take into account when they present the puzzle. If Monty isn’t constrained to always offering the switch, then you can’t say that you’ll win 2/3 of the time by switching.

I have an serious issue and a case for 50/50.

…because 2 out of 3 doors always contain Zonk prizes…and the game always goes like this, because it’s a tv production and they proceed this way:

2 out of 3 doors always contain Zonk prizes…

No matter which of the three doors you open, Monty WILL then open another door and reveal a zonk prize, which sets up the next bit of T.V. production…a standard way of proceeding…

Monty asks guest: Change or keep your original choice?? (NO MATTER how the game starts, Monty revels a zonk prize, each and every time. This is TV and it makes for drama and fixes the odds to 50/50…with predictable expenditure by the sponsors)

(remember while all this is gojg on, one zonk prize was already revealed)

Possible outcome 1 for producers:

If Guest already had winning door selected, and guest switches, TV production will be all about laughing at them by showing zonk prize! AHAHAHA!, then showing what they missed - AHAHA!

Possible outcome 2 for producers:

If Guest already had winning prize selected, and guest does not switch, TV production will be all about celebrating then showing the zonk prize and a big ol’ “Whew!!”


Possible outcome A for producers:

If guest has a zonk prize selected, and switches to winning prize, TV production will be all about celebrating then showing the zonk prize and a big ol’ “Whew!!”

Possible outcome B for producers:

If guest has a zonk prize selected and doesn’t switch, TV production will be all about laughing at them by showing zonk prize! AHAHAHA!, then showing what they missed - AHHAHAHA!
ISSUE: FOR TV PRODUCTION at the beginning of the day, that’s FOUR possible outcomes to produce. As soon as the guest/contestant chooses a door…ANY door, the production crew only has to concern themselves with 1 of 2 outcomes! As soon as the contestant picks the door, the production crew plans from possible outcomes 1 and 2 or A and B, depending on the door selected.

It’s 50/50, because to produce a TV show, they dont’ give a rat’s ass what door was selected, they reveal a zonk prize, and AT THAT POINT in production, the TV crew has 1 of 2 possible outcomes to choose from. And ths sponsor knows the prize will be given away 50% of the time.

No, this is where you make an error. When the game starts, you have 3 choices not 2 and one of the zonks has NOT been revealed. The best explanation I’ve seen comes from a link cited in a post above by Race Bannon:

You begin with a 1/3 chance of having chosen the correct door. Let’s say that Monty offers to give you whatever is behind BOTH the other doors if you switch. You’d be ignoring the odds if you didn’t - the odds of you winning become 2/3. In effect, by revealing one of the remaining doors to be a zonk, this is what is happening. If you were presented with only 2 doors to begin with, your reasoning would be correct.

Kramer

The games always comes down to a choice between two doors, because they always reveal a zonk prize, leaving a zonk prize and the grand prize.

I didn’t say it starts with two doors. It starts with 3:

1 prize
1 zonker
1 zonker

Whichever you choose, the reveal a zonker, abd take production from there.

Producing it, you worry about two scenarios for production afte the contestant gets the first pick out of the way.

Two scenarois, everytime. THE FIRST PICK IS REMOVED. It’s irrelevant.

If they always have two zonkers, the game really doesn’t start until Monty reveals one zonker, which he always does, then the game starts. Part one is production…for effect, but iirelevant to the real game of choosing 1 of 2.
And, sitting in the production room, it becomes obvious: after the genius picks his original curtain/door, they can reveal a zonker and plan on 1 of 2 outcomes. The game has begun at this point.

Two outcomes does not equate to 50/50 chances necessarily (and in this case definitely not).

No, I realize you didn’t say the game starts with 2 doors - sorry if I gave that impression - but you’re conflating the odds at the start of the game with those after removing one of the doors. The first pick is not irrelevant. It sets the odds before one of the zonks is removed. I’m not sure how else to explain it such that you’ll be convinced, so I’ll leave it for someone else to follow up…

Kramer

The game is always about two doors. Part one, where he chooses one door is for show. Knowing this, we’d be fools to calculate it into the odds.

We’ve been running this scenario at work, and the Monty person keeps revealing one zonker, everytime, just like a good dramatic host would. We are running at 50/50 in staying or switching.

Either
a) your sample size is too small (I guestimate greater than 50 should be enough)
or
b) you ain’t playing the game right

Switching wins 2/3 of the time, sticking 1/3, period.

I tend to think you’re skewing the results (based on the statement “we’d be fools to calculate it into the odds”).

Try this link. It’s got a running total of each time it was run:

Kramer

No. The game starts when you make the initial choice, because that has an effect on what Monty can do. He can’t choose which door to open until he sees what you’ve picked, because he isn’t going to open the door you originally chose. If you originally chose Zonk Number 1, he’s forced to show you Zonk Number 2, and likewise if you originally chose the second zonk, he’s forced to show you the first one. But, if you originally chose the prize door, then he has a choice of which zonk to show you. This makes a difference.

I suspect that what you’re doing with your co-workers is oversimplifying the game before you’re playing it. Are you actually starting with the blind 1 in 3 guess, or are you assuming that it doesn’t matter and starting with a 1 in 2 guess?

Nevermind! Chronos helped me understand it!

Sorry! (Hey, I’m imperfect!)