Inferring the Host: A Bayesian Look at the Monty Hall Problem


Suppose you’re on a game show, facing three closed doors. Behind one of them there is a car. Behind the other two are goats. You pick one, say door 1. The host knows what’s behind every door, and he opens one of the other two, say door 3, to show you a goat. Then he asks whether you want to stay with door 1 or switch to door 2.

Most people say it doesn’t matter. Two doors, one car, so it’s 50–50. That answer feels obvious, but it’s wrong.

Marilyn vos Savant answered exactly this question in her Parade column in September 1990 and got roughly 10,000 letters back. Close to a thousand came from people with PhDs, and most of them said she’d blown it. Even Paul Erdős (a famous mathematician) refused to believe her until a friend ran a computer simulation in front of him.

What everyone eventually found out is that Marilyn vos Savant was right about her finding. Switch doors and you win two times out of three.

Except that sentence hides an assumption, and I think the assumption is the interesting part. The 2/3 comes from a specific picture of how the host behaves. If you swap in a different host, the same goat behind the same door is worth something else entirely. I spend my working days fitting cosmological models to survey data, and this is the mistake I worry about most there too, reading evidence without asking what process put it in front of you.

I should note that none of that framing is mine. Richard Gill made the case that Monty Hall is a modelling problem, not a probability puzzle. Jeffrey Rosenthal worked through the main host variants. Andrew Gelman has written that drawing the generative tree is the step that matters. Miller and Sanjurjo tied the puzzle to selection bias in empirical research. I borrow everything from all of them and present it in the first half of the article.

The second half is the one I find most interesting. I treat the host as an unknown, estimate their habits from past episodes, test whether they even knows where the car is, and look at what happens when they gets to decide whether to offer you a switch at all.

The standard answer

You pick door 1. The host, who knows where the car is, opens door 3 and shows you a goat. Should you take door 2?

Start with a flat prior, 1/3 per door. The likelihood is the chance the host opens door 3 for each possible car location:

Car is behind

Prior

P(host opens door 3 | car here)

Prior × likelihood

Door 1 (yours)

1/3

1/2 (he picks either goat door)

1/6

Door 2

1/3

1 (forced, door 2 has the car)

1/3

Door 3

1/3

0 (he never reveals the car)

0

Normalise it, and then door 1 gets 1/3 and door 2 gets 2/3 of probability.

Look at where the lopsidedness comes from. It’s not from the prior but from that third column, and in every entry there is a claim about the host’s behaviour that nobody actually checked. So let’s poke at them one at a time.

Read Also:  Gemini achieves gold-level performance at the International Collegiate Programming Contest World Finals

A host who doesn’t know

Rosenthal calls this one “Monty Fall.” The host trips, knocks a door open at random, and by luck there’s a goat behind it.

From where you’re standing nothing has changed. Door 3, goat. But now if the car is behind door 2, the host only opens door 3 half the time, because he’s guessing. Both remaining doors end up with 1/3 × 1/2. A coin flip.

I didn’t trust my own algebra on this, so I simulated a million games using python:

import numpy as nprng = np.random.default_rng(42)N = 1_000_000car = rng.integers(0, 3, N)                 # you always pick door 0# Knowing host: never reveals the carq = 0.5                                     # coin he flips when both doors are goatsopened = np.where(car == 1, 2, np.where(car == 2, 1,          np.where(rng.random(N) < q, 2, 1)))print("knowing host, switch wins:", (3 - opened == car).mean())# Ignorant host: opens a random door, keep only games where a goat appearsopened = rng.integers(1, 3, N)goat = opened != carprint("ignorant host, switch wins:", (3 - opened[goat] == car[goat]).mean())
knowing host, switch wins: 0.6663ignorant host, switch wins: 0.4991

I get 2/3 against 1/2, from what looks like the identical situation.

Why? Because with the clumsy host, about a third of games end with the car on full display, and we quietly throw those games away because they don’t match what we saw. That filtering is what eats the advantage. it may remind you of a phone survey that only counts the people who picked up. It’s the same mechanism.

A host with a favourite door

Back to a host who knows. But say that when you’ve picked the car, so both other doors hide goats, he doesn’t choose fairly. He opens door 3 with probability q. Maybe it’s nearer the camera. Then:

