Monty Hall Generalized


The Monty Hall problem is a classic problem in game theory. It's based on the game show Let's Make a Deal hosted by Monty Hall, and goes like this:

Suppose you're on a game show, and you're given the choice of three doors: Behind one door is a car; behind the others, goats. You pick a door, say No. 1, and the host, who knows what's behind the doors, opens another door, say No. 3, which has a goat. He then says to you, "Do you want to pick door No. 2?" Is it to your advantage to switch your choice?

The problem as quoted above was posed by statistician Steve Selvin in 1975. With a few steps of reasoning, we can see that the strategy of always switching your choice dominates the strategy of always staying with your initial pick. If you always switch, you have twice the chance of winning the car.

What if we didn't want to limit ourselves to 2 "bad" doors and 1 "good" door? We could generalize the game to have \(k\) total doors, \(a\) doors revealed after the initial pick, and \(h\) "good" doors.

Here's an implementation in R. Simulating two instances of the game for 10,000 runs, we see that always switching handily beats always staying.

In the generalized setting, we view the standard game as having parameters \(k=3,a=1,h=1\).

Always switching is the dominant strategy even in the generalized setting, assuming that the doors are revealed in a truly random manner. We can prove this analytically.

First, we consider the probability of winning when always switching. If the initial pick is "good", which has probability \(h/k\), then there are \(k-a-1\) remaining doors out of which \(h-1\) are "good". If the initial pick is "bad", then \(h\) of the remaining doors are "good". So, the probability of winning when always switching is $$\frac{h}{k}\times\frac{h-1}{k-a-1}+\frac{k-h}{k}\times\frac{h}{k-a-1}=\frac{h(k-1)}{k(k-a-1)}$$ This is clearly greater than \(h/k\), which is the probability of winning when always staying.