 |
|
 |
The maths is rather simple, the statistical testing fine, I understand it well.
But what if you actually wanted a goat?
Troft not lest ye be sponned on the nurg! (Milligan)
|
|
|
|
 |
|
 |
Help me, I cannot how to work any Solution Explorer from Microsoft Visual C# 2005 Express Edition, how to work and running Programmer.cs. Cannot how to know to write/run Recent Project. Help from hohsen@hotmail.com How to get and run for new Progammer.cs from my C# Recent Projects??? hohsen88@yahoo.com
|
|
|
|
 |
|
 |
Help me, I cannot how to work any Solution Explorer from Microsoft Visual C# 2005 Express Edition, how to work and running Programmer.cs. Cannot how to know to write/run Recent Project. Help from hohsen@hotmail.com
How to get and run for new Progammer.cs from my C# Recent Projects???
hohsen88@yahoo.com
|
|
|
|
 |
|
 |
Help me, I cannot working any Solution Explorer from Microsoft Visual C# 2005 Express Edition, how to work and running Programmer. Cannot how to know to write/run Recent Project
How to get and run for new Progammer.cs from my C# Recent Projects???
hohsen88@yahoo.com
|
|
|
|
 |
|
 |
I first saw this in a book (curious incident...) and have pondered it many times. After doing some virtual simulators online, it makes so much sense that the chances double. Here is my best attempt at explaining...
You have a 1/3 chance of choosing the car from the start. Everyone agrees there. 33.3% chance if you stick with it. But we are changing. Of course you will lose if you change.
This represents the one instance where you lose out of three.
You have a 2/3 chance of choosing a goat from the start. Monte shows goat#2 in either case. Switch to the car! You will win every time you choose a goat - 66.6% of the time.
This represents the 2 out of three chances where you will change from a goat to a car.
Hope this helped... I can explain in many other ways but that was the simplest. Since there are two bad and one good, there are two instances to switch from bad to good and one to switch from good to bad.
Vinny
|
|
|
|
 |
|
 |
Sorry - Maybe I could have done simpler...
Instance of Not Changing...
33% of winning. Everyone agrees.
Instances of Changing...
1/3 of selecting car first. Every time you will switch to a goat.
2/3 of selecting goat first. Every time you will switch to a car.
Therefore, if you set your mind to switching... you will lose if your inital choice was right. You will win if your initial choice was wrong.
Do you feel lucky?
|
|
|
|
 |
|
 |
Now that I have read everyone else, let me come at the problem a different way. We should still finish up with 50%.
Suppose the doors are labeled 1, 2 and 3 and that the car is behind Door 1. (If you are unhappy with these initial conditions, change them to suit yourself - the argument does not turn on those initial conditions).
The game can play out in any one of the following ways:
(C is the contestant, M is Monty - and remember the car is behind Door 1)
C chooses 1, M chooses 2. If (C switches to 3) then lose.
C chooses 1, M chooses 3. If (C switches to 2) then lose.
C chooses 2, M chooses 3. If (C switches to 1) then win
C chooses 3, M chooses 2. If (C switches to 1) then win
--------------------------------------------------------------------------------
C chooses 1, M chooses 2. If !(C switches to 3) then win.
C chooses 1, M chooses 3. If !(C switches to 2) then win.
C chooses 2, M chooses 3. If !(C switches to 1) then lose
C chooses 3, M chooses 2. If !(C switches to 1) then lose
All of these 8 scenarios are equally probable - 4 represent wins, 4 losses.
Winning odds are 50%.
|
|
|
|
 |
|
 |
I believe your logic is flawed. You are basing your statistical analysis off what the outcome is, not what the probability of each choice is. When C chooses 1, M can only choose one time, either door 2 or 3. Your logic is counting each of the two possible choices M has as a different path through the decision tree, when it should be counted only as a single outcome.
Your scenarios should look like this
C chooses 1, M chooses 2 or 3. If (C switches to 2 or 3) then lose.
C chooses 2, M chooses 3. If (C switches to 1) then win
C chooses 3, M chooses 2. If (C switches to 1) then win
-----
C chooses 1, M chooses 2 or 3. If !(C switches to 2 or 3) then win.
C chooses 2, M chooses 3. If !(C switches to 1) then lose
C chooses 3, M chooses 2. If !(C switches to 1) then lose
The accepted solution is well documented at http://en.wikipedia.org/wiki/Monty_Hall_problem.
Greg
|
|
|
|
 |
