Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

Puzzle 6 | (Monty Hall problem)

  • Difficulty Level : Medium
  • Last Updated : 11 Feb, 2022

Suppose you’re on a game show, and you’re given the choice of three doors: Behind one door is a car; behind the others, goats. You pick a door, say No. 1, and the host, who knows what’s behind the doors, opens another door, say No. 3, which has a goat. He then says to you, “Do you want to pick door No. 2?” Is it to your advantage to switch your choice?
 

220px-Monty_open_door.svg

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

Solution: 
If you switch, you get the car with a probability of 2/3. So switching is always a good choice. Refer to this MIT video lecture for a great explanation. Refer online editable Monty hall simulation to play with how things change with multiple doors, prizes, etc. 

Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above
If “the host, who knows what’s behind the doors” opens a door that has a goat, then the probability the car was behind that door was 0 before the door was opened (actually, as soon as the car was placed behind a door). Since the host knows which door has the car behind it, then the probability that the car is behind that door is 1. Hence, the probability of winning by switching is either 0 (if the host knows that door does not have the car behind it) or 1 (if the host knows that door does have the car behind it), not 2/3.

Proof

Let E1, E2 and E3 be 3 Events, such that 

E1=Car is behind door 1, 

E2=Car is behind door 2,

E3=Car is behind door 3

And consider another event A, such that A=The host opens door 3

So, we basically have to find the probability P(E1 |A), which basically means “What is the probability that the car is behind door 1, given that the host has already opened door 3”.

So, according to Bayes’

rem, we can write this probability as-

Now here, we have probabilities P(E1)=P(E2)=P(E3)=1/3, since it was previously equally likely that the car can be either behind door 1, or door 2, or door 3.

Next, P(A│E1)=Probability that the host has opened door 3, given the car is behind door 1 = 1/2, since the host can open door 2 or door 3, since they both don’t have the car behind them.

And, we have P(A│E2)=Probability that the host has opened door 3, given that the car is behind door 2 = 1, because if the car is behind door 2, then the only door that the host can open is door 3.

And, P(A│E3)=Probability that the host has opened door 3, given that the car is behind door 3 = 0

This is because the probability of the host opening the door that has the car behind it was 0 according to the question since he never opens the door having the car behind it.

So, putting all these values in the above formula, we get-

Hence, we can see that there is a 1/3  chance that the car is behind door 1 ⇒ there is a 1−1/3=2/3  chance that the car is behind door 2.

Therefore, you should switch.

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!