whatifbench

Monty Hall with N doors: does switching still win?

Three doors. You pick one. The host opens an empty one and offers a swap. Should you take it? And does the answer hold with a hundred doors?

you picked?host opened itthe swap?
In this model, the host never opens the door you picked.

Three doors. One hides a car. Two hide goats. In 1990 Marilyn vos Savant answered this in her Parade column. Swap, she said, and you win two games out of three. Stay and you win one. Thousands of letters told her she was wrong. Many came from readers with doctorates.

Five years later Andrew Vazsonyi put the problem to the mathematician Paul Erdős. A decision tree did not convince him. Watching a simulation did.

Arguing settled neither dispute. So this page argues nothing. It plays the game instead. Two sliders: how many doors, and how many doors the host opens. Move both. Only one of them moves the answer.

Adding doors does not help. Opening them does.

The first slider sets how many doors the game starts with. The second sets how many the host opens before the swap. The working below calls them N and K.

1 · three closed doors2 · player picks oneyou3 · host opens a losing dooryouopen4 · switch or staystayswitchopen
In this model the order is fixed: you pick, the host opens, then the switch is offered.

Three doors, one opened. That is the 1990 setting, and the model gives the famous answer. Staying wins one game in three. Swapping wins two. Swapping wins twice as often. Two closed doors do not mean even odds.

Now open more. At 100 doors with 98 opened, swapping wins 99 games in 100. Staying wins 1. The gap is enormous.

Case 1 · car @ door 1youopenswitch→switchlosestaywinCase 2 · car @ door 2youswitch→openswitchwinstayloseCase 3 · car @ door 3youopenswitch→switchwinstayloseswitch wins 2 of 3 · stay wins 1 of 3
In this model, three placements of the car are the whole sample space.

Here is the surprise. Keep the 100 doors, but let the host open only one. Press the 100 doors, one opened button and watch. Swapping now wins 1.01 games for every 1 the staying player wins. Almost the whole advantage is gone — at a hundred doors.

So more doors do not help. What helps is the host opening them. Everything you did not pick is one big share of the odds, and the host never throws that share away. He piles it onto fewer and fewer doors. Open one door out of a hundred and the share barely moves. Open 98 and it lands almost entirely on the one door left.

The model puts the advantage at the doors you did not pick, divided by the doors still closed — (N−1)/R in the working below. Add doors without opening them and both numbers grow together, so nothing changes. The chart above draws all of this. Here is how to read it.

How to read what you are looking at

The chart shows the share of games won so far. Left to right is games played. Each labelled mark is ten times the one before it, so a million games still fit on screen.

Each strategy gets two lines in one colour. The solid line is the score so far in the played games. It jumps about early and settles later. The dashed line is the exact answer, worked out in advance. When the solid line settles onto the dashed one, the games and the maths agree.

The up-and-down axis changes range to fit the sliders. At 100 doors with one opened, both lines sit near 1%. So read the labels before you compare two settings. The table below the chart drops the played games. It fixes one rule — the host opens every door but one — so you can compare door counts on their own.

Why the advantage is (N−1)/R

The first pick carries no information, and the host never opens the player's door — so that door's probability is fixed right there, at 1/N. Nothing the host does afterward can move it. That is why K never appears in Pstay below. Each door he opens only shares the rest among the doors you did not pick. So the second slider moves one line, not both.

Right after you pick12.5%87.5% spread over 7 doorsthe host opens 5 of them — all losingAfter the host opens12.5%43.8%43.8%your door: unchangedsame 87.5%, now on 2 doors
Why opening doors moves the answer. The probability on your door is fixed the moment you choose it — nothing the host does afterwards touches it. What the host changes is how many doors the rest of it has to sit on. In this model that is the whole mechanism, and it is why the count that matters is how many doors are left, not how many there were.
Pstay=1N
Pswitch=N − 1N×1R=N − 1N (N − 1 − K)
N
how many doors the game starts with, 3 to 100 — the first slider
K
how many the host opens, 1 to N − 2 — the second slider
R
doors you could swap to, R = N − 1 − K
StepExpressionWhy
First pick holds the prize1 / NUniform placement, no information yet
First pick is wrong(N − 1) / NComplement of row 1 — one of the N − 1 unpicked doors
Host removes K losing doorsR = N − 1 − KHost opens K of those, all losing, leaving R closed
Switch lands on the prize1 / RThe prize is one of the R survivors
Switching wins(N − 1) / (N · R)Row 2 × row 4
Advantage over staying(N − 1) / RPswitch ÷ Pstay

