Showmaster-question

The situation:

Imagine you're invited to a gameshow. There are three doors lets say A, B and C.

Behind two doors is nothing. You only win, if you choose the one with the car.

Now the showmaster asks you to choose one door. You choose one.

The showmaster says he helps you and opens one door. The door he opens has this condition:

It is not the door with the car and it is not the door you chosed. If you chosed the door with the car, he opens a random door from the two others.

What is better, changing the door, or taking the one you previously chosed? Where do you have better chances to win?

Would like to hear your opinions about this topic.

Djamal

[709 byte] By [DOMO] at [2007-9-27 22:49:45]
# 1

i remember this came up in one of my comp sci classes. and the debate went for about an hour.

my lecturer said that people have bet their whole reputation on one

outcome or another, saying what the person should do.

however, he did raise one good point.

image instead that there was 100 doors, all empty except one.

you select one, and the show master opens 98 doors, leaving only one closed.

would you change and select the only door he didnt open out of 99 choices?

spin_FX at 2007-7-7 13:56:34 > top of Java-index,Other Topics,Algorithms...
# 2
No, I'm very stupid, so I would stay at the door. ;)I get it. (made a program, which shows me the results).I also know why the chance is 66% to 33%.Your lecturer has a very good argument. That persuades everybody, I think.Thanks.
DOMO at 2007-7-7 13:56:34 > top of Java-index,Other Topics,Algorithms...
# 3
> Your lecturer has a very good argument. That persuades everybody, I think.Doesn't persuade me without a formal proof. However, I have one, so I'm happy.
YATArchivist at 2007-7-7 13:56:34 > top of Java-index,Other Topics,Algorithms...
# 4
If you chose one door out of 3 and he opened a door without the car then that would leave 2 doors left. You would have a 50/50 percent chance of winning the car.
borntwice80 at 2007-7-7 13:56:34 > top of Java-index,Other Topics,Algorithms...
# 5

This is a well known probability question. The answer is to always switch even though your first impulse is that they will remain the same. Here is a link to a newspaper column that discusses this problem and does some explanation without getting too technical

http://www.straightdope.com/classics/a3_189.html

sethaw at 2007-7-7 13:56:34 > top of Java-index,Other Topics,Algorithms...
# 6

I found the following explanation the easiest:

You have two options for your behaviour: a) you stubbornly remain with your initial choice or b) you always change your mind.

In one of three cases you initially choose the door with the car. In two of three cases you initially choose a door with nothing behind it.

So what happens in case a)? You win in one of three cases. What happens in case b)? You win in two of three cases.

AndreasZielke at 2007-7-7 13:56:34 > top of Java-index,Other Topics,Algorithms...
# 7

I worked on an example of this, just so it would sink in, and I think I have a good, easy explanation for this.

If you NEVER change your mind you have a 1 in 3 chance of getting the correct door - 33.33%

If you ALWAYS change you can only lose if you correctly pick the correct door and then swap, right? We have already determined that the chances of you correctly picking the right door is 33.33%. From this we can derive that by swapping you have a 33.33% chance of losing, or, a 66.67% chance of winning. The only way you can lose is by picking the correct door first time, which is twice as easy as picking the correct door. Hope this makes sense. After reading a few articles about it and working on the code it all became clear.

import java.util.Random;

public class MontyHall

{

public MontyHall()

{}

public static void main(String[] args)

{

MontyHall mh = new MontyHall();

System.out.println("Win Rate: " + mh.stubborn());

System.out.println("Win Rate: " + mh.smart());

}

public int stubborn()

{

Random gen = new Random();

int correct = 0;

for ( int i=0 ; i < 10000 ; i++ )

{

int prize = gen.nextInt(3);

int choice = gen.nextInt(3);

if ( choice == prize )

correct++;

}

return correct;

}

public int smart()

{

Random gen = new Random();

int correct = 0;

for ( int i=0 ; i < 10000 ; i++ )

{

int prize = gen.nextInt(3);

int choice = gen.nextInt(3);

if ( choice != prize )

{

correct++;

}

}

return correct;

}

}

sooty70 at 2007-7-7 13:56:34 > top of Java-index,Other Topics,Algorithms...