User:Martin Hogbin/Monty Hall ananlysis

This page is my version of a more complete analysis of the Monty Hall problem The calculated probabilities that the player will win by switching are shown after the headings for each case. The contents therefore serves as a summary of the results.

The results clearly show that Morgan's solution only applies in the case where:

The stochastic variables C, X and A describe the problem: C = number of door with car, X = number of door of player's initial choice and A = number of door opened by host.
 * 1) The producer has acted randomly in that the car is initially randomly placed.
 * 2) The host has not acted randomly in that he may choose non-randomly which door to open.
 * 3) The problem identifies the door that the host has, in fact, opened

=Initial placement of the car=

P(C=1) + P(C=2) + P(C=3) =1

=The player's initial choice of door=

The player's initial choice are similarly P(X=1), P(X=2), P(X=3)

P(X=1) + P(X=2) + P(X=3) =1

The placing of the car and the player's choice are independent.

=The host's door opening probabilities=

Here we assume that the host has a fixed set of rules for deciding which door to open. These rules are set in part by the rules of the game. We assume that these probabilities are fixed and are thus independent of the subsequent location of the car and the player's choice of door.

We represent this by a set of probabilities Pijk where i is the door the host opens j is the door the car is behind k is the door the player chooses

So P123 is the probability that the host will open door 1 if the car is behind door 2 and the player chooses door 3

meaning the car is behind door j, the player initially chooses door k, and the host opens door i with probability:
 * P(C=j,X=k,A=i) = Pijk P(C=j,X=k) = Pijk P(C=j)P(X=k)

=The sample space and its probability distribution=

The sample space thus consists of 27 possible events of the form C=j,X=k,A=i

The probability of any event P(C=j,X=k,A=i) is given by P(C=j) P(X=j) Pijk

In other words the probability that the car is behind door j, the player picks door k and the host opens door i is given by multiplying the probability that the car is behind door j by the probability that the player picks door k by the probability that that in that case the host will open door i in the case that the car is behind door j and the player picks door k.

=Some game rules= The host must open a door means that for all jk:

P1jk+P2jk+P3jk=1

The host must not reveal a car means:

Pijk = 0 if i=j

Combining the above rules we have:

P211 + P311 = 1 P212 + P312 = 1 P213 + P313 = 1 P121 + P321 = 1 P122 + P322 = 1 P123 + P323 = 1 P131 + P231 = 1 P132 + P232 = 1 P133 + P233 = 1

The host cannot open the door that the player has chosen means that:

Pijk=0 if i=k

Thus:

P211 + P311 = 1 P312 = 1 P213 = 1 P321 = 1 P122 + P322 = 1 P123 = 1 P231 = 1 P132 = 1<Br> P133 + P233 = 1<Br>

=Probability of winning by switching in various cases=

The producer places the car randomly, the player chooses randomly and the host acts non-randomly
If the car is randomly placed and the player chooses randomly

P(C=j)=1/3 and P(X=k)=1/3 Assuming X and C to be independent, the probability distribution in the above sample space is:
 * P(C=1)= P(C=2)=P(C=3)= 1/3

and
 * P(X=1)= P(X=2)=P(X=3)= 1/3

Thus P(C=1, X=1, A=2) = P211 /9

Unconditional probability 2/3
The player wins by sticking if X=C otherwise the player wins by switching.

Probability that the player wins by sticking is
 * P(X=C)=P(X=C=1)+P(X=C=2)+P(X=C=3)=3/9

This result may also be found by summing the probabilities Pijk/9 for all events in the sample space in which j=k:


 * (P211 + P311 + P122 + P322 + P133 + P233)/9 = 1/3

Probability that the player wins by switching is found by summing the probabilities for all events in the sample space in which j<>k

(P312 + P213 + P321 + P123 + P231 + P132)/9 = 2/3

Probability on the condition that the host has opened a door to reveal a goat 2/3
Do Morgan intend their analysis to apply to this case, on the basis that the player can see the door number even though we are not told what it is?