Two checks. At N=3, K=1: R=1, so switching is 2/3 and staying 1/3, summing to 1. The same holds whenever the host opens every door but one (K = N−2, R = 1): two doors remain, and switching is (N−1)/N.

The formula does not care how the host picks the losing doors. Under any such rule the prize still sits among the R closed doors. A random swap finds it 1 time in R. Count a small case by hand and the formula gets easier to trust.

Four doors, counted by hand

Take four doors and one opened. You pick door 1. Staying wins whenever the prize is behind door 1. That happens in 1 game out of 4, so staying wins25.0% of the time.

In the other 3 games your pick is wrong. The prize hides behind door 2, 3 or 4. The host opens one empty door from that group, never the prize. Two doors stay shut, and the prize sits behind one of them. So a wrong first pick becomes a win half the time: (3/4) × (1/2) = 3/8 = 37.5%.

Swapping beats staying, 37.5% to 25.0%. But that is far below the 66.7% of the three-door game. The games left over are the ones where the swap lands on the wrong door of the two. All of it rests on four rules.

Four rules, all load-bearing

Every game on this page follows these four. Drop any one and the numbers above stop meaning what they say.

  1. The model hides one prize behind a random door.
  2. The player picks one door.
  3. The host knows the prize door. He opens K doors, never yours and never the prize.
  4. The player may swap to one of the R doors still closed. The swap is random, not a hunch.

The played games. The page plays many random games. It assumes the same even odds the maths does. A separate test builds the doors under two host rules and agrees. A seeded generator makes the randomness, notMath.random. The seed rides in the URL, so the curve repeats.

Back to the sliders ↑

A different host breaks every number here

The host's rule. Say the host opens doors at random. Count only the games where he misses the prize, and the model ties swapping with staying. Say he offers the swap only to players who are already right. The advantage drops to nothing. On screen all three hosts look the same.

A host with a habit. This model opens at random. A host who always opens the lowest empty door leaks a clue through which door he opens. The model puts a player who reads that habit at 50%, not 37.5%. That is four doors with one opened, worked by hand.

Too small to see. At 100 doors with one opened, the true gap is about 1 game in 10,000. Even a million played games wobble by about that much, and a million is the slider's limit. The dashed line shows the gap. The solid line cannot. The caption says so when the two sit too close.

Two limits of the display. Both strategies play the same games and only one can win each. So the two lines are tied together, not independent. The banner changes wording at lines I chose — 2.00× and 1.10×. No statistical test sets them. The two curves do meet, in the end. Meeting is not explaining.

Back to the sliders ↑

The simulation agreed. It did not explain.

Vazsonyi's account of the Erdős conversation has three steps, and they did not arrive together. The decision tree did not persuade him. A simulation did. The reason why came days later, and from someone else — Ron Graham.

The first two steps are on the same screen above. Neither line is offered as proof of the other — they are two routes to the same number, and the only claim being made is that they meet.

The third step is the one a page cannot hand over. Seeing swapping win two games in three is not the same as seeing why. Your door was locked at 1 in 3 the moment you touched it, and the host may not open it, so nothing he does can change it. The hand count above is the closest this page gets.

The arithmetic is older than the game show. Martin Gardner published the same problem in Scientific American in 1959. He called it the Three Prisoners Problem: three condemned men, one pardon drawn at random, and a warden who names one of the other two. Selvin's doors came sixteen years later. Rosenhouse's book, linked above, treats the two as one problem: same model, different furniture.

About this page

The exact probabilities come from the formula above. How I check things.

Sources.