[REBOL] Re: My Statistical Thoughts on Monty Hall Problem (non-REBOL)
From: joel:neely:fedex at: 20-Dec-2001 0:15
Hi, Alan,
alan parman wrote:
> Here is my speculation on the Monty Hall Problem.
>
> [REBOL-content-less discussion about Probability follows]:
... snipped ...
The thread discussing this puzzle has provided many examples
of the difference between "common-sense" reasoning and
Mathematical analysis. In problems like this one, verbal
persuasion counts for naught compared with actual, inarguable
logic. (The same can be said for program proof, but that's
a different flame war... ;-)
When all else fails, resort to brute force! In analysis of
probabilities, that means a decision tree which traces the
succession of choices (which door hides the prize, which
door the contestant chooses, which door Monty opens), along
with the joint probabilities of the paths through the tree:
+-- m=2 (1/2:1/18) case 1
+-- c=1 (1/3:1/9) --+
| +-- m=3 (1/2:1/18) case 2
|
+-- p=1 (1/3:1/3) --+-- c=2 (1/3:1/9) ----- m=3 (1/1: 1/9) case 3
| |
| +-- c=3 (1/3:1/9) ----- m=2 (1/1: 1/9) case 4
|
| +-- c=1 (1/3:1/9) ----- m=3 (1/1: 1/9) case 5
| |
| | +-- m=1 (1/2:1/18) case 6
--+-- p=2 (1/3:1/3) --+-- c=2 (1/3:1/9) --+
| | +-- m=3 (1/2:1/18) case 7
| |
| +-- c=3 (1/3:1/9) ----- m=1 (1/1: 1/9) case 8
|
|
| +-- c=1 (1/3:1/9) ----- m=2 (1/1: 1/9) case 9
| |
+-- p=3 (1/3:1/3) --+-- c=2 (1/3:1/9) ----- m=1 (1/1: 1/9) case 10
|
| +-- m=1 (1/2:1/18) case 11
+-- c=3 (1/3:1/9) --+
+-- m=2 (1/2:1/18) case 12
The tree above assumes that all choices are made "fairly", in that
all possible outcomes of a single decision are equally likely.
Therefore, to take a couple of specific examples:
* In case 1, the prize is behind door 1 (p=1). This can happen
one-third of the time, so the probability is 1/3. Then the
contestant chooses door 1 (c=1). This can happen one-third
of the time, so the cumulative probability is 1/9 (1/3 * 1/3).
Monty chooses to open door 2 (m=2). Since he could have
opened either 2 or 3 (since the prize is behind door 1 and the
contestant picked door 1), Monty's choice of door 2 happens
half of the time UNDER THESE CIRCUMSTANCES, producing a
cumulative probability of 1/18 for case 1.
* In case 8, the prize is behind door 2 (p=2), which can happen
one-third of the time; net probability is 1/3. Then the
contestant picks door 3 (c=3), which can happen one-third of
the time; net probability 1/9. Monty has no choice but to
open door 1 (m=1), which must happen every time UNDER THESE
CIRCUMSTANCES, producing a net probability of 1/9 for case 8.
For which cases does the "stay with your first choice" strategy
win the prize? In cases 1, 2, 6, 7, 11, and 12 (the ones in
which the contestant picked the right door, after which it makes
no difference which other door Monty opens). Each of those six
cases has a net/cumulative probability of 1/18. Since they are
mutually exclusive, their sum of 6/18 or 1/3 is the probability
that the "first choice" strategy wins.
For which cases does the "always switch AFTER Monty opens a
door" strategy win the prize? In all of the remaining cases,
3, 4, 5, 8, 9, and 10! Each of *these* cases has a net/cumulative
probability of 1/9. Since they are mutually exclusive, their sum
of 6/9 or 2/3 is the probability that the "always switch" strategy
wins the prize.
QED.
Having done this analysis, we ought to be able to see the argument
by symmetry.
Whatever door the contestant picks initially has a 1/3 chance of
being right. Therefore the contestant who always stays with his
first choice has a 1/3 chance of winning.
After Monty opens a door, the contestant knows that the opened
door did not contain the prize. His first pick STILL has only
a 1/3 chance of being right. Since one of the two remaining
choices has now been eliminated by Monty, the (only!) other
unopened door now has a 2/3 chance of being the right one.
Many "common sense" analyses fall down in assuming that all of
these choices are completely independent. In fact, Monty's
option(s) for which door to open will be dependent on both
the prize door and the contestant's choice. Therefore some
knowledge about the state of the game is "leaked" by Monty's
action.
This sort of probabilistic "leakage" is behind a large number
of security and cryptographic attacks, FWIW.
-jn-
--
; sub REBOL {}; sub head ($) {@_[0]}
REBOL []
# despam: func [e] [replace replace/all e ":" "." "#" "@"]
; sub despam {my ($e) = @_; $e =~ tr/:#/.@/; return "\n$e"}
print head reverse despam "moc:xedef#yleen:leoj" ;