This means conditioning on {A&ne;C}, and as P(A&ne;C)=1, the conditional probabilities will be the same as the unconditional ones. First we condition the above sample space by removing all events in which the condition is not met. We note that, under the stated game rules, these all already have zero probability thus thus this condition is a null condition - it has no effect. The result is exactly the same as the unconditional case. Probability that the player wins by sticking is found by summing the probabilities for all events in the sample space in which j=k

(P211 + P311 + P122 + P322 + P133 + P233)/9 = 1/3

Probability that the player wins by switching is found by summing the probabilities for all events in the sample space in which j<>k

(P312 + P213 + P321 + P123 + P231 + P132)/9 = 2/3

Probability on the condition that the player has chosen door 1 and the host has opened a door to reveal a goat 2/3
First we condition the above sample space by removing all events in which the condition is not met and renormalizing.

We now have only four events in our sample space

(A=3,C=1,X=1) (A=3, C=2, X=1) (A=2,C=1,X=1)  (A=2, C=3, X=1) with probabilities: with probabilites P311/3 P321/3 P211/3 P231/3 respectively

Probability that the player wins by sticking is found by summing the probabilities for all events in the sample space in which j=k

(P211 + P311 )/3 = 1/3

Note that Morgan set P211 = p and P311 = q = 1 - p giving

(p + 1 - p) /3 =1/3 and this is independent of any preference the host may have for any door

Probability that the player wins by switching is found by summing the probabilities for all events in the sample space in which j<>k

( P321 + P231 + )/3 = 2/3 (also independent if any host door preference)

Probability on the condition that the player has chosen door 1 and the host has opened door 3 to reveal a goat 1/(q+1)
''This is a case that Morgan's analysis could apply to. Morgan do not state that the producer places the car randomly or that the host chooses randomly, although they do mention after the solution the possibility of non-random car placement. For some unexplained reason in their solution they take it that the producer places the car randomly but the host chooses non-randomly.''

First we condition the above sample space by removing all events in which the condition is not met and renormalizing.

We now have only two events in our sample space these are:

(A=3,C=1,X=1) and (A=3, C=2, X=1)

With probabilites P311/N and P321/N Where N is the normalisation factor

Where P(A=3,C=1,X=1) + P(A=3, C=2, X=1) = 1

Giving N= P311 + 321

Probability that the player wins by sticking is found by summing the probabilities for all events in the sample space in which j=k

it is equal to P311 / (P311 + P321)

Probability that the player wins by switching is found by summing the probabilities for all events in the sample space in which j<>k

it is equal to P321 / P311 + P321)

We know that P321 = 1 and if we set P321 = q then

The probability that the player wins by switching is 1 / (q + 1)

Which is exactly Morgan's solution

The producer places the car randomly, the player chooses randomly and the host acts randomly
If the car is randomly placed and the player chooses randomly

P(C=j)=1/3 and P(X=k)=1/3 Assuming X and C to be independent, the probability distribution in the above sample space is:
 * P(C=1)= P(C=2)=P(C=3)= 1/3

and
 * P(X=1)= P(X=2)=P(X=3)= 1/3

Thus P(C=1, X=1, A=2) = P211 /9

As the host acts randomly

P211 = P311 = 1/2<Br> P312 = 1<Br> P213 = 1<Br> P321 = 1<Br> P122 = P322 = 1/2<Br> P123 = 1<Br> P231 = 1<Br> P132 = 1<Br> P133 = P233 = 1/2<Br>

Unconditional probability 2/3
The player wins by sticking if X=C otherwise the player wins by switching.

Probability that the player wins by sticking is
 * P(X=C)=P(X=C=1)+P(X=C=2)+P(X=C=3)=3/9

This result may also be found by summing the probabilities Pijk/9 for all events in the sample space in which j=k:

(P211 + P311 + P122 + P322 + P133 + P233)/9 = =( 1/2 + 1/2 + 1/2 + 1/2 + 1/2 + 1/2)/9 = 1/3

Probability that the player wins by switching is found by summing the probabilities for all events in the sample space in which j<>k

