http://i602.photobucket.com/albums/tt105/GeorgeLaw5/TheCuriousIncidentOfTheDogInTheNightTime.jpg

From

The Curious Incident of the Dog in the Night-Timeby Mark Haddon (2003), published by Vintage (2004).

Thank you, finally I understand why switching choices increase the probability. Took me one year to figure it out.

]]>Let's say I originally picked door 1 then door 2 was opened showing the goat so we want to calculate probability of car behind door 1 given that door 2 has a goat and probability of car behind door 3 given that door 2 has a goat.

The flaw in your problem definition is the condition *"given that door 2 has a goat"*, it should be *"given Monty opens Door 2"*

.

If we call the 'probability that Monty opens Door 2', p(g2), then:

p(g2) = (1/3*1) + (1/3 * 1/2) + (1/3 * 0) = 1/2 and

p(g2)|(c1) = 1/2 and p(g2)|(c3) = 1

Plug those values into Bayes and you get 1/3 and 2/3

]]>```
>>> import random
>>> def pickbag():
bag = random.randrange(1,4)
if bag == 1:
return ['W','B'] #return a bag with a white and a black marble
elif bag == 2:
return ['W', 'W']
else:
return ['B', 'B']
>>> def pickmarble(bag):
return random.choice(bag) #pick a random marble from the given bag
>>> def seeiftheothermarbleiswhite():
bag = pickbag()
marble = pickmarble(bag)
if marble == 'W':
if bag == ['W','W']:
return True # First Marble AND second marble white
else:
return False # Only First Marble White
else:
return None #First marble is not white, aborting
```

Now, lets do the experiment 1 00 000 times and Mark the cases as Yes when the other marble are white, No when only the First marble is white, Other when the first is not white.

```
>>> Yes = 0
>>> No = 0
>>> Other = 0
>>> for i in xrange(100000):
a = seeiftheothermarbleiswhite()
if a:
Yes += 1
elif a == False:
No += 1
else:
Other += 1
```

Now, since we are dealing only with cases when the first marble is white:

```
>>> Yes
33351
>>> No
16533
>>> Other
50116
```

```
>>> Yes/float(Yes + No)
0.6685710849170075
```

Now, that is very close to 2/3 and the rest is experimental error

]]>The problem seems to be counter-intuitive to me too. Though I understand the Monte Hall, this version is harder.

However, now since the immediate requirement is to know who is right and who is wrong, we need to resort to some bobbym philosophy, i.e, experimental verification.

]]>Your edition of the book is probably different from mine; mine was published by Vintage. In that chapter of the novel, the narrator proved the Monty Hall problem in two ways: using the tree diagram, and by Bayess theorem.

]]>That is my favorite book but I do not have that diagram?! Did Chris speak about it?

]]>From *The Curious Incident of the Dog in the Night-Time* by Mark Haddon (2003), published by Vintage (2004).

So what was wrong with your Bayes?

I think you have the order wrong:

(i) A door is picked.

(ii) The host reveals a goat behind another door.

So let's say you pick a door.

Case one: P(it has a car) = 1/3

Now the host has to reveal a goat. That's easy because both remaining doors have goats, let's call them G1 and G2

P(G1 given car) = 1/2 ..... P (G2 given car) = 1/2

So if you choose to switch you will lose with P = 1/3 x 1/2 + 1/3 x 1/2 = 1/6 + 1/6 = 1/3

Case two: P(it has a goat) = 2/3

Now the host has no choice; he must reveal the remaining goat P(goat given goat) = 1

So if you choose to switch you win with P = 2/3 x 1 = 2/3

Bob

ps. I prefer tree diagrams to Bayes as it is easier to see what is happening without specialist knowledge and tree diagrams are much more versatile (you can have many events and more than two outcomes at each stage).

]]>Anyway, it is too bad that no one remembers the movie "Let's Make Love" with Yves Montand and Marilyn Monroe. In it Marilyn sings the "Specialization" number. How does this relate to anything in particular you might ask? I am glad you asked that question, you see when I saw how easily Marilyn Vos Savant did the problem by treeing it I changed the wording of the song to Computation, computation, you'll rule the barnyard if you compute, whoo hoo hoo hoo.

]]>Even the great Paul Erdos could not believe the answer!

I cannot blame him. It is very counter-intuitive!

]]>The first time I saw this problem is when it appeared in Parade magazine which was printed in Vegas on a Sunday. It pitted alleged super genius Marilyn Vos Savant against several mathematicians. Marilyn said switch and here is why:

http://marilynvossavant.com/game-show-problem/

Neither side knew or maybe Marilyn did that this was published in a rather famous Statistics journal circa 1975. It contained Marilyn's proof.

When you tree this as she did and the statisticians before her did you will see she is right provided Monty knows where the car is.

http://en.wikipedia.org/wiki/Monty_Hall_problem

The role of Monty is underestimated by many. Even the great Paul Erdos could not believe the answer!

]]>