Skip to the game
Tic Tac Toe

Monty Hall Problem

Pick one of three doors, see the host reveal a goat, then stay or switch. A simulator can also run the Monty Hall problem up to 10,000 times each way.

Play the Monty Hall game

Rounds
0
Cars won
0
Win rate
–

Pick a door. One hides a car, and the others hide goats.

Pick a door. The host then opens the other doors but one, and shows you goats. Stay with your door or switch to the one left closed. With a keyboard, press a door's number to choose it (0 for door 10), and N for the next round.

Settings
Doors
The host

Changing these starts a new round.

Your results
When you stayedNo rounds yet
When you switchedNo rounds yet

The tick on each bar is the long-run chance: staying wins 1 in 3, and switching wins 2 in 3.

Results are kept for each setting: 3 doors, a host who knows.

Run the experiment

Two computer players each play the same number of rounds with your settings. One always stays and one always switches. Watch where their win rates settle.

Rounds each
0%25%50%75%100%0rounds played1,000
Press Run to play 1,000 rounds each way.
  • Always switch
  • Always stay
  • Expected

How it works

How to play the Monty Hall problem

Choose a door, let the host open all but one of the others, then decide whether to keep your first pick or move to the door he skipped.

  1. Step 01

    Pick a door

    Click or tap a door, or press its number. A car is behind one door and goats are behind the rest, and they're placed before you choose.
  2. Step 02

    Watch the host open doors

    The host opens every other door except one. When the host knows where the car is, every door he opens hides a goat.
  3. Step 03

    Stay or switch

    Keep your door with Stay, or take the one door left closed with Switch. Both doors open, and the round is added to your results.

Features

Play it yourself, then simulate it

  • 3, 5, or 10 doors

    Play the classic three doors, or 5 or 10. The host always leaves just one other door closed.

  • A host who knows, or one who guesses

    Switch to a host who opens doors at random and can show the car by accident, and see how the odds change.

  • Simulate 100 to 10,000 rounds

    One computer player always stays and one always switches. A chart shows their win rates settling.

  • Your stay and switch results

    How often you won when you stayed and when you switched, next to the long-run chance for each.

  • Fair, hidden doors

    The car is placed with your browser's cryptographic random generator, and a door gets its prize only when it opens.

  • Keyboard and screen reader friendly

    Press a door's number to choose it and N for a new round. Doors are labeled and every step is read out.

Strategy

Monty Hall problem strategy: why you should switch

The best move is simple: switch. These ideas show why it works, and when it stops working.

  • Switch when the host knows

    With three doors and a host who always shows a goat, switching wins 2 rounds in 3 and staying wins 1 in 3.

  • Your first pick is usually wrong

    You pick the car 1 time in 3. The other 2 times, the host has to leave the car's door closed, so switching wins exactly when your first pick was wrong.

  • Imagine 10 doors

    Pick one of 10 doors and the host opens 8 goat doors. Your door was a 1 in 10 guess, and the one he skipped wins 9 times in 10.

  • Two doors doesn't mean 50–50

    The two closed doors weren't chosen the same way. You picked yours blind, and the host picked the other one knowing where the car is.

  • A guessing host changes the answer

    If the host opens doors at random and only happens to show goats, his choice tells you nothing. Then staying and switching each win 1 in 2.

About the game

The Monty Hall problem: play it, check the math, and run the simulator

The rules, why switching wins, the math, more doors, the guessing host, the simulator, the history, and your saved results.

The Monty Hall problem is a probability puzzle about three doors, one car, and two goats. You pick a door, the host opens another one to show a goat, and you decide whether to stay or switch. Here you can play it round by round, then let a simulator check the answer over thousands of rounds.

The Monty Hall problem, step by step

Each round starts with the doors closed. A car is behind one of them and a goat is behind each of the others, placed at random before you pick. Click or tap a door to choose it. The host then opens every other door except one, and shows you what's behind them.

Now you choose. Stay keeps your first door, and Switch moves you to the one other door the host left closed. You can also click your own door to stay or the other closed door to switch. Both doors open, your door is marked won or lost, and Next round deals new doors.

Why switching wins the Monty Hall problem

Say you pick door 1. The car is equally likely to be behind any of the three doors, so look at each case:

  • Car behind door 1: the host opens either other door. Staying wins.
  • Car behind door 2: the host must open door 3. Switching wins.
  • Car behind door 3: the host must open door 2. Switching wins.

Staying wins in one case out of three and switching wins in two. Another way to see it: switching is like being allowed to take both doors you didn't pick. The host just opens the empty one for you.

Bayes' theorem and the host's choice

The key is that the host's choice is evidence. Suppose you pick door 1 and he opens door 3. If the car is behind door 1, he could have opened door 2 or door 3, so he opens door 3 only half the time. If the car is behind door 2, he opens door 3 every time. If it's behind door 3, he never does.

Weigh each door's starting chance of 1 in 3 by how likely the host was to do what he did: 1/3 × 1/2 for door 1 and 1/3 × 1 for door 2. Door 2 carries twice the weight, so after door 3 opens, door 1 has a 1 in 3 chance and door 2 has 2 in 3. That's Bayes' theorem, the rule for updating a probability when you learn something new.

More doors: 5 and 10

Choose 5 or 10 doors under Settings and the host still opens every other door but one. Your first pick is right 1 time in however many doors there are, and the door the host leaves closed has the car every other time:

  • 3 doors: staying wins 1 in 3, switching 2 in 3.
  • 5 doors: the host opens 3 goat doors. Staying wins 1 in 5, switching 4 in 5.
  • 10 doors: the host opens 8 goat doors. Staying wins 1 in 10, switching 9 in 10.

