# Monty hall problem, getting different probabilities using different formulas?

In my Monty hall problem, I am computing what is the probability that P(H=1|D=3) i.e. price is behind door 1 and the 3rd door is opened.

$P(H=1|D=3) = p(H=1) * \frac{p(D=3|H=1)} {p(D=3)} = 1/3 * 1/2 / 1/3 = 1/2 = 50\%$

$P(H=1|D=3) = p(H=1) \frac{p(D=3|H=1}{\sum_{i=1} ^3 p(H=i) * p(D=3|H=i)} = \frac{1/3 * 1/2} { 1/3 * 1/2 + 1/3 * 1 + 0} = 1/3 = 33\%$

And when I use Bayes formula without summation in the denominator I get answer 50% and when I use summation in the denominator in Bayes formula I get 33%. Why there is difference?

• Could you explain what "Bayes formula without summation in the denominator" is intended to do? – whuber May 20 '16 at 20:29
• These two formulas are equivalent, so I must get same answer from both, but I'm not. Why there is difference? – Inder Gill May 20 '16 at 20:51
• It is difficult to determine what "these two formulas" might be. Do you think you could use the $\TeX$ markup facility to make them readable? – whuber May 20 '16 at 20:52
• math.cornell.edu/~mec/2008-2009/TianyiZheng/Images/image28.png It has two formulas, one with summation and other without summation in the denominator. – Inder Gill May 20 '16 at 20:54
• Which door was chosen by the player? I'm assuming one, but this wasn't made explicitly clear and affects the math a bit. (If player chose 2 then obviously your second denominator is a bit wonky.) – Kitter Catter May 21 '16 at 3:02

## 3 Answers

I think you are making a mistake in the denominator of the former. $P(A) = \sum_B P(A|B) P(B)$

Since rushing made me write something kinda terrible I'll pay some penance by writing out a more full solution!

## The Bayes Approach to the Monty Hall Problem

In general I think you are making the Monty Hall problem a little bit more confusing when you omit the player's choice. The player chooses an arbitrary door so without loss of generality let's call it one. I believe this is what you did, but let's just be a bit more explicit. Next we write out the probability:

$P(H=1|D=3) = \frac{P(H=1) P(D=3|H=1)}{P(D=3)}$

We can calculate the numerator as $P(H=1) = \frac{1}{3}$ since each door is equally likely. We also calculate $P(D=3|H=1) = \frac{1}{2}$ since if $H=1$ Monty can pick either door without showing the grand prize. Moving on:

$P(H=1|D=3) = \frac{\frac{1}{3} \frac{1}{2}}{P(D=3|H=1)*P(H=1)+P(D=3|H=2)P(H=2)+P(D=3|H=3)P(H=3)}$

Next we have a set of terms to consider: $P(H=i)$ is $\frac{1}{3}$ for the same reason as above. Finally the conditionals: $P(D=3|H=1)=\frac{1}{2}$ as above. $P(D=3|H=2) = 1$ this is because Monty can't show door 1 since the player picked it, Monty can't show door 2 because it has the grand prize, and thus Monty must show door 3. Finally there is $P(D=3|H=3) = 0$ this is because Monty can't show the prize. Thus:

$P(H=1|D=3)= \frac{\frac{1}{3} \frac{1}{2}}{(\frac{1}{2}+ 1+ 0)(1/3)} = \frac{\frac{1}{3}\frac{1}{2}}{\frac{1}{3} \frac{3}{2}}=1/3$

## Lonely Monty Hall Problem

This is not to be interpreted as the standard Monty Hall problem. Say that we revisit the problem without a player. There are again three doors, one of which has a grand prize behind it. Monty will choose and open a door that doesn't have the grand prize behind it and we are tasked with evaluating the probability that the grand prize is behind door 1.

The original write up of the question doesn't explicitly include the player so this is a fair interpretation.

Calculation via Bayes Theorem:

Let's start by just writing out the expression:

$P(H=1|D=3) = \frac{P(H=1) P(D=3|H=1)}{P(D=3)}$

Working from here $P(H=1) = \frac{1}{3}$ and $P(D=3|H=1)=\frac{1}{2}$ as above. We would then expand the denominator:

$P(D=3) = \sum_i P(D=3|H=i) P(H=i)$

Now what's different is that the player has not made a choice on door so we need to calculate the various conditional probabilities. $P(D=3|H=1) = \frac{1}{2}$ since Monty has two choices open door 2 or door 3. Similarly, $P(D=3|H=2) = \frac{1}{2}$, finally $P(D=3|H=3) = 0$ since Monty can not reveal the prize.

Overall this gives:

$P(H=1|D=3) = \frac{\frac{1}{3} \frac{1}{2}}{\frac{1}{3} \frac{1}{2}+\frac{1}{3} \frac{1}{2}+\frac{1}{3} 0} = \frac{1}{2}$

• This is not true. The formula, as written by OP, is correct. The problem is that $P(D = 3)= 0.5$ in the first formula, assuming that $D = 3$ means that the host opened door 3 and that the usual MH problem is being proposed. – guy May 21 '16 at 0:01
• So you agree that he is making a mistake in the denominator and my equation corrects that error. What part of my answer is not true then? – Kitter Catter May 21 '16 at 0:05
• The formula you wrote is wrong. It would be true if the conditioning bar was an intersection instead. – guy May 21 '16 at 0:08
• I'm trying to pay penance to you @guy sorry for being a jerk earlier! – Kitter Catter May 21 '16 at 2:51
• +1, most important thing is that the answer is correct now, but FWIW you didn't come across as a jerk. We are all here to help, so I assume the best intentions! – guy May 21 '16 at 3:27

Your problem is that $P(D=3 \mid H=2) = \frac{1}{2}$ but you incorrectly wrote that it equals 1

# Explanation:

Let $D$ be the door with the prize. Let $H$ be the door Mr. Hall opens. The joint distribution of $D$ and $H$ is described in this table: $$\begin{array}{cccc} &\text{H=1}&\text{H=2}&\text{H=3} \\ D = 1 & 0 & \frac{1}{6} & \frac{1}{6} \\ D = 2 & \frac{1}{6} & 0 & \frac{1}{6} \\ D = 3 & \frac{1}{6} & \frac{1}{6} & 0 \end{array}$$

The problem is in the denominator of your second formula:

$P(H=1|D=3) = p(H=1) \frac{p(D=3|H=1}{\sum_{i=1} ^3 p(H=i) * p(D=3|H=i)} = \frac{1/3 * 1/2} { 1/3 * 1/2 + 1/3 * 1 + 0} = 1/3 = 33\%$

You incorrectly wrote $P(D=3 \mid H=2) = 1$ That is incorrect.

$$P(D=3\mid H=2) = \frac{P(D=3,H=2)}{P(H=2)} = \frac{1/6}{1/3} = \frac{1}{2}$$

Make that correction and you have: $P(H=1|D=3) = p(H=1) \frac{p(D=3|H=1}{\sum_{i=1} ^3 p(H=i) * p(D=3|H=i)} = \frac{1/3 * 1/2} { 1/3 * 1/2 + 1/3 * 1/2 + 0} = 1/2$ which is correct

# An additional comment:

This analysis does not solve the Monty Hall problem because it completely neglects the door $C$ that the contestant chooses.

• This makes me think of some crazy game show host all alone in a dingy/abandoned television studio. He randomly opens doors to reveal skunk prizes, closes them, re-arranges the order so he can repeat the process. No one is around to make a choice of door. – Kitter Catter May 21 '16 at 3:58

NOTE: I noticed a lot of people had trouble understanding the problem, so I tried to rephrase and organize everything here.

Looks like the original post was subsequently refined to include more legible formulas, which precipitated more meaningful answers. SO! You can ignore this post.

It seemed like there was some confusion here, partially about the question and partially about the answer. I noticed that all the info was sorta disparate and floating around, so I decided to organize everything here.

Summary of Problem: Inder Gill tried two different Bayesian formulations of the Monte Hall problem and got two different answers. So, why was this the case?

InderGill was using this formula comparison as guide:

1) Here's @Inter Gill's first formula in markup

Formula 1:

2) But compare to Formula 2, where InterGill got the wrong answer.

Weird! So, why was this formula wrong?!

# ANSWER

On Reddit, u/BurkeyAcademy had a pretty good answer (https://www.reddit.com/r/statistics/comments/4kabyn/probability_monty_hall_problem_getting_different/)

Basically, InterGill's second formula was misinterpreted.

The denominator in the second formula was off!

Below, BurkeyAcademy reformulates Inter Gill's formula 1. Using A to indicate "prize behind door 1" and Bi indicates "he opens doors 1,2, or 3".

Here's the numerator for Bayes formula, which is 1/3*1/2:

Here's the denominator, with the SUM formulation

Important part of the answer

P(A) is equal to the sum of all P(A) possibilities.

Basically, P(A) is equal to the probability of getting the prize if you opened door1 + the same probability as if you opened door 2 and the same for door 3.

Because Monte Hall has already opened door 1, that one is equal to 0, as you can see when we fill in the formula with numbers.

The main difference between the correct denominator formulation (below) and the incorrect formulation (above) is that InterGill multiplied one of the probabilities by 1 instead of 1/2!

All of those multipliers need to sum to 1, otherwise P(A) has a probability greater than 1!

We're essentially computing the remaining probability of the prize behind behind one of the doors.

There are two doors, right? Originally the probability of selecting the prize was 1/3, but we're updating that probability, because there are only 2 doors. So the denominator comes to: 1/3*1/2 + 1/3+1/2

Hope this helps!

• The key to understanding the MHP is that M knows where the goat is and will never open that door. That adds "information". I think the Bayes formulation in mark(up or down) actually detracts from most peoples understanding. – DWin May 20 '16 at 23:37
• Should not say "looks right" on formula 1 when it gives the answer 0.5, considering this corresponds to the famously wrong answer to the MH problem... – guy May 21 '16 at 0:06
• It looks like you made an error in the denominator: $P(D=3|H_i) P(H_i)$ implies the probability of opening door 3 given the prize is behind door 1. The conditionals need not sum to 1 since the condition changes. The one is perfectly valid since if the prize is behind door number 2 the odds of monte opening door 3 must be one given the player chose door number 1. I think there may be some confusion since there isn't an explicit choice for the player given. In order for Monte Hall to make sense the player must have chosen a door. – Kitter Catter May 21 '16 at 2:58