|
 |
I offer the following comment, without having read anyone else's comments and without having looked at the code, because I don't want to be influenced by the author's or other members' opinions.
My reasoning requires that it can be safely assumed by the contestant that the door which will be removed has certainly got a goat behind it (I am not familiar with the game format).
It follows from that that once that door for removal has been nominated, the car is behind one or the other of the remaining doors. It cannot matter which door the contestant has first nominated, because she is allowed to choose afresh. The question "Do you want to pick door No. x?" is the same as asking the contestant to nominate one of only two doors available. One hides the car, the other doesn't. It is irrelevant what choice had been made earlier. The probability of winning is 50%.
Putting it in quite another way - suppose there are thirty three doors when the contestant arrives on the stage and it is known that they conceal thirty two goats and one car. Suppose too that someone simply walks onto the stage and removes thirty one doors. The contestant can have as many choices and changes of minds as she likes, before settling on one - she has a 50% chance of winning as long as there are only ever two doors to choose from.
Now I will have a look at what others have written!
|
|
|
|
 |
|
 |
I was struggling with this becuse I couldn't see how the contestant's first choice influenced the result.
I think I see now that it doesn't - directly - but it influences the host's choice and since that decision relies on prior knowledge, that's where the influence occurs.
I'm going for a lie down now.
Dave Cross
|
|
|
|
 |
|
 |
... on having such a great first name!
|
|
|
|
 |
|
|
 |
|
 |
Your MontyHallPick function has a flaw.
In your function there is a chance that Monty Hall picks the room with the car and says that it contains the goat and, thus, your "switch (pickedDoor)" part should be replaced with "switch (carDoor)" with the same content in brackets, followed by
"if (pickedDoor == leftGoat)
leftGoat = rightGoat;
if (pickedDoor == rightGoat)
rightGoat = leftGoat;
int chosenDoor;
if (leftGoat == rightGoat)
chosenDoor = carDoor;
else
chosenDoor = goatDoorToRemove == 1 ? rightGoat : leftGoat;
// would the contestent win with the switch or the stay?
if (changeDoor == 0)
{
// not changing the initially picked door
win = carDoor == pickedDoor;
}
else
{
// changing picked door to the other door rememaining
win = carDoor == chosenDoor;
}"
but the results remain the same so it's not that big of a deal!
_____________________________
There are 10 types of people,
those who read binary,
and those who don't!
|
|
|
|
 |
|
 |
I'll look closer, but I use a 0 or 1 random number to pick either the leftmost GOAT, or the RIGHTMOST goat and a switch statement to NEVER remove the CAR door.
I think that is what you are taking issue with?
As long as we agree that Monty knows the car door and never chooses that one to remove, we are on the same page.
The switch statement means that the picked door is excluded from the "Removal" process, only the leftmost or rightmost goat doors are up for grabs by Monty.
switch (pickedDoor)
{
case 0: leftGoat = 1; rightGoat = 2; break;
case 1: leftGoat = 0; rightGoat = 2; break;
case 2: leftGoat = 0; rightGoat = 1; break;
}
Did I get it wrong?
Thanks,
Troy
http://aspiring-technology.com/blogs.troym
|
|
|
|
 |
|
 |
Yes, we agree that Monty should never remove the car door, but in your code, that could happen.
For example, if pickedDoor is door number 2, and carDoor is door number 0, then your leftGoat would be 0 and rightGoat would be 1. In your case, depending on the random variable goatDoorToRemove, your keepGoat variable would be either 0 or 1, and after that variable win could become true if keepGoat is 1, and false if keepGoat is 0.
But if you look logicaly in true life, Monty would *always* open the door number 1 and when you change your selection you would always end up getting the door number 0 with a car, and in that case, your function would always have to return true.
_____________________________
There are 10 types of people,
those who read binary,
and those who don't!
|
|
|
|
 |
|
 |
This is a demonstration, not a mathematical proof.
My explanatory skills aren't sufficient to do so without recourse to maths, but this is a simple conditional probabilities problem - take a look at http://en.wikipedia.org/wiki/Bayes'_theorem
|
|
|
|
 |
