Talk:Puzzles/Decision puzzles/Monty Hall/Solution
From Wikibooks, the open-content textbooks collection
| A Wikibookian merged Puzzles:Goats and sports car into this page. (view edit history]) |
The solution is wrong! Moreover, it's obvious for any mathematician...
If something's wrong, by all means, fix it. Be bold! :) 129.94.6.30 22:19, 11 Feb 2004 (UTC) (User:Dysprosia, logged out)
I concur, the solution is incorrect. This is basic Probability. Consider:
- goat
- goat
- prize
No matter which door you select, a door with a goat will be revealed. The fact that the door opened is one other than you choose is irrelevant. The remaining doors contain:
- goat
- prize
While 2 of the 3 original doors remain, the odds of selecting the prize from the two remaining doors is 1:2 NOT 2:3.
However, if the chosen door is revealed you effectively have two chances to select the prize from the three doors -- the odds are 2:3. The odds of selecting the prize from the initial round is 1:3.
--Eibwen 19:30, 25 Sep 2004 (UTC)
Contents |
[edit] The solution is right, you are wrong
Your reasoning is flawed. Read the explanation again. For that matter, did either of you try doing a monte carlo experiment and seeing for yourself?
If this makes it clearer, suppose you choose door A. Then:
Star prize is in If you stick If you switch A Star prize Goat B Goat Star prize C Goat Star prize
The same applies whichever door you pick. -- Smjg 11:25, 20 Oct 2004 (UTC)
[edit] Elaboration
There are four (and only 4) permutations for a given door. To illustrate, suppose you choose door A:
Prize Door Revealed Door Contents Remaining Doors If you stay If you switch Prize recieved by
A B Goat A, C A - Prize C - Goat Staying
C Goat A, B B - Goat Staying
B C Goat A, B A - Goat B - Prize Switching
C B Goat A, C A - Goat C - Prize Switching
Independent of whichever door is selected only two doors remain, of which only one contains the prize, 1:2. Moreover, the odds of recieving the prize by either staying (2) or switching (2) relative to the number of permutations (4) is 2:4 or 1:2.
While there are 4 unique scenarios, staying or switching for any given door yield the same result. Consequently, two of the four scenarios are identical and the practical odds are 2:3 in favor of switching.
Both odds are valid, but they reference the outcome from different perspectives. 2:3 is the practical odds and is the answer given the context of the question. However, both the question and the solution could be further clarified to prevent this discrepancy while maintaining the integrity of the puzzle.
--Eibwen 01:58, 2 Nov 2004 (UTC)
- What matters is not so much which possibilities are the same as their relative probabilities. Though statement 3 below does depend on the symmetry in B and C, and hence the equivalence of the first two....
- The key statements are:
- The prize is equally likely to be in A, B or C.
- Hence once a door is picked, the probability of that door having the prize is 1/3.
- Monty opening a door cannot alter the fact of statement 2, since his opening a door you didn't choose is unconditional.
- Maybe the solution can be improved. But how would you improve the question?
- -- Smjg 18:27, 2 Nov 2004 (UTC)
[edit] A demonstration
I've just written this C program for the doubters among you to try for yourself:
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main() {
const int ATTEMPTS = 10000;
int stickWins = 0, switchWins = 0, attempt;
srand(time(NULL));
for (attempt = 0; attempt < ATTEMPTS; attempt++) {
int prizeIn = rand() % 3; // prize is behind this door
int choose = rand() % 3; // contestant's first choice of door
int open; // door opened by Monty
int switchTo; // door that contestant switches to
// now reveal a goat
if (prizeIn == choose) {
open = rand() % 2;
if (open == choose) open = 2;
} else {
for (open = 0; open < 3; open++) {
if (open != choose && open != prizeIn) break;
}
}
// try sticking
if (prizeIn == choose) {
stickWins++;
}
// try switching
for (switchTo = 0; switchTo < 3; switchTo++) {
if (switchTo != choose && switchTo != open) break;
}
if (prizeIn == switchTo) {
switchWins++;
}
}
// now report on result
printf("Wins by sticking: %5d\n", stickWins);
printf("Wins by switching: %5d\n", switchWins);
return 0;
}
[edit] Never mind me
OK, I just ran the program, modified it to make it more fair (took out some unneeded code and made the choosing algorithm more transparent. My version keeps using rand() untill it finds a valid door to open, instead of falling back to a 'default' 2 if it detects a double. It STILL ends up is 33%/66%. I was suprized... Untill I realized that the clue behind this 'riddle' is that the door that gets opened isn't a random door. If you choose a goat door the door that get's opened is non random. So I'm not sure yet how the math on this works, but because of this you chance goes up. The description on the solution page is still wrong though. However, the solution mentioned here (mapping all possibilities out if you choose door A) does privide a sufficient explanation, if you explain properly that you can see the 2 equal situations as 1 situation (resulting in 1 no switch win and 2 switch wins).
The current solution, as of june 21 2005, is correct.
Scenario A: Select prize; Switching after goat revealed means you lose. Scenario B: Select Goat A; Switching after goat revealed means you win. Scenario C: Select Goat B; Switching after goat revealed means you win.
Scenario A, B and C are equally likely; Switching means you win 2/3 times.
[edit] Merged Puzzles:Goats and sports car
... which was a duplicate solution to this problem. --Kernigh 00:47, 14 February 2006 (UTC)