You are not logged in.

- Topics: Active | Unanswered

**mikau****Member**- Registered: 2005-08-22
- Posts: 1,504

Ok you gotta admit this show is cool but I don't always know if this guy is talking math or if someone is just making this math up but, well he gave a wierd probability example that doesn't make sense..

You are at a gameshow and there are three curtains before you. Behind one curtain is a goat, behind the other curtain is a car, and behind the other is another goat.

The object is to guess the curtain which has the car behind it, and you win it.

Now obviously the chances on the first guess, are 1/3. (One choice three possibilities.)

Now a contestent pics the center curtain. A side curtain is opened, revealing a goat. So one curtain is eliminated and you know that the car is either behind the curtain you picked, or the other curtain. NOW will switching your choice improve your chances of winning the car? It would appear, that either way, your chances are the same. 50-50. But according to Mr Charlie Eps, you'd be wrong. Unfortunatly he explained why so quickly I couldn't follow it. But he said that switching your choice at that point, actually doubles your chances of winning the car. Something about revealing a goat in the other curtain increases the odds of a goat being in the location you picked. Why, I have no idea, I couldn't follow it that quickly.

Has anyone ever heard of this problem? Can you justify why switching your choice after the goat is revealed in the other curtain, doubles your chances?

A logarithm is just a misspelled algorithm.

Offline

**John E. Franklin****Member**- Registered: 2005-08-29
- Posts: 3,588

I think that you should switch because they didn't open the goat curtain at random, they may have specifically

have chosen the goat, not the car behind the other curtain. I think I heard this long ago, some question

analogous to this one.

**igloo** **myrtilles** **fourmis**

Offline

**mikau****Member**- Registered: 2005-08-22
- Posts: 1,504

But regardless of which one you pick, there will always be one goat remaining.

A logarithm is just a misspelled algorithm.

Offline

**John E. Franklin****Member**- Registered: 2005-08-29
- Posts: 3,588

But it's not about changing your mind, it's what they have done. They chose not to open the curtain with

the car for suspense. See what I mean. I don't know the math behind what I'm saying though.

**igloo** **myrtilles** **fourmis**

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,608

