in reply to Re^5: Marilyn Vos Savant's Monty Hall problem
in thread Marilyn Vos Savant's Monty Hall problem
I'm not sure of the relevance of this. Stats was never my strong suit but...
If the following simulation bears any resemblance to reality (of the re-stated version of the problem), then you only get a greater chance of winning if you always switch your choice after the host opens the first door on the goat.
If at that time you make another choice--either, whether to switch or not, or a random choice between the two remaining doors (which amounts to the same thing?)--then your odds of success remain at 33.33%.
#! perl -slw use strict; use List::Util qw[ shuffle ]; our $TRIALS ||= 1_000_000; my $DIVISOR = $TRIALS / 100; my( $stick, $switch, $newChoice ); for my $try ( 1 .. $TRIALS ) { ## Randomly hide the prizes behind the doors. my @doors = shuffle 'car', 'goat', 'goat'; ## Pick a door my $choice = int rand 3; ## The host opens a door that I didn't pick ## and that isn't the car my $opened = grep{ $_ != $choice and $doors[ $_ ] ne 'car' } 0 .. +2; ## Count my wins if I stick or switch $doors[ $choice ] eq 'car' ? $stick++ : $switch++; ## Make a new choice from the remaining two my $new = ( grep{ $_ != $opened } 0 .. 2 ) [ rand 2 ]; ## And if I make a completely new random choice. $doors[ $new ] eq 'car' and $newChoice++; } printf "Odds of Choose again: %.3f Win if you don't switch: %.3f Win if you do switch: %.3f\n", $newChoice / $DIVISOR, $stick / $DIVISOR, $switch / $DIVISOR; __END__ P:\test>test Odds of Choose again: 33.331 Win if you don't switch: 33.286 Win if you do switch: 66.714 P:\test>test Odds of Choose again: 33.370 Win if you don't switch: 33.353 Win if you do switch: 66.647
Assuming that this simulation isn't at fault, I'd love to see a (preferably layman's terms) explaination for why a predetermined strategy (always switch) would have such an effect on the odds of success?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: Marilyn Vos Savant's Monty Hall problem
by Solo (Deacon) on Aug 23, 2004 at 21:34 UTC | |
|
Re^7: Marilyn Vos Savant's Monty Hall problem
by TrekNoid (Pilgrim) on Aug 23, 2004 at 21:19 UTC | |
|
Re^7: Marilyn Vos Savant's Monty Hall problem
by tilly (Archbishop) on Aug 23, 2004 at 22:22 UTC | |
by tye (Sage) on Aug 24, 2004 at 06:04 UTC | |
by tilly (Archbishop) on Aug 24, 2004 at 15:35 UTC | |
by Aristotle (Chancellor) on Aug 23, 2004 at 22:54 UTC | |
by tilly (Archbishop) on Aug 23, 2004 at 23:04 UTC | |
by BrowserUk (Patriarch) on Aug 23, 2004 at 23:28 UTC | |
by BrowserUk (Patriarch) on Aug 23, 2004 at 22:41 UTC |