Monty Hall Problem With Uneven Door Probabilities

1k Views Asked by At

In the conventional Monty Hall problem it is assumed that the probability of the car being placed behind any of the three doors is the same (namely, $\frac{1}{3}$). (In other words, the host has no inherent bias of placing the car behind a door versus the other two). But what if the probabilities of the car being behind doors 1, 2, or 3, with probabilities $p_1, p_2$ and $p_3$ respectively, are such that the assumption $p_1 = p_2 = p_3$ is not necessarily true.

To test whether switching would be beneficial, I decided to experiment using python. I tested switching every time, not switching any time, and randomly deciding whether to switch one million times each. For each option, I used python to generate three random (technically pseudo-random) probabilities, then carried out the experiment. (I will spare you the details of the programming).

The results for each option I got were very close to $0.5$. This means that it does not matter whether we switch, do not switch or randomly decide to switch. But more surprising is that given three doors with uneven probabilities of having the car behind, the probability of winning the car is $0.5$ (assuming the contestant picks randomly). Is there any mathematical justification to this? Is my interpretation of the results correct?

Edit-- Here is the code snippet for generating random probabilities that I used:

def prob_gen(): #Generates random probabilities
    prob_a = round(random.uniform(0, 1), 4)
    prob_b = round(random.uniform(0, 1 - prob_a), 4)
    prob_c = round(1 - (prob_a + prob_b), 4)
    return [prob_a, prob_b, prob_c]

Full code is here: https://www.pastiebin.com/5a4d75a3e880e

2

There are 2 best solutions below

12
On BEST ANSWER

In your setup, the probability the prize is behind door $a$ is $E(p_1) = \frac{1}{2}$ and you also assume they start in front of door $a,$ so there is indeed a $1/2$ probability of getting the prize regardless if you switch or not.

2
On

This is just an artifact of the way you randomly generated $p_1$, $p_2$, and $p_3$. Note that randomly generating these three probabilities and then using them to pick the winning door is equivalent to just using the average randomly generated value of each of them as your probabilities to pick the winning door. You have chosen $p_1$ uniformly between $0$ and $1$, so its average value is $1/2$. You then chose $p_2$ uniformly between $0$ and $1-p_1$. Since this bound is linear in $p_1$ and the average value of $p_1$ is $1/2$, the average value of $p_2$ is $1/4$. Finally, the average value of $p_3$ is $1-1/2-1/4=1/4$.

So what you have done is completely equivalent to running the game with $p_1=1/2$, $p_2=1/4$, and $p_3=1/4$. Since you collected your data based on the assumption that the player always chooses door 1 first, that means they have a $1/2$ chance of being correct initially, and therefore there is a $1/2$ chance that they should not switch.