The
Monty Hall problem is one of my favorites. I came across
How to solve the Monty Hall problem using Bayesian inference, which used my other favorite topic, Bayesian inference. My only criticism of the post is that P(E) is a little confusing. The following formulation with separate P(B*) and P(C*) notation suits me better:
P(B*) = Probability that Monty will open door B (given that the user has chosen door A) = 1/2
P(C*) = Probability that Monty will open door C (given that the user has chosen door A) = 1/2
P(C*/B) = Probability that Monty will open door C (given that the user has chosen door A
and car is behind door B) = 1/1
P(C*/A) = Probability that Monty will open door C (given that the user has chosen door A
and car is behind door A) = 1/2
P(B*/C) = Probability that Monty will open door B (given that the user has chosen door A
and car is behind door C) = 1/1
P(A/B*) = Probability that the car is behind door A, given that Monty has opened door B = P(B*/A) * P(A) / P(B*) = 1/2 * 1/3 * 1/2 = 1/3
P(C/B*) = Probability that the car is behind door C, given that Monty has opened door B =
P(B*/C) * P(C) / P(B*) = 1/1 * 1/3 * 1/2 =
2/3
P(A/C*) = Probability that the car is behind door A, given that Monty has opened door C = P(C*/A) * P(A) / P(C*) = 1/2 * 1/3 * 1/2 = 1/3
P(B/C*) = Probability that the car is behind door B, given that Monty has opened door C =
P(C*/B) * P(B) / P(C*) =
1/1 * 1/3 * 1/2 =
2/3
As you can see, it is two times better to switch doors, i.e. if Monty has opened door B, switch to door C. If Monty has opened door C, switch to door B. Note that if Monty was truly random, then the probabilities of P(C*/B) and P(B*/C) would not be 1/1 but 1/2 which in turn would cause P(C/B*) and P(B/C*) to be 1/3 and switching doors would make no difference. The probabilities change due to Monty knowing where the car is, i.e. by opening a door, Monty adds non-random information (evidence) into the system and we have to update the initial probabilities which were valid before this information.
Interesting variation of this problem [
Think Bayes, p.10]: What if Monty always chooses door B when B does not have a car behind?