P(win by switching | he opened door 3) = 1 / (1 + q)

P(win by switching | he opened door 2) = 1 / (2 − q)

The first formula is Rosenthal’s “Monty Crawl” result. The second comes out of the same table. Put q = 1/2 into either and you get the familiar 2/3, which tells you how special the textbook case is.

Switching win probability as a function of the host’s door preference q. Simulation agrees with theory to three decimals at every q tested. Image by the author.

The door he reaches for is information. If we assume he’s crazy about door 3, however, then watching him open it tells you almost nothing, and switching is barely better than a coin toss. Watching him open door 2 is a different story. He’d only do that if he had to, so the car is behind door 3 and switching is close to a lock.

Then there’s a lower bound. See the figure, neither curve dips under 1/2, whatever q is, so switching never does worse than staying. That follows straight from Rosenthal’s 1/(1 + q) result, and the standard summaries note the same range of 1/2 to 1. What I find most useful about it is the practical consequence: you can make the right call without knowing the host’s habits. You only need them to know how big your edge is. Plenty of real decisions work that way, and plenty don’t, and it pays to know which kind you’re facing before you start arguing about the numbers.

Learning the host from past episodes

The question now is: can you actually estimate q? If you’ve got tapes of old shows, yes.

The catch is that most episodes are useless for this. When the contestant starts on a goat, the host has no choice, so his door tells you nothing about his preferences. You only learn something from the games where the contestant happened to pick the car first.

Read Also:  The Best Proxy Providers for Large-Scale Scraping for 2026

I simulated 30 episodes with a host whose true q is 0.8. Ten of them were informative. In nine of those ten he went for door 3. With a flat Beta(1, 1) prior and a Bernoulli likelihood, the model in NumPyro is two lines long:

import jax, jax.numpy as jnpimport numpyro, numpyro.distributions as distfrom numpyro.infer import MCMC, NUTSdef model(y):    q = numpyro.sample("q", dist.Beta(1.0, 1.0))    numpyro.sample("obs", dist.Bernoulli(q), obs=y)y = jnp.array([1, 1, 1, 1, 0, 1, 1, 1, 1, 1])   # informative games onlymcmc = MCMC(NUTS(model), num_warmup=1000, num_samples=4000)mcmc.run(jax.random.PRNGKey(0), y=y)qs = mcmc.get_samples()["q"]print("P(win switch | opens door 3):", (1 / (1 + qs)).mean())print("P(win switch | opens door 2):", (1 / (2 - qs)).mean())
P(win switch | opens door 3): 0.546P(win switch | opens door 2): 0.865

Yes, NUTS overkill. The posterior is just Beta(10, 2), mean 0.833, and the sampler lands on 0.836. I used it anyway because the model stops being conjugate the moment you make it realistic. A host whose habits drift from one season to the next, for example.

img 6ad4f0daaa4e0
Left: what 10 informative episodes say about the host’s bias. Right: the win probability for switching, with that uncertainty propagated through. Image by the author.

The right-hand panel is what I’d want if I were the contestant. A distribution, and two different ones depending on his move. Against this host, a door 3 reveal is worth a few points over a coin flip. A door 2 reveal is worth a lot more.

However, just ten games is not much data, and the posterior is wide. It peaks closer to 0.9 than the true 0.8. That’s the honest result from a small sample, and I’d rather show it than pretend.

Does he even know where the car is?

Go one level up. Put two hypotheses side by side: a host who knows and never shows the car, and one who opens doors at random.

Each episode that ends with a goat has probability 1 under the first and 2/3 under the second. Watch n episodes with no car ever revealed and the Bayes factor for the knowing host is (3/2)n.

Episodes watched, no car revealed

Bayes factor (knowing vs ignorant)

5

7.6

10

57.7

20

3,325

By ten episodes you can be fairly sure. The evidence multiplies, and the hypothesis that sticks its neck out with sharper predictions gets paid when they keep coming true. The model comparison doesn’t get much simpler than this.

When the offer is part of the evidence

Every version so far has the host always offering the switch. What if he picks when to offer?

This has been looked at too. Go through the Wikipedia page (link below): it lists a host who offers the switch only when you’ve already picked the car, and one who offers it with different probabilities depending on your pick. The formula below just writes out the general case.