(P312 + P213 + P321 + P123 + P231 + P132)/9 = 2/3

Probability on the condition that the host has opened a door to reveal a goat 2/3
This means conditioning on {A&ne;C}, and as P(A&ne;C)=1, the conditional probabilities will be the same as the unconditional ones.

First we condition the above sample space by removing all events in which the condition is not met. We note that, under the stated game rules, these all already have zero probability thus thus this condition is a null condition - it has no effect. The result is exactly the same as the unconditional case. Probability that the player wins by sticking is found by summing the probabilities for all events in the sample space in which j=k

(P211 + P311 + P122 + P322 + P133 + P233)/9 = =( 1/2 + 1/2 + 1/2 + 1/2 + 1/2 + 1/2)/9 = 1/3

Probability that the player wins by switching is found by summing the probabilities for all events in the sample space in which j<>k

(P312 + P213 + P321 + P123 + P231 + P132)/9 = 2/3

Probability on the condition that the player has chosen door 1 and the host has opened a door to reveal a goat 2/3
First we condition the above sample space by removing all events in which the condition is not met and renormalizing.

We now have only four events in our sample space

(A=3,C=1,X=1) (A=3, C=2, X=1) (A=2,C=1,X=1)  (A=2, C=3, X=1) with probabilities: with probabilites P311/3 P321/3 P211/3 P231/3 respectively

Probability that the player wins by sticking is found by summing the probabilities for all events in the sample space in which j=k

(211 + P311 )/3 = 1/3 =(1/2 + 1/2)/3 = 1/3

Probability that the player wins by switching is found by summing the probabilities for all events in the sample space in which j<>k

( P321 + P231 + )/3 = 2/3 (also independent if any host door preference) =( 1 + 1 )/3 = 2/3

Probability on the condition that the player has chosen door 1 and the host has opened door 3 to reveal a goat 2/3
First we condition the above sample space by removing all events in which the condition is not met and renormalizing.

We now have only two events in our sample space these are:

(A=3,C=1,X=1) and (A=3, C=2, X=1)

With probabilities P311/N and P321/N Where N is the normalization factor

Where P(A=3,C=1,X=1) + P(A=3, C=2, X=1) = 1

Giving N= P311 + 321

Probability that the player wins by sticking is found by summing the probabilities for all events in the sample space in which j=k

it is equal to P311 / (P311 + P321)

Probability that the player wins by switching is found by summing the probabilities for all events in the sample space in which j<>k

it is equal to P321 / P311 + P321)

We know that P321 = 1 and P321 = 1/2 then

The probability that the player wins by switching is 1 / (1/2 + 1) = 2/3

The producer places the car randomly, the player chooses non-randomly and the host acts non-randomly
Here we see that, provided the car is randomly placed, the choice of the player has no effect. The player could, for example, always choose door 1 without affecting the result.

If the car is randomly placed

P(C=j)=1/3 and Assuming X and C to be independent, the probability distribution in the above sample space is:
 * P(C=1)= P(C=2)=P(C=3)= 1/3

Also P(X=1) + P(X=2) + P(X=3) = 1

Thus, for example, P(C=1, X=1, A=2) = P211P(X=k) /3

Unconditional probability 2/3
The player wins by sticking if X=C otherwise the player wins by switching.

Probability that the player wins by sticking is may be found by summing the probabilities PijkP(X=k)/3 for all events in the sample space in which j=k:

Let P211 = a, P322 = b and P133 = c Let P(X=1) = u, P(X=2) = v so P(X=3) = 1 - u - v

(ua + u(1-a) + v(1-b) + vb + (1-u-v)c + (1-u-v)(1-c))/3 =

(u + v + 1 -u - v )/3 =1/3

Probability that the player wins by switching is therefore 2/3

Probability on the condition that the player has chosen door 1 and the host has opened a to reveal a goat 2/3
First we condition the above sample space by removing all events in which the condition is not met. We note that, under the stated game rules, these all already have zero probability thus thus this condition is a null condition - it has no effect. The result is exactly the same as the unconditional case. The result is therefore the same as above.

