Skip to content

Instantly share code, notes, and snippets.

@jomido
Created December 14, 2023 14:48
Show Gist options
  • Save jomido/663c1444303710ae793110d74189d793 to your computer and use it in GitHub Desktop.
Save jomido/663c1444303710ae793110d74189d793 to your computer and use it in GitHub Desktop.
monty hall intuition

monty hall intuition: 1000 doors

the setup

A host invites a friend over to play a game.

There are 3 doors. Behind 1 door is a car. Behind the other 2 doors are goats. The friend may choose one door. If the friend chooses the door with the car, they can keep it. If the friend chooses a door with a goat, they have to return the goat to the farm from whence it was borrowed. Goats go home. 10km walk, over hill and valley. And it's raining.

the complication

So the friend chooses a door. But the host does not open the door. Yet. Suspense!

The host instead opens one of the unchosen doors, to reveal a goat. Good job the friend didn't choose that door - phew.

Two doors remain unopened: the door the friend chose, and one other door.

The host asks if the friend wants to switch their choice to the other unopened door.

the question

Should the friend switch?

the assertion

The friend should always switch.

why?

the answer, with 3 doors

  1. upon first choosing a door, the friend has a 33% chance of picking the car
  2. there is a 66% chance the car is in one of the other doors
  3. the act of choosing creates 2 "pools" of doors
  4. the first pool (A) has 1 door in it - the door the friend chose
  5. the second pool (B) has 2 doors in it - the 2 doors the friend did not choose
  6. pool A has a 33% chance of a car being in it
  7. pool B has a 66% chance of a car being in it
  8. the host opens 1 of the doors in pool B to reveal a goat (the host can do that because they know where the car is)
  9. now both pools are the same size!
  10. the friend should switch to pool B, because it still has a 66% chance of a car being in it

the answer, with 1000 doors

Instead of the game being played with 3 doors, it can be played with 1000 doors. It would go like this:

  1. upon first choosing a door, the friend has a 0.1% chance of picking the car
  2. there is a 99.9% chance the car is in one of the other doors
  3. the act of choosing creates 2 "pools" of doors
  4. the first pool (A) has 1 door in it - the door the friend chose
  5. the second pool (B) has 999 doors in it - the 999 doors the friend did not choose
  6. pool A has a 0.1% chance of a car being in it
  7. pool B has a 99.9% chance of a car being in it
  8. the host opens 998 of the doors in pool B to reveal goats (the host can do that because they know where the car is)
  9. now both pools are the same size!
  10. the friend should switch to pool B, because it has a 99.9% chance of a car being in it!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment