| Bayes' rule, the host's move as evidence | |
|---|---|
| The host who knows and opens k goat doors at random |
Lesson
The theory β The Monty Hall Problem
The chance that the car is behind a given door, after the host has acted, follows from Bayes' rule: the prior for that door, 1 Γ· n, times the likelihood that the host would do exactly what he did if the car were there, divided by the total chance of what he did.
What each symbol means
n- the number of doors
k- the number of doors the host opens
P(H | C_i)- the likelihood: the chance the host does what he did if the car is behind door i
P(C_i | H)- the posterior: the chance the car is behind door i after seeing what the host did
Where the formula comes from
- Name the hypotheses and give each its prior. Ci is the car being behind door i; before the host acts, every door is equally likely.
- Write down how likely the host's move H is under each hypothesis. This is the only step where his rule enters. For the host who knows and opens k goat doors at random among the goat doors he may open, with your door d0 and the set O of doors he opened:
- Add up the total chance of what he did.
- Divide each prior times likelihood by that total. For the host who knows, your door keeps 1/n whichever doors he opens, and each of the m = n β 1 β k other closed doors gets (n β 1)/(nm).
Problems solved in full
-
The three doors, by Bayes' rule 4 steps
You pick door 1. The host, who knows where the car is and always opens a goat door, choosing at random when he has a choice, opens door 3. Find the chance that the car is behind door 1 and behind door 2. Press Three doors to check.
-
Before he acts, each door is equally likely:
-
How likely is it that he opens door 3, for each place the car could be?
-
The total chance that he opens door 3:
-
Divide each door's prior times likelihood by that total:
Answer
The car is behind door 1 with probability 1/3 and behind door 2 with probability 2/3. The whole answer sits in the second step: if the car is behind door 2 he is forced to open door 3, and if it is behind door 1 he opens door 3 only half the time, so his opening door 3 is twice as likely if the car is behind door 2.
-
-
Four doors, one opened 5 steps
Four doors. You pick door 1, and the host, who knows where the car is, opens one of the other doors that hides a goat, choosing at random when he can. He opens door 4. Find the chance that the car is behind each closed door, then check it by counting before he acts.
Show solution
-
Before he acts:
-
How likely is it that he opens door 4, for each place the car could be? With the car behind door 1 he has three goat doors to choose from; behind door 2 or door 3, only two:
-
The total chance that he opens door 4:
-
Divide each door's prior times likelihood by that total:
-
The same figure without Bayes: switching to a closed door chosen at random wins only if the first pick was wrong, chance 3/4, and then the car is behind one of the two closed doors:
Answer
Door 1 keeps 1/4; doors 2 and 3 have 3/8 each. Switching beats staying, but the 3/4 that doors 2, 3 and 4 held between them is now shared by two doors, so neither of them reaches it.
-
-
A host who does not know 4 steps
Three doors, and you pick door 1. This host does not know where the car is: he opens door 2 or door 3 at random, and door 3 happens to show a goat. Find the chance that the car is behind door 1 and behind door 2. Press Host who does not know to check.
Show solution
-
Before he acts:
-
Write H3 for door 3 opened with a goat behind it. With the car behind door 1 or door 2 he opens door 3 half the time and a goat is there. With the car behind door 3, opening it shows the car, so H3 cannot happen:
-
The total chance of H3:
-
Divide:
Answer
1/2 and 1/2. The opened door and the goat are the same as in the first problem. Only the likelihood for door 2 changed, from 1 to 1/2, because this host was never forced to avoid the car.
-
-
A host with a favourite door 5 steps
Three doors, you pick door 1, and the host knows where the car is. When the car is behind door 1, so that he may open either door 2 or door 3, he opens door 2 with probability p. Find the chance that switching wins if he opens door 2, and if he opens door 3. Then take p = 1: the host who always opens the lowest-numbered goat door. Press Biased host opens 2 to check p = 1.
Show solution
-
Before he acts:
-
The likelihood of each move. With the car behind door 2 or door 3 he has no choice:
-
The total chance of each move:
-
Divide. Switching after door 2 means taking door 3, and after door 3 it means taking door 2:
-
With p = 1:
Answer
Switching wins with probability 1/(1 + p) after door 2 and 1/(2 β p) after door 3. Both are at least 1/2 for every p from 0 to 1, so switching never does worse than staying, whatever his preference. With p = 1 they are 1/2 and 1; with p = 1/2, the host of the first problem, both are 2/3.
-
-
When the offer is the evidence 5 steps
Three doors, you pick door 1. When your pick is the car, the host always offers a switch; when it is a goat, he offers with probability q. Whenever he offers he opens a goat door, at random if there are two. He offers and opens door 3. For which q should you switch? Monty Hell is q = 0: press Monty Hell to check it.
Show solution
-
Before he acts:
-
H3 is now an offer with door 3 opened. With the car behind door 1 he offers for certain and opens door 3 half the time; behind door 2 he offers with probability q and has to open door 3; behind door 3 he cannot open it:
-
The total chance of H3:
-
Divide:
-
Compare the two closed doors:
Answer
Switch when q > 1/2 and stay when q < 1/2; at q = 1/2 they are equal. The host who always offers, q = 1, gives switching 2/3, and Monty Hell, q = 0, gives it nothing. The offer is evidence of its own: from a host who offers to a wrong pick less than half as often as to a right one, it says stay.
-
-
Bertrand's boxes 4 steps
Three boxes hold two gold coins, two silver coins, and one of each. You choose a box at random and take out one of its coins at random. It is gold. Find the chance that the other coin in that box is gold too.
Show solution
-
Call the boxes GG, SS and GS. Before the draw:
-
How likely is a gold coin from each box?
-
The total chance of drawing gold:
-
Divide:
Answer
2/3, not the 1/2 you get by counting the two boxes that could hold a gold coin. The gold box gives gold every time and the mixed box half the time, so a gold coin is twice as likely to have come from the first. Joseph Bertrand set the puzzle in his Calcul des probabilitΓ©s of 1889, 86 years before Steve Selvin put the three doors to readers of The American Statistician.
-
Supplementary problems, answers only
-
Three prisoners, A, B and C, learn that one of them, chosen at random, will be pardoned. A asks the guard to name one of the other two who will be executed; if both will be, the guard names one at random. He names B. Find the chance that A is pardoned, and that C is.
Show answer
1/3 and 2/3. It is the three doors, with the guard as the host.
-
A hundred doors. The host who knows opens 98 of the 99 doors you did not pick, all goats. Find the chance for your door and for the one he left shut.
Show answer
1/100 and 99/100.
-
Five doors. The host who knows opens two goat doors at random among the four you did not pick. Find the chance for your door and for each of the other two closed doors.
Show answer
1/5, and 2/5 each.
-
Ten doors. A host who does not know opens 8 of the 9 doors you did not pick, at random, and all 8 hide goats. Find the chance for your door and for the other closed door, and the chance that such a host shows 8 goats at all.
Show answer
1/2 and 1/2; he shows 8 goats with probability 1/5.
-
In the problem of the host with a favourite door, take p = 1/3. He opens door 3. Find the chance that switching wins.
Show answer
1/(2 β 1/3) = 3/5.
-
A thousand games with the host who knows. Between which two rates should the switching win rate land 95% of the time?
Show answer
2/3 Β± 1.96 β((2/3 Β· 1/3)/1000): from 63.74% to 69.59%.
Learning path