I originally thought it couldn't matter. I wrote a simulation to demonstrate how right I was. I was wrong. I encourage duplicating the experience.
I originally thought it couldn't matter. I wrote a simulation to demonstrate how right I was. I was wrong. I encourage duplicating the experience.
That is false. Him opening the car is outside the constraints of the premise of the thought experiment. He can't not open a goat. The chance of him not opening a goat is irrelevant, and the probability is 0%.
You pick a door. Monty picks another door at random - he has clearly committed to doing so, flips a coin in front of you or whatever. God only knows what would have happened if he'd revealed a car, but this time he didn't. Having found yourself in that situation, what are your odds if you switch doors?
If you simulate this procedure, you'll find that the number of outcomes where "switch" wins is about 1/3 of the total games; "stick" wins in about 1/3 of the total games; and 1/3 of the total games Monty revealed the car. When Monty does pick the goat reliably, as in the Monty Hall Problem as it was intended to be understood, Monty is doing the work to convert those "revealed" games into wins for "switch".
If you disagree, I'll happily take your money.
I mean that literally - how can I write this into a simulation to test that there's a difference?
If you find yourself actually in the situation, you need to make your best guess from what information is available.
As for simulation, write a function that handles a single play through of the game and returns the outcome if you switch. Make Monty's strategy a parameter. Remember that "Monty revealed the car" is a separate outcome from "win" or "lose". Run that function a whole bunch of times, counting the outcomes. Compare the ratio between wins and losses, at various choices of strategy.
To really drive home the point that strategy can matter, consider another possibility: maybe this season the studio executives have decided that cutting costs is more important than having an interesting game show, and Monty's strategy is now "reveal the car if you haven't already chosen it". Monty has revealed a goat. Is there still a 2/3 chance that you didn't pick the car?
1) picks randomly and opens the door, or
2) picks randomly and then, if that door has a car, switches.
His application of knowledge is converting those cases that would have been thrown away in case 1 into victories for "switch".The counts bear this out. If you simulate it, 1/3 of all games go to 'stick' regardless. Either 1/3 or 2/3 go to 'switch', and either 1/3 or 0/3 (respectively) end up with Monty revealing the car.
Problem-2: "You pick a door. Monty opens a door at random, which just happens to be a goat. Calculate probability of winning if staying."
Both are conditional probability P(A|B) (that is, probability of A happening, under the assumption B has happened).
- A is probability of picking the correct door at the first try (or switching if you prefer)
- B is the probability that Monty picked a door with a goat
P(A|B) is defined as: P(A|B) = P(A and B) / P(B)In both problems P(A) is 1/3.
In Problem-1, P(B) is 1 because Monty knows and it's not a random event and P(A and B) = P(A), so P(A|B) = P(A)*P(B)/P(B) = P(A) = 1/3.
In Problem-2, P(A) is 1/3, P(B) is 2/3, P(A and B) is 1/3 (if you pick a car, Monty is guaranteed to pick a goat), so P(A|B) = 1/3 / 2/3 = 1/2.
The complete cases for the choices is:
Problem-1:
1) You pick goat#1, Monty opens goat#2
2) You pick goat#2, Monty opens goat#1
3) You pick car, Monty chooses a goat of his liking
Problem-2: 1) You pick goat#1, Monty opens goat#2
2) You pick goat#2, Monty opens goat#1
3) You pick car, Monty opens goat#1
4) You pick car, Monty opens goat#2
5) You pick goat#1, Monty opens car
6) You pick goat#2, Monty opens car
We know Monty didn't pick a car, that reduces it to:Problem-1:
1) You pick goat#1, Monty opens goat#2
2) You pick goat#2, Monty opens goat#1
3) You pick car, Monty chooses a goat of his liking
Problem-2: 1) You pick goat#1, Monty opens goat#2
2) You pick goat#2, Monty opens goat#1
3) You pick car, Monty opens goat#1
4) You pick car, Monty opens goat#2
Or, 1/3 for Problem-1, 2/4 (=1/2) for Problem-2