Probability on the condition that the player has chosen door 1 and the host has opened door 3 to reveal a goat 1/(1-q)
First we condition the above sample space by removing all events in which the condition is not met and renormalizing.

We now have only two events in our sample space these are:

(A=3,C=1,X=1) and (A=3, C=2, X=1)

With probabilities P(X-1)P311/N and P(X=1)P321/N Where N is the normalisation factor

Where P(A=3,C=1,X=1) + P(A=3, C=2, X=1) = 1

Giving N= P(X=1) (P311 + 321)

Probability that the player wins by sticking is found by summing the probabilities for all events in the sample space in which j=k

it is equal to P(X=1)P311 / P(X=1)(P311 + P321)

Probability that the player wins by switching is found by summing the probabilities for all events in the sample space in which j<>k

it is equal to P(X=1)P321 / P(X=1) (P311 + P321)

We know that P321 = 1 and if we set P321 = q then

The probability that the player wins by switching is 1 / (q + 1)

Which is the same as Morgan's solution

The producer places the car non-randomly, the player chooses randomly and the host acts non-randomly
If the player chooses randomly

P(X=j)=1/3 and Assuming X and C to be independent, the probability distribution in the above sample space is:
 * P(X=1)= P(X=2)=P(X=3)= 1/3

Also P(C=1) + P(C=2) + P(C=3) = 1

Thus, for example, P(C=1, X=1, A=2) = P211P(C=j) /3

Unconditional probability 2/3
The player wins by sticking if X=C otherwise the player wins by switching.

Probability that the player wins by sticking is may be found by summing the probabilities PijkP(X=k)/3 for all events in the sample space in which j=k:

Let P211 = a, P322 = b and P133 = c Let P(C=1) = f, P(C=2) = g so P(C=3) = 1 - f - g

(fP211 + fP311 + gP122 + gP322 + (1-f-g)P133 + (1-f-g)P233)/3

(fa + f(1-a) + g(1-b) + gb + (1-f-g)c + (1-f-g)(1-c))/3 =

( f + g + 1 - f - g )/3 =1/3

Probability that the player wins by switching is therefore 2/3

Probability on the condition that the player has chosen door 1 and the host has opened a to reveal a goat 2/3
First we condition the above sample space by removing all events in which the condition is not met. We note that, under the stated game rules, these all already have zero probability thus thus this condition is a null condition - it has no effect. The result is exactly the same as the unconditional case. The result is therefore the same as above.

Probability on the condition that the player has chosen door 1 and the host has opened door 3 to reveal a goat - not 1/(1-q) or 2/3
''This is a case that Morgan's analysis could apply to. Morgan do not state that the producer places the car randomly or that the host chooses randomly, although they do mention after the solution the possibility of non-random car placement. For some unexplained reason in their solution they take it that the producer places the car randomly but the host chooses non-randomly.''

First we condition the above sample space by removing all events in which the condition is not met and renormalizing.

We now have only two events in our sample space these are:

(A=3,C=1,X=1) and (A=3, C=2, X=1)

With probabilities P(C=1)P311/N and P(C=2)P321/N Where N is the normalisation factor

Where P(A=3,C=1,X=1) + P(A=3, C=2, X=1) = 1

Giving N= P(C=1)P311 + P(C=2)321)

Probability that the player wins by sticking is found by summing the probabilities for all events in the sample space in which j=k

it is equal to P(C=1)P311 / (P(C=1)P311 + P(C=2)321))

Note that this is not equal to 1/3 and is not Morgan's solution. Unsurprisingly it depends also on the probability that the car was placed behind door 1.

Probability that the player wins by switching is the complement of this.

The producer places the car non-randomly, the player chooses non-randomly and the host acts non-randomly
UNDER CONSTRUCTION

The producer places the car non-randomly, the player chooses non-randomly and the host acts non-randomly
UNDER CONSTRUCTION

