Salta al contenuto
Note per Studenti Monty Hall Problem Report

Monty Hall Problem

An application of Bayes' rule (see Conditional ProbabilityThe conditional probability P(E|F) = P(E and F)/P(F) updates the probability of E after learning that F occurred; it is itself a probability measure and yields the multiplication formula for intersections.Conditional Probability →).

The problem

A classic TV show ("Let's make a deal"). At the end of the show the contestant is presented with a room with 3 doors. Behind one door there is a sports car, behind the other two there are trifling prizes. The contestant is asked to choose one door. Then Monty Hall, the show host, who knows exactly where the car is, opens a door behind which there is a trifling prize. At this point the contestant is given the opportunity to change his choice of door, and only after he makes this final choice is the door opened to reveal whether he has won the car.

Question: is it better to change door, to stick to the initial choice, or are the two choices equivalent in terms of winning chances?

Solution

Let 1,2,31, 2, 3 be the three doors. Define the events

  • CiC_i = "the car is behind door ii", i=1,2,3i = 1,2,3;
  • OiO_i = "Monty opens door ii".

Assumptions:

  • the car is behind each of the three doors with probabilities 13,13,13\frac13, \frac13, \frac13;
  • if the contestant's first choice is the door behind which the car is hidden, Monty opens one of the other two doors with probabilities 12,12\frac12, \frac12;
  • by the symmetry of the problem we may assume that the contestant's first choice is door 1 and that Monty opens door 3.

To decide whether it is convenient to change the chosen door one must compare P(C2∣O3)withP(C1∣O3).P(C_2 \mid O_3) \quad \text{with} \quad P(C_1 \mid O_3). Clearly P(C3∣O3)=0P(C_3 \mid O_3) = 0 (Monty does not open the door hiding the car), therefore P(C1∣O3)P(C_1\mid O_3) and P(C2∣O3)P(C_2 \mid O_3) add up to 11.

By Bayes' rule and the law of total probability: P(C2∣O3)=P(O3∣C2) P(C2)P(O3)=P(O3∣C2)P(C2)P(O3∣C1)P(C1)+P(O3∣C2)P(C2)+P(O3∣C3)P(C3).P(C_2 \mid O_3) = \frac{P(O_3 \mid C_2)\,P(C_2)}{P(O_3)} = \frac{P(O_3 \mid C_2)P(C_2)}{P(O_3\mid C_1)P(C_1) + P(O_3\mid C_2)P(C_2) + P(O_3 \mid C_3)P(C_3)}. The last term in the denominator is 00 because P(O3∣C3)=0P(O_3 \mid C_3) = 0. Moreover P(O3∣C2)=1P(O_3\mid C_2) = 1 (the car is behind door 2 and the contestant chose door 1, so Monty must open door 3), while P(O3∣C1)=12P(O_3 \mid C_1) = \frac12. Hence P(C2∣O3)=1⋅1312⋅13+1⋅13=23⟹P(C1∣O3)=13.P(C_2 \mid O_3) = \frac{1\cdot \frac13}{\frac12\cdot\frac13 + 1\cdot\frac13} = \frac{2}{3} \quad\Longrightarrow\quad P(C_1 \mid O_3) = \frac13.

Conclusion: it is always much better to change door.

Versione ripasso

  • Events: CiC_i = car behind door ii (each with probability 13\frac13); OiO_i = Monty opens door ii. By symmetry: contestant picks door 1, Monty opens door 3.
  • Compare P(C2∣O3)P(C_2\mid O_3) and P(C1∣O3)P(C_1\mid O_3); P(C3∣O3)=0P(C_3\mid O_3)=0 so the two add up to 1.
  • Likelihoods: P(O3∣C1)=12P(O_3\mid C_1)=\frac12, P(O3∣C2)=1P(O_3\mid C_2)=1, P(O3∣C3)=0P(O_3\mid C_3)=0.
  • Bayes: P(C2∣O3)=1⋅1312⋅13+1⋅13=23P(C_2\mid O_3)=\dfrac{1\cdot\frac13}{\frac12\cdot\frac13+1\cdot\frac13}=\dfrac23, so P(C1∣O3)=13P(C_1\mid O_3)=\dfrac13. Always switch.
  • Typical mistake: forgetting that Monty knows where the car is, so P(O3∣C2)=1P(O_3\mid C_2)=1 and not 12\frac12.