Let’s say he offers with probability a when you’re on the car and b when you’re on a goat. Given that an offer was made:

P(win by switching | offer made) = 2b / (2b + a)

Set a = b = 1 and you’re back to 2/3. Set a = 1, b = 0 and you’ve built the “Monty from Hell” who only tempts people already standing on the car. Switching loses every single time. In general, switch only if a < 2b. The doors barely matter. His motives do.

And the real show worked like this. In 1991 the New York Times asked Monty Hall about the controversy. He pointed out that he was never required to offer a switch, and that he used that freedom to toy with contestants. The version everyone fought about in 1990 had quietly assumed away his most important decision.

Read Also:  Understanding the faulty proteins linked to cancer and autism

Why I care

Telescope surveys only catch objects bright enough to detect. If you forget that, faint populations vanish from your statistics and your estimates come out biased. Astronomers call it the Malmquist bias. In medicine it’s sometimes referred to as survivorship bias. Statisticians file it under ignoring the selection mechanism. Miller and Sanjurjo show the same “restricted choice” logic from Monty Hall also explains a long-standing bias in studies of the hot hand in basketball.

Monty Fall is that problem with all the clutter removed. So before you ask what the data says, always ask how it got to you.

···

If you want to take one thing from this, take the third column of that first table. The 2/3 lives there, not in the doors. The clumsy host halves it. A biased host makes his choice of door informative, though switching still never hurts you. Old episodes let you estimate his habits, as long as you only count the games where he had a choice and a host who decides when to offer can turn “always switch” into “never switch.”

Code and reproducibility: every number here comes from the simulations and the NumPyro model shown above (NumPyro 0.22 with JAX, NumPy seeds 42 and 7). All figures were made by the author.

···

Side note: Why is it called the Monty Hall problem?

It’s named after Monty Hall, the host and co-creator of the American TV game show Let’s Make a Deal, which first aired in 1963. He was born Monte Halparin in Winnipeg, Canada, in 1921, and he died in 2017. On the show, contestants picked between curtains or doors hiding prizes and “zonks,” and Hall loved tempting them to trade what they’d chosen for something unseen.

The puzzle itself came from a statistician, not from the show. Steve Selvin posed it in a letter to The American Statistician in February 1975, built around that game-show setup. His follow-up letter in August 1975 was the first time the name “Monty Hall problem” appeared in print. It became famous fifteen years later, when vos Savant’s column put it in front of millions of readers.

The show never used this exact three-door game, which is fitting. As we saw, Hall himself pointed out that the real host had far more freedom than the puzzle allows.

References

  1. M. vos Savant, “Ask Marilyn,” Parade, 9 September 1990.

  2. “Monty Hall problem,” Wikipedia. Letter counts and the “Monty from Hell” variant. en.wikipedia.org/wiki/Monty_Hall_problem

  3. A. Vazsonyi, “Which Door Has the Cadillac?,” Decision Line 30(1), 1999. PDF

  4. R. D. Gill, “The Monty Hall problem is not a probability puzzle (it’s a challenge in mathematical modelling),” Statistica Neerlandica 65(1), 58–71, 2011. doi:10.1111/j.1467-9574.2010.00474.x

  5. J. S. Rosenthal, “Monty Hall, Monty Fall, Monty Crawl,” Math Horizons 16(1), 5–7, 2008. PDF

  6. A. Gelman, “Monty Hall and generative modeling: Drawing the tree is the most important step,” Statistical Modeling, Causal Inference, and Social Science, 20 September 2025. Link

  7. J. B. Miller and A. Sanjurjo, “A Bridge from Monty Hall to the Hot Hand: The Principle of Restricted Choice,” Journal of Economic Perspectives 33(3), 144–162, 2019. doi:10.1257/jep.33.3.144

  8. D. Phan, N. Pradhan and M. Jankowiak, “Composable Effects for Flexible and Accelerated Probabilistic Programming in NumPyro,” arXiv:1912.11554, 2019. arxiv.org/abs/1912.11554

  9. J. Tierney, “Behind Monty Hall’s Doors: Puzzle, Debate and Answer?,” The New York Times, 21 July 1991. Reprint (PDF)

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top