|
 |
Guilty.....
Sorry, I'll change the title when I get a chance!
Troy Magennis
http://aspiring-technology.com/blogs/troym
|
|
|
|
 |
|
 |
Ironically I rediscovered this problem yesterday and have become fascinated with it. I thought it was cool to see this tool on CP today.
My question is, after having written the program to statistically prove the results, are you any closer to understanding why? If so, I think it would be a good improvement to your article, if not, I think I can sufficiently explain why if you were interested.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
 |
|
 |
Explain away dude!!
I want to know!!
"a fool will not learn from a wise man, but a wise man will learn from a fool"
"It is hard to fail, but it is worse never to have tried to succeed." - Theodore Roosevelt
"Success is going from failure to failure without losing your enthusiasm." - Winston Churchill
My Website || My Blog
|
|
|
|
 |
|
 |
I think I can explain why, although I'd be interested to see if you think the same way Paul
When the game starts and you pick a box, there is a 1/3 chance that the prize is in that box. Therefore there is a 2/3 chance that the prize is in one of the other two boxes. When the host opens one of the incorrect boxes, there must then be a 2/3 chance that the prize is in the remaining closed box not chosen by the contestant. So choosing to switch boxes at this point effectively doubles your chances of winning.
|
|
|
|
 |
|
 |
I at first had some problems realizing why too, but after I thought of the problem in the following fashion it's very easy to understand.
Let's exaggerate it just a little in order to see it more clearly. Let's say that you're on a gameshow with a thousand closed doors. Behind 999 of these doors there's a goat and behind one of the doors there's a car, now you're asked to pick one of the doors. Once you've picked a door the game show host opens 998 out of the other doors, each of the opened doors hid a goat, NOW, would you pick the door you opened first or the other un-opened door?
This is exactly what happens in the case of three doors too, you pick ONE door, the host open ALL the other doors but one, but in the case of three doors "ALL the other doors but one" amounts to only one door which makes it a bit harder too see why you should switch doors.
Hope this helps, and excuse me for my semi-poor english (hey, I'm just a stupid Swede)
Cheers,
Patrik
|
|
|
|
 |
|
 |
This is a great explaination. I'm going to forward it my University stats proff who I believe led us in the wrong direction on this classic math question.
If you always had the strategy "I'm going to switch my door" then in reality (for your first pick) you're trying to pick the door that DOESN'T have the car. You're odd's of correctly doing this are n-1/n (since there's only one door that has the car and all the others have donkeys).
You do this KNOWING that Monty is about to show you the other n-2 doors that also have donkeys. After he does so you switch since your original plan and guess was "I'm going to pick the door that DOESN'T have the car". I guess this means that if you switch you should always have an n-1/n likely hood of getting the car (after Montey opens up all the n-2 other wrong doors).
The thinking about it as an 1000 door contest really helps to shed some light on it. Nice moves Patrik. The same thoughts could be applied to "Deal or No Deal"!
Thanks guys,
Homerbush
|
|
|
|
 |
|
 |
homerbush wrote: The same thoughts could be applied to "Deal or No Deal"!
For clarification, the Monty Hall problem is NOT anything like Deal or No Deal. The host (Howie) nor the banker have any insider information. They don't know what values are in what cases. If you make it to the end with 2 cases left and Howie asks if you want to switch cases, it makes no difference statistically if you switch. You still have a 50% of winning. But you'll make a fool out of yourself on TV if you switch and are wrong
The real reason the "Monty Hall problem" works is that the host KNOWS what is behind the curtains and he uses that knowledge to show you a goat. That knowledge of where the goats are changes the statistics.
|
|
|
|
 |
|
 |
Joel has it basically right, although I don't think he was as clear as he could have been.
First thing to remember is that, on your initial selection, you have a 1-in-3 chance of having picked the right curtain, and if you do not switch nothing that happens will affect that.
Then, once the goat is revealed, your decision boils down to:
- If you picked the winner at first, and you switch, you will lose.
- If you picked a loser at first, and you switch, you will win.
So, your odds of winning if you switch are the same as your odds of picking the wrong curtain initially, which is 2 in 3.
Truth,
James
|
|
|
|
 |
|
 |
I've had this problem at college and this is indeed the right way to explain it
|
|
|
|
 |