More doors make the answer easier to feel. Few people would keep a 1 in 10 guess after the host has carefully skipped one door out of nine.

When the host is guessing

Set The host to Guesses and the host opens doors at random, so sometimes the car is behind one of them. That happens 1 round in 3 with 3 doors, 3 rounds in 5 with 5 doors, and 4 rounds in 5 with 10. Those rounds don't count, and the results panel shows how many there have been.

In the rounds where only goats appear, staying and switching each win half the time. Both closed doors were left shut by chance, so neither is special. The 2 in 3 answer depends on a host who knows where the car is and always shows a goat.

Running 10,000 rounds at once

Under Run the experiment, choose 100, 1,000, or 10,000 rounds and press Run. Two computer players use your door and host settings: one always stays and one always switches. Every round is played in a moment in your browser, and the two lines draw across the chart in about a second and a half, with dashed lines at the expected win rates.

Short runs wander. After 100 rounds, the switching line can easily finish 5 points or more away from 66.7%. After 10,000, it nearly always lands within about 1 point. The caption gives each player's wins to a tenth of a percent, and with a guessing host it says how many extra rounds were replayed because the car was shown.

Your results, kept for each setting

Above the doors, Rounds, Cars won, and Win rate count the rounds you've played with the current setting. Your results splits them into the times you stayed and the times you switched, each with a bar and a tick at the long-run chance, so you can watch your own numbers drift toward it.

Each combination of doors and host keeps its own results, so 10 doors with a guessing host doesn't mix with the classic game. Changing a setting starts a new round, and Reset results clears the results for every setting.

Where the Monty Hall problem came from

The statistician Steve Selvin posed the puzzle in a letter to The American Statistician in 1975 and named it the Monty Hall problem in a second letter that year. Monty Hall hosted the American TV game show Let's Make a Deal from 1963, though the real show didn't offer contestants this switch. A closely related puzzle, the three prisoners problem, had appeared in Martin Gardner's Mathematical Games column in Scientific American in 1959.

The problem became famous in September 1990, when Marilyn vos Savant answered a reader's version in her Ask Marilyn column in Parade magazine and said to switch. About 10,000 readers wrote in, nearly 1,000 of them with PhDs, and most said she was wrong. By a well-known account, the mathematician Paul Erdős wasn't convinced until he saw a computer simulation. This game isn't affiliated with Let's Make a Deal.

Opening doors by tap, number key, or screen reader

Each round needs only two choices, your first door and stay or switch, and both work however you play:

  • Touch or mouse: tap a door to pick it, then tap Stay or Switch, or tap the door you want.
  • Keyboard: press 1 to 9 to choose a door, and 0 for door 10. After the host opens doors, your door's number stays and the other closed door's number switches. N starts a new round.
  • Screen readers: each door is labeled, such as your pick, the door you can switch to, or open with a goat, and every step and result is read out.

For more probability you can feel, flip a fair coin a few hundred times, or play Higher or Lower, where the odds change as the deck runs down.

How the doors stay fair

No account is needed. The car is placed with your browser's cryptographic random number generator before you pick, and a door's prize is only added to the page when that door opens, so a closed door carries no clue about what's behind it.

The simulator plays its rounds in your browser, and your picks and results aren't sent to a server. What the game keeps in this browser's local storage is small: your door count, host, simulator size, and your stay and switch tallies for each of the six door and host settings. A half-played round isn't saved, so reloading the page deals fresh doors. The privacy policy shows the exact entry.

FAQ

Monty Hall problem questions

Quick answers about the Monty Hall problem: switching, the math, more doors, the guessing host, the simulator, and saving.

What is the Monty Hall problem?

A probability puzzle. A car is behind one of three doors and goats are behind the others. You pick a door, the host opens another one to show a goat, and you choose whether to switch to the last closed door.

Should you switch doors?

Yes. If the host knows where the car is and always opens a goat door, switching wins 2 times in 3 and staying wins only 1 time in 3.

Why isn't it 50–50 with two doors left?

Because the host's choice isn't random. Your first pick is right only 1 time in 3. The other 2 times, the host must leave the car's door closed, so that door wins 2 in 3.

What happens with 5 or 10 doors?

The host still opens every other door but one. Switching wins 4 times in 5 with 5 doors and 9 times in 10 with 10 doors. Staying wins 1 in 5 and 1 in 10.

What if the host doesn't know where the car is?

Then he sometimes opens the car's door by accident, and that round doesn't count. When he happens to show only goats, staying and switching each win half the time. Choose Guesses under The host to try it.

How does the simulator work?

Two computer players use your settings. One always stays and one always switches, and each plays 100, 1,000, or 10,000 rounds. A chart shows their win rates as the rounds go by, with the expected rates marked.

Can the car move after I pick a door?

No. The car is placed at random before you pick, using your browser's cryptographic random generator, and it stays put. A door's prize is only added to the page when that door opens.

Does the page remember how often I won by switching?

Yes. For each of the six door and host settings, your stay and switch tallies stay in this browser, along with your settings. Reset results clears the tallies for every setting at once.

Who came up with the Monty Hall problem?

The statistician Steve Selvin posed it in The American Statistician in 1975. It became famous in 1990, when Marilyn vos Savant answered it in Parade magazine and thousands of readers wrote in to disagree.