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!

]]>That was me arguing for the flaw in the official answer - not a good argument.

But I do not see a flaw in my argument for the "alternative" answer (my first post). Do you?]]>

Thank you for your response, it is more convincing than the one in the official puzzle solution, but I am still unclear about where the flaw in my logic is.

I did know that the host didn't chose the door at random and I don't think I made any assumption about that in my logic.]]>

The game show host knows where the car is. When he/she reveals what is behind a door, this is not a random choice. It has to be a goat door and that's what makes all the difference.

If the first choice (1/3) was the car door, then either remaining door can be revealed, and the contestant will loose the car if a change is made.

But if the first choice was one of the goat doors (2/3) , then the host has to reveal the other goat and a change means a certain win of the car.

Bob

]]>Let me first quote it:

"

Your first choice has a 1/3 chance of having the car, and that does not change.

The other two doors HAD a combined chance of 2/3, but now a Goat has been revealed behind one, all the 2/3 chance is with the other door.

"

The flaw is in the assumption that the 1/3 probability of car behind the door that you originally picked stays as 1/3 after the goat was revealed behind another door.

So let's say I picked door 1 but now door 2 opens and there is a car behind it would you still claim that probability of a car behind door 1 remained 1/3?

The first statement of the official answer is saying that P(c1)=P(c1|g2). Which is incorrect.]]>