P(X=1)+ P(X=2) + P(X=3)= 1 P(X=1)+ P(X=2) + P(X=3)= 1

Assuming X and C to be independent, the probability distribution in the above sample space is:

Thus, for example, P(C=1, X=1, A=2) = P211P(C=j)P(X=1)

Unconditional probability 2/3
The player wins by sticking if X=C otherwise the player wins by switching.

Probability that the player wins by sticking is may be found by summing the probabilities PijkP(X=k)P(C=j) for all events in the sample space in which j=k:

Let P211 = a, P322 = b and P133 = c

Let P(X=1) =u, P(X=2) = v so P(X=3) = 1 - u - v

Let P(C=1) = f, P(C=2) = g so P(C=3) = 1 - f - g

(fuP211 + fuP311 + gvP122 + gvP322 + (1-f-g)(1-u-v)P133 + (1-f-g)(1-u-v)P233)

(fua + fu(1-a) + gv(1-b) + gvb + (1-f-g)(1-u-v)c + (1-f-g)(1-u-v)(1-c)) =

fu + gv + (1-f-g)(1-u-v)

Which is not equal to 1/3 and can be any value from 0 to 1 depending on f,g,u, and v

Probability that the player wins by switching is therefore 2/3

Probability on the condition that the player has chosen door 1 and the host has opened a to reveal a goat 2/3
First we condition the above sample space by removing all events in which the condition is not met.

Probability of winning by switching is fu. This may have any value from 0 to 1.

Probability on the condition that the player has chosen door 1 and the host has opened door 3 to reveal a goat - not 1/(1-q) or 2/3
First we condition the above sample space by removing all events in which the condition is not met and renormalizing.

We now have only two events in our sample space these are:

(A=3,C=1,X=1) and (A=3, C=2, X=1)

With probabilities P(C=1)P311/N and P(C=2)P321/N Where N is the normalisation factor

Where P(A=3,C=1,X=1) + P(A=3, C=2, X=1) = 1

Giving N= P(C=1)P(X=1(P311 + P(C=2)P(X=1)P321)

Probability that the player wins by sticking is found by summing the probabilities for all events in the sample space in which j=k

it is equal to P(C=1)P(X=1)P311 / (P(C=1)P(X=1)P311 + P(C=2)P(X=1)321))

Note that this is not equal to 1/3 and is not Morgan's solution. Unsurprisingly it depends also on the probability that the car was placed behind door 1 and the probability that that the player has chosen door 1.

Probability that the player wins by switching is the complement of this.

=

Probability that the player wins by switching is therefore 2/3

Probability on the condition that the player has chosen door 1 and the host has opened a to reveal a goat 2/3
First we condition the above sample space by removing all events in which the condition is not met. We note that, under the stated game rules, these all already have zero probability thus thus this condition is a null condition - it has no effect. The result is exactly the same as the unconditional case. The result is therefore the same as above.

Probability on the condition that the player has chosen door 1 and the host has opened door 3 to reveal a goat - not 1/(1-q) or 2/3
''This is a case that Morgan's analysis could apply to. Morgan do not state that the producer places the car randomly or that the host chooses randomly, although they do mention after the solution the possibility of non-random car placement. For some unexplained reason in their solution they take it that the producer places the car randomly but the host chooses non-randomly.''

First we condition the above sample space by removing all events in which the condition is not met and renormalizing.

We now have only two events in our sample space these are:

(A=3,C=1,X=1) and (A=3, C=2, X=1)

With probabilities P(C=1)P311/N and P(C=2)P321/N Where N is the normalisation factor

Where P(A=3,C=1,X=1) + P(A=3, C=2, X=1) = 1

Giving N= P(C=1)P311 + P(C=2)321)

Probability that the player wins by sticking is found by summing the probabilities for all events in the sample space in which j=k

it is equal to P(C=1)P311 / (P(C=1)P311 + P(C=2)321))

Note that this is not equal to 1/3 and is not Morgan's solution. Unsurprisingly it depends also on the probability that the car was placed behind door 1.

Probability that the player wins by switching is the complement of this.