From: rar@csl.sri.com (Bob Riemenschneider)
Newsgroups: sci.math
Subject: Re: Equation needed
Date: 9 Nov 92 19:29:30
Organization: Computer Science Lab, SRI International, Menlo Park, CA.
Distribution: USA
NNTP-Posting-Host: birch.csl.sri.com
In-reply-to: regard@hpsdde.sdd.hp.com's message of 5 Nov 1992 11:58:31 -0800

In article <1dbud7INNsli@hpsdde.sdd.hp.com> regard@hpsdde.sdd.hp.com (Adrienne Regard) writes:

>   From: regard@hpsdde.sdd.hp.com (Adrienne Regard)
>   Newsgroups: sci.math
>   Subject: Equation needed
>
>   ...  The person has a better chance of winning the
>   grand prize if he switches, but I don't know how to write the equation to
>   express the probabilities, and I've got a very excited friend who wants
>   proof on this subject. ...

If your only objective is to convince someone who doesn't believe it,
you're out of luck.  There's been a lot of discussion of this in the
past, and no one ever seems to convince anyone (s)he's wrong.  Let me argue for
switching using only one "equation", the definition of conditional probability

   P(A | B) = P(A & B) / P(B)

Here's my model.  Three independent choices are made, at random.  Carol
flips a three-sided fair coin to decide where to put the grand prize;
call the outcomes GP1, GP2, and GP3.  Monty flips a two-sided coin to
decide which goat to reveal if you pick the door with the grand prize
behind it; call the outcomes F1 (for "reveal the lower numbered goat")
and F2 (for "reveal the higher numbered goat").  You flip a three-sided
fair coin to decide which door to pick; call the outcomes C1, C2, and
C3.  All eighteen outcomes

   GP1 & C1 & F1 
   GP1 & C1 & F2
   GP1 & C2 & F1
   GP1 & C2 & F2
   GP1 & C3 & F1
   GP1 & C3 & F2
   GP2 & C1 & F1
   GP2 & C1 & F2
   GP2 & C2 & F1
   GP2 & C2 & F2
   GP2 & C3 & F1
   GP2 & C3 & F2
   GP3 & C1 & F1
   GP3 & C1 & F2
   GP3 & C2 & F1
   GP3 & C2 & F2
   GP3 & C3 & F1
   GP3 & C3 & F2
   
are equally likely before the flips.  Hence

   P(GP1 & C1 & F1) = 1/18
   P(GP1 & C1 & F2) = 1/18
   P(GP1 & C2 & F1) = 1/18
   P(GP1 & C2 & F2) = 1/18
   P(GP1 & C3 & F1) = 1/18
   P(GP1 & C3 & F2) = 1/18
   P(GP2 & C1 & F1) = 1/18
   P(GP2 & C1 & F2) = 1/18
   P(GP2 & C2 & F1) = 1/18
   P(GP2 & C2 & F2) = 1/18
   P(GP2 & C3 & F1) = 1/18
   P(GP2 & C3 & F2) = 1/18
   P(GP3 & C1 & F1) = 1/18
   P(GP3 & C1 & F2) = 1/18
   P(GP3 & C2 & F1) = 1/18
   P(GP3 & C2 & F2) = 1/18
   P(GP3 & C3 & F1) = 1/18
   P(GP3 & C3 & F2) = 1/18

Now everyone flips, and the outcome is determined once you switch or
decline to switch.  First, you look at your coin -- suppose it's C1
-- and that allows you to update the possible outcomes' probabilities.

   P(GPi & Cj & Fk | C1) = P(GPi & Cj & Fk & C1) / P(C1)

So

   P(GP1 & C1 & F1 | C1) = P(GP1 & C1 & F1 & C1) / P(C1) = (1/18)/(1/3) = 1/6
   P(GP1 & C1 & F2 | C1) = P(GP1 & C1 & F2 & C1) / P(C1) = (1/18)/(1/3) = 1/6
   P(GP1 & C2 & F1 | C1) = P(GP1 & C2 & F1 & C1) / P(C1) = 0/(1/3) = 0
   P(GP1 & C2 & F2 | C1) = P(GP1 & C2 & F2 & C1) / P(C1) = 0/(1/3) = 0
   P(GP1 & C3 & F1 | C1) = P(GP1 & C3 & F1 & C1) / P(C1) = 0/(1/3) = 0
   P(GP1 & C3 & F2 | C1) = P(GP1 & C3 & F2 & C1) / P(C1) = 0/(1/3) = 0
   P(GP2 & C1 & F1 | C1) = P(GP2 & C1 & F1 & C1) / P(C1) = (1/18)/(1/3) = 1/6
   P(GP2 & C1 & F2 | C1) = P(GP2 & C1 & F2 & C1) / P(C1) = (1/18)/(1/3) = 1/6
   P(GP2 & C2 & F1 | C1) = P(GP2 & C2 & F1 & C1) / P(C1) = 0/(1/3) = 0
   P(GP2 & C2 & F2 | C1) = P(GP2 & C2 & F2 & C1) / P(C1) = 0/(1/3) = 0
   P(GP2 & C3 & F1 | C1) = P(GP2 & C3 & F1 & C1) / P(C1) = 0/(1/3) = 0
   P(GP2 & C3 & F2 | C1) = P(GP2 & C3 & F2 & C1) / P(C1) = 0/(1/3) = 0
   P(GP3 & C1 & F1 | C1) = P(GP3 & C1 & F1 & C1) / P(C1) = (1/18)/(1/3) = 1/6
   P(GP3 & C1 & F2 | C1) = P(GP3 & C1 & F2 & C1) / P(C1) = (1/18)/(1/3) = 1/6
   P(GP3 & C2 & F1 | C1) = P(GP3 & C2 & F1 & C1) / P(C1) = 0/(1/3) = 0
   P(GP3 & C2 & F2 | C1) = P(GP3 & C2 & F2 & C1) / P(C1) = 0/(1/3) = 0
   P(GP3 & C3 & F1 | C1) = P(GP3 & C3 & F1 & C1) / P(C1) = 0/(1/3) = 0
   P(GP3 & C3 & F2 | C1) = P(GP3 & C3 & F2 & C1) / P(C1) = 0/(1/3) = 0