Yes, it is a known puzzle, and numb3rs seems to have got it right (though I haven't seen that episode).

Perhaps this fact is important: the host does **not** reveal one door at random - he won't reveal the contestants door of course, and he won't reveal a door that has a car.

If the contestant sticks with his original choice he will continue to have a 1-in-3 chance, so now there are only two doors left, the other must have a 2-in-3 chance. Wierd but true when you think about it.

"The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,608

Google "monty hall problem"

"The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman

Offline

**mikau****Member**- Registered: 2005-08-22
- Posts: 1,504

Ok I looked around and read a couple explanations. None of them made sense untill I read one that considered all possibilites. This uses goat A and goat B.

If you picked the car on your first guess, and goat A or goat B was revealed to you, then switching your choice you would loose the car.

If you picked goat A on the first guess, and then goat B was revealed to you, switching your choice would win you the car.

If you picked goat B on the first guess, and then goat A was revelaed to you, switching your choice would win you the car.

In two out of three scenario's, switching your choice wins you the car, so yes it is true! It makes sense now but it still doesn't make sense. lol.

Charlie was right. Our instincts aren't always correct.

So, MathIsFun, you watch Numb3rs? The new season is starting soon! w00t! :-D

A logarithm is just a misspelled algorithm.

Offline

**martian****Member**- Registered: 2005-11-21
- Posts: 14

Sorry all you people who think this works. IT DOESN'T!!

Proof

The past will never ever ever determine a greater probability for one posibility. The fact that you made a decision before does not change the probability that you have 2 options, "swap" or "stay" and two posibilities "car" or "goat". The chance is 50/50 (FULLSTOP).

Imagine that you dont choose one to begin with!! Lets play this out. options A B C. They tell you to pick one (BUT YOU DONT). Knowing that they will not pick the "car" they show you that C is a goat. Then they tell you to "stay" or "swap". You dont have a orginal choice. SO WHATS THE PROBABILITY!!! You have to choose A or B. 1 is right, 1is wrong! The probability is 50:50. The same as if they never had a C in the first place.

If You still dont belive me then believe me when I say that Im a computer Scientist and I simulated the whole process in a computer and run the simulation ONE HUNDRED MILLION TIMES!!!!! The simulation showed that it swapping worked 50% of the times.

CONCLUSION:

NUMB3RS WAS WRONG!!

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,608

Wow, martian ... 100,000,000 times? ... wow.

You say "The past will never ever ever determine a greater probability for one posibility".

OK, the probability started at 1-in-3, but then the host revealed one, so the probability ... stays at 1-in-3 ... or changes?

And a big welcome to the forum!

"The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman

Offline

**martian****Member**- Registered: 2005-11-21
- Posts: 14

100 000 000 times yes!!!

and I did that a few times, so really about 400 000 000 times

and yes "The past will never ever ever determine a greater probability for one posibility"

eg.

if you throw a dice 9 times, and a 6 comes up every single time (highly unlikely, but possible). What would be the probability of a 6 coming up on your tenth throw? ANSWER 1/6. Ive also run this simulation . Even though the chance that of throwing a 6, 10 times in a row is 1 in 60466176 if it has already been thrown 9 times, the next time is 1/6.

Its the same principle

So the probability started at 1-in-3 but then the host revealed one, the probability changes to 50:50.

*Last edited by martian (2005-11-22 00:32:01)*

Offline

**-S@m-****Member**- Registered: 2005-11-22
- Posts: 3

What Martian says is 100% correct.

I've seen an example where there are 100 doors with 1 car and 99 goats.

Now, you choose a door, then the host reveals 98 doors which do not contain the car.

This leaves 2 doors: the door you chose and 1 other.

The probablity of initially choosing the door with the car behind it is 1 in 100.

On its own the above statement is true. However, we know for a FACT that

the host will always narrow the doors down to 2, while always avoiding the door with the car behind.

With this added information the statement now becomes false. Why?

Because we will always end up with 2 doors, 1 with the car behind it, and 1 with a goat behind it.

Your initial choice is irrelevant.

Thus, the probability of initially choosing the door with the car behind it,

with the knowledge that the host will reveal 98 incorrect doors, is 1 in 2!

The irony of the question in the original post is any fool will say 50/50 for their first answer... and be correct!

It is to be noted that this only works because of the rules of the game.

Were it random what doors were revealed, it would be an entirely different situation.

In this case, the car could be revealed at any time and every time a car is not revealed increases the chance that the door you initially chose contains the car.

Anyway, the trick is not to dwell on it too much, or you may find yourself looking for answers which do not exist!

Offline

**mikau****Member**- Registered: 2005-08-22
- Posts: 1,504

Sorry all you people who think this works. IT DOESN'T!!

Proof

The past will never ever ever determine a greater probability for one posibility. The fact that you made a decision before does not change the probability that you have 2 options, "swap" or "stay" and two posibilities "car" or "goat". The chance is 50/50 (FULLSTOP).

Imagine that you dont choose one to begin with!! Lets play this out. options A B C. They tell you to pick one (BUT YOU DONT). Knowing that they will not pick the "car" they show you that C is a goat. Then they tell you to "stay" or "swap". You dont have a orginal choice. SO WHATS THE PROBABILITY!!! You have to choose A or B. 1 is right, 1is wrong! The probability is 50:50. The same as if they never had a C in the first place.

If You still dont belive me then believe me when I say that Im a computer Scientist and I simulated the whole process in a computer and run the simulation ONE HUNDRED MILLION TIMES!!!!! The simulation showed that it swapping worked 50% of the times.

CONCLUSION:

NUMB3RS WAS WRONG!!

Something doesn't sound right there. You eliminated the selection. In your example, you said we will not make an official selection and reveal goat C every time. Am I correct? Pardon me if I'm not but If I am, what if you were to pick goat C when actually playing the game? The rules of the game state that when you pick one, one of the goats will be revealed, not the car, and not the one you picked. So if you pick a a door, and he flips over a goat. Now there are three possibilities at this point. You picked goat A so he has to reveal goat B. Or you picked goat B so he has to reveal got A. Or you picked the Car and he randomly flipped over one of the goats. In the first two situations, switching your choice would win you the car since its always more likely he is revealing a **remaining** goat. In the third situation, if you picked the car on the first try, switching would loose you the car. So in 2 out of 3 situations, switching will win you the car.

I think its because no matter which card you pick, there will always be one remaining goat that is not the door you picked (since there are two goats). So the revelation does not improve your chances at all. So if you pick door B and he reveals door C. It is most likely he revealed door C rather then door A because door A contains the car. Its not that the previous chances count, its that your chances have not improved because there will always be a remaining goat to reveal, and that will always be the one revealed. So your chances have not improved, which means they haven't changed which means they are now what they were then.

I read about computer simulations that proved this concept. Did you program it to make the selection, reveal a remaining goat that is NOT the one you picked, switch the choice, and check whats inside? Thats the only proper way to do it.

*Last edited by mikau (2005-11-22 04:41:50)*

A logarithm is just a misspelled algorithm.

Offline

**mathsyperson****Moderator**- Registered: 2005-06-22
- Posts: 4,900

I made a post that pretty much echoed Mikau's, but when I posted it, I saw his and deleted it again.

The chance is most definately 1/3, though.

And to the person who said that the past doesn't change future events, that's only when they are independant.

Some events, like the game show, depend on what has happened already to decide what will happen next.

For example, if you pick a card from a deck of cards, the chance of picking it again is 0, because it wouldn't be in the deck anymore.

Why did the vector cross the road?

It wanted to be normal.

Offline

**kylekatarn****Member**- Registered: 2005-07-24
- Posts: 445

If You still dont belive me then believe me when I say that Im a computer Scientist and I simulated the whole process in a computer and run the simulation ONE HUNDRED MILLION TIMES!!!!! The simulation showed that it swapping worked 50% of the times.

No, I don't belive in you.

http://en.wikipedia.org/wiki/Monty_Hall_problem

CONCLUSION:

NUMB3RS WAS WRONG!!

No.... Conclusion [ and Advice from a fellow (future) Computer Scientist]:

*Search the net before wasting time computing solved problems.*

------------------------------------------*Wikipedia saves the day (twice)*

*Last edited by kylekatarn (2005-11-22 05:16:50)*

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,608

A most interesting debate!

And welcome to the forum, S@m.

Offline

**martian****Member**- Registered: 2005-11-21
- Posts: 14

mikau wrote:

Something doesn't sound right there. You eliminated the selection. In your example, you said we will not make an official selection and reveal goat C every time. Am I correct?

C is just simply one that is not the car.

mikau wrote:

Pardon me if I'm not but If I am, what if you were to pick goat C when actually playing the game? The rules of the game state that when you pick one, one of the goats will be revealed, not the car, and not the one you picked.

Ok, lets just say that B "is" the car. Just to clarify

If I picked A then they would reviel C

If I picked C then they would reveil A

So you see it didn't matter whether I picked A or C in the first place. Im still in the same predicament. And obviously, if Id have picked B in the first place, then then I swap, I'd be wrong.

mikau wrote:

I read about computer simulations that proved this concept. Did you program it to make the selection, reveal a remaining goat that is NOT the one you picked, switch the choice, and check whats inside? Thats the only proper way to do it.

Thats exactly what I did. By all means,please, check it yourself.

```
import java.util.Random;
class NumbersThing
{
public static void main(String[] args)
{
Random r = new Random();
int worked = 0;
int didnt = 0;
for (int trys = 0; trys<100000000;trys++ ){
int answer = r.nextInt(3);
int guess = r.nextInt(3);
int takeaway=guess;
//Ensures the reveiled wrong answer is not the one you guessed
while (takeaway==guess){
takeaway = r.nextInt(3);
}
//Makes sure the one reveiled was not the answer, if it was, the whole thing is discarded.
if (takeaway!=answer){
//Continue
int swap = -1;
for (int i = 0;i<3;i++){
if (i!=guess && i!=takeaway)
swap=i;
}
if (swap==answer)
//It worked
worked++;
else
//Didn't Work
didnt++;
//JUST TO MAKE SURE!
if (swap == guess){
System.out.println("ERROR");
}
}
}
double ratio = (double)worked/didnt;
System.out.println("Swapping worked: " + worked + " times");
System.out.println("Swapping didn't work: " + didnt + " times");
System.out.println("Ratio: " + ratio);
}
}
```

-output-

Swapping worked: 33331990 times

Swapping didn't work: 33335219 times

Ratio: 0.999903135479626

-another output-

Swapping worked: 33330446 times

Swapping didn't work: 33338379 times

Ratio: 0.9997620460190941

Offline

**mikau****Member**- Registered: 2005-08-22
- Posts: 1,504

Why did you not get a total of 100 million? Instead your total is roughly 2/3 of 100 million. 1/3 of 100 million worked, 1/3 of 100 million did not work, what about the other third? If it goes to the switch then numb3rs WAS right.

What did you mean by "Makes sure the one reveiled was not the answer, if it was, the whole thing is discarded." Discarded? I'm not sure what you mean but just to make sure, after (for instance) door A is picked. The program should check to see whats behind door B, if its a goat, then reveal it and switch the choice to door C. If you picked door A and door B has a car behind it, **then B cannot be revealed so you reveal door C and switch your choice WHICH WILL WIN YOU THE CAR! If you simply quite the game if theres a car behind the door you want to reveal, then about 1/3 of the answers should be missing, and that third should go to the switch method. **

*Last edited by mikau (2005-11-22 10:30:34)*

A logarithm is just a misspelled algorithm.

Offline

**mathsyperson****Moderator**- Registered: 2005-06-22
- Posts: 4,900

You said it yourself.

If you pick A, the host would reveal C, give you the choice between A and B and swapping would win.

If you pick C, the host would reveal A, give you the choice between B and C and swapping would win.

Picking A or C means you have to swap, swapping gives a 2/3 chance.

I'm not a program writer, so I can't check the programming for your simulator, but I would guess that you've made a wrong assumption somewhere along the line, and so the simulation is inaccurate.

If you still don't believe me, then look at some of the many websites concerning this problem. They are *unanimous* that switching has a better chance.

Why did the vector cross the road?

It wanted to be normal.

Offline

**mikau****Member**- Registered: 2005-08-22
- Posts: 1,504

I know some basic C++ but I don't know much about arrays or static whatevers. lol. So I only half understand how that program works. But 1/3 of the answers are missing so somethings not right. If you flip a coin 100,000 million times, it should come up heads about 50 million times, and tails about 50 million times. If you end up with 33 million heads and 33 million tails then someone forgot to mark something down. (about 33 million times! :-O)

It cannot be denied, if the rules of the game are followed, if you do not pic a goat on the first time, you will win if you switch. The odds of picking a goat are 2/3. So there you have it.

A logarithm is just a misspelled algorithm.

Offline

**martian****Member**- Registered: 2005-11-21
- Posts: 14

I know why 1/3 of the answers are missing, and its cause I was lazy. Rather than finding a door which wasn't the guess and which wasn't the answer, I simply picked a random number and if it wasn't the guess and wasn't the answer then I started from the top at the next itteration

shouldn't make a difference, but I try and go back and be more through if you like. I be back with modified code

Offline

**mikau****Member**- Registered: 2005-08-22
- Posts: 1,504

it will make a differance al right. that will happen about 1/3 of the time, and when it does, the point will go to the switcher. So that 1/3 of the points that are missing, all go to the switcher. That brings the odds up to 2/3.

Think clearly! :-D

A logarithm is just a misspelled algorithm.

Offline

**martian****Member**- Registered: 2005-11-21
- Posts: 14

The idea was that the points didn't go to anyone

But now, I have changed the code

```
import java.util.Random;
class NumbersThing
{
public static void main(String[] args)
{
Random r = new Random();
int worked = 0;
int didnt = 0;
for (int trys = 0; trys<100000000;trys++ ){
int answer = r.nextInt(3);
int guess = r.nextInt(3);
int takeaway=guess;
//Ensures the reveiled wrong answer is not
//the one you guessed
//or the right answer
while (takeaway==guess || takeaway==answer){
takeaway = r.nextInt(3);
}
int swap = -1;
for (int i = 0;i<3;i++){
if (i!=guess && i!=takeaway)
swap=i;
}
//System.out.println("Swap: " + swap);
if (swap==answer)
//It worked
worked++;
else
//Didn't Work
didnt++;
}
double ratio = (double)worked/didnt;
System.out.println("Swapping worked: " + worked + " times");
System.out.println("Swapping didn't work: " + didnt + " times");
System.out.println("Ratio: " + ratio);
}
}
```

Well the conclusion is, Ive been wrong. Im still confused though lol!

--output--

Swapping worked: 66668889 times

Swapping didn't work: 33331111 times

Ratio: 2.0002000233355557

-----------

So there you go.

Im deffinatly willing to accept my being wrong now!

The thing that I couldn't get my head around was, if you hadn't choosen one in first place. I couldn't work out what was the difference. Now I realise the difference is that you can choose one card that you dont want to be eliminated as being a goat. And by restricting the host to what he can remove thus it increses you chances on the swap.

This is a very good discussion. It has really opened my eyes...

Offline

**mikau****Member**- Registered: 2005-08-22
- Posts: 1,504

I knew it! Am I a smart earthling or what?

But anyways, don't feel bad. Good job with the program, its cool that you gave us a very accurate demonstration for this thread.

*Last edited by mikau (2005-11-22 11:14:53)*

A logarithm is just a misspelled algorithm.

Offline

**martian****Member**- Registered: 2005-11-21
- Posts: 14

thanks, and thanks putting up with my ignorance...lol ahaha

Offline

**mikau****Member**- Registered: 2005-08-22
- Posts: 1,504

No problem. I don't believe in interplanetary discrimination.

A logarithm is just a misspelled algorithm.

Offline