Next, Monty reveals not the outcome of the coin flip, but a door with a
goat behind it.  Suppose he opens Door Number 2.

   P(GPi & Cj & Fk | C1 & D2)
        = P(GPi & Cj & Fk & C1 & D2) / P(C1 & D2)

so we just need to compute P(C1 & D2).  Now

   GP1 & C1 & F1 => D2
   GP1 & C1 & F2 => D3
   GP1 & C2 & F1 => D3
   GP1 & C2 & F2 => D3
   GP1 & C3 & F1 => D2
   GP1 & C3 & F2 => D2
   GP2 & C1 & F1 => D3
   GP2 & C1 & F2 => D3
   GP2 & C2 & F1 => D1
   GP2 & C2 & F2 => D3
   GP2 & C3 & F1 => D1
   GP2 & C3 & F2 => D1
   GP3 & C1 & F1 => D2
   GP3 & C1 & F2 => D2
   GP3 & C2 & F1 => D1
   GP3 & C2 & F2 => D1
   GP3 & C3 & F1 => D1
   GP3 & C3 & F2 => D2

C1 & D2 are true in cases 1, 13, and 14 only, so P(C1 & D2) = 3/18.
Therefore, 

   P(GP1 & C1 & F1 | C1 & D2) = (1/18)/(3/18) = 1/3
   P(GP1 & C1 & F2 | C1 & D2) = 0/(3/18)
   P(GP1 & C2 & F1 | C1 & D2) = 0/(3/18)
   P(GP1 & C2 & F2 | C1 & D2) = 0/(3/18)
   P(GP1 & C3 & F1 | C1 & D2) = 0/(3/18)
   P(GP1 & C3 & F2 | C1 & D2) = 0/(3/18)
   P(GP2 & C1 & F1 | C1 & D2) = 0/(3/18)
   P(GP2 & C1 & F2 | C1 & D2) = 0/(3/18)
   P(GP2 & C2 & F1 | C1 & D2) = 0/(3/18)
   P(GP2 & C2 & F2 | C1 & D2) = 0/(3/18)
   P(GP2 & C3 & F1 | C1 & D2) = 0/(3/18)
   P(GP2 & C3 & F2 | C1 & D2) = 0/(3/18)
   P(GP3 & C1 & F1 | C1 & D2) = (1/18)/(3/18) = 1/3
   P(GP3 & C1 & F2 | C1 & D2) = (1/18)/(3/18) = 1/3
   P(GP3 & C2 & F1 | C1 & D2) = 0/(3/18)
   P(GP3 & C2 & F2 | C1 & D2) = 0/(3/18)
   P(GP3 & C3 & F1 | C1 & D2) = 0/(3/18)
   P(GP3 & C3 & F2 | C1 & D2) = 0/(3/18)

So, should you switch?  There is one chance in three that you have chosen
the grand prize and should not switch; there are two chances in three
that that you have not chosen the grand prize and should switch.
Therefore, you should switch.  The bottom line comes out the same for
the other possibilities -- C1 and D3, C2 and D1, C2 and D3, C3 and D1,
and C3 and D2 -- so, no matter what happens, you should switch.  Q.E.D.

The argument that there's no point in switching -- after choosing, you
know the next thing that happens is that Monty will open a door to reveal
a goat, so his doing so provides no reason to switch -- is compelling.
(But I'll be happy to play, say, 10000 rounds of this game against your
friend, with me using the "always switch" strategy, him/her using the
"always stand" strategy, and me making her/his pots 10% larger than
(s)he makes mine, any time, for any stakes (s)he'd care to name!!)

                                                        -- rar

Newsgroups: sci.math,sci.physics,sci.astro,sci.bio,sci.chem,misc.education