The Double Blind Monty Hall Problem

Last night as I was preparing today's lunch, I ran into an interesting real life scenario that is a variant of the Monty Hall problem. As I thought more about the subject I became more and more convinced that the probability of choosing the right door by switching was 0.5 instead of 0.6667. I even sketched out a Bayes theorem proof of why that is. Then I realized an assumption that the original Monty Hall problem had. And so in this post, I'll sketch out two variations of the Monty Hall problem.

muffins

The picture above is of my lunch today: three muffins baked with MyProtein’s muffin mix. Two of them contain raisins, and one of them contains chocolate chips. I had forgotten which is which. I personally prefer raisins, as the chocolate chips had sunk to the bottom of the pan making a gooey mess that sticks to the muffin papers during the baking process. An initial thought that I had was concerning the probability of choosing a subsequent raisin muffin after I had eaten one. Naturally, in scenarios where there are 3 unknowns and one was revealed, my thoughts get pulled towards the Monty Hall problem.

Two Cars, One Goat

While the Monty Hall problem is concerned with the probability of winning when the player switches doors, I was actually more interested in eating my muffins in this order: raisin, choc chip, raisin. But no matter, the question, if phrased as a variant of the Monty Hall problem would be with two cars and one goat. If Monty had revealed the first door to be a car, would you switch doors?

One thing led to another, and I had soon sketched out the problem as such:

$$ Let\ P(A)\ =\ door\ a\ player\ chooses\ has\ a\ car\\ Let\ P(B)\ =\ door\ Monty\ Hall\ chooses\ has\ a\ car\\ P(A) = \frac{2}{3}\\ P(B) = \frac{2}{3}\\ P(B|A) = \frac{1}{2} $$

A clarification on why $latex P(B|A) = \frac{1}{2} $. You should think of it as such: If you’ve already picked a door, and Monty chooses to open the door after you, the probability Monty gets a car is 50-50.

Given that Bayes Theorem states

$$P(A|B) = \frac{P(B|A)P(A)}{P(B)}\\ P(A|B) = \frac{\frac{1}{2}\times \frac{2}{3}}{\frac{2}{3}}\\ P(A|B) = \frac{1}{2} $$

Here I come to a weird conundrum. When I had sketched this out for myself, I was doing it in my head as a sorta fun activity to think about before I slept. But the answer of 0.5 doesn’t gel with the common wisdom of the Monty Hall problem - it should be 23 instead!

The Double Blind Monty Hall Problem

I tried reframing the question into the original Monty Hall problem, but the solution still indicated that the probability stayed at 13 no matter whether or not a switch happened.

$$ Let\ P(A),\ P(B),\ P(C)\ =\ door\ A,\ B,\ or\ C\ contains\ a\ car;\\ Let\ P(opB|A) = Monty\ opening\ B\ given\ the\ car\ is\ in\ A;\\ P(A) = P(B) = P(C) = \frac{1}{3}\\ P(op\star | \star) = \frac{1}{3}\\ P(op\star) = \frac{1}{3} $$

Application of Bayes Theorem:

$$ P(A|opB) = \frac{P(opB|A)P(A)}{P(opB)}\\ P(A|opB) = \frac{\frac{1}{3}\times \frac{1}{3}}{\frac{1}{3}}\\ P(A|opB) = \frac{1}{3}$$

It was then I realized an assumption that was probably crucial to the statement of the original problem: Monty HAS to know what each door contains, in order to get to the common wisdom of the Monty Hall problem.

Specifically with the $latex P(op\star|\star)$ probability. If Monty knows which door contains the car, the priors change to this:

$$ P(opB | B) = 0\\ P(opB|A) = \frac{1}{2}\\ P(opB|C) = 1\\ \therefore P(opB) = \frac{1}{2} $$

Plugging it into Bayes Theorem:

$$ P(A|opB) = \frac{P(opB|A)P(A)}{P(opB)}\\ P(A|opB) = \frac{\frac{1}{2}\times \frac{1}{3}}{\frac{1}{2}}\\ P(A|opB) = \frac{1}{3} $$

But switching doors:

$$ P(C|opB) = \frac{P(opB|C)P(C)}{P(opB)}\\ P(C|opB) = \frac{1 \times \frac{1}{3}}{\frac{1}{2}}\\ P(C|opB) = \frac{2}{3} $$

So, in order for the probability to be 23 when switching, there is a very important caveat: Monty MUST know which door has the car, and will never open that door. If that information is known to the player, the best option would be to make a switch.

Monty Hall ya bastard!

Simulation

As is the tradition in this type of blog post, there’s a small section of code containing some simulations.

Here’s the result when run:

gallifrey$ python montyhall.py 
Bastard Monty Hall: Switch Wins: 0.66334; Stay Wins: 0.33666
Good Monty Hall: Switch Wins: 0.33287; Stay Wins: 0.3334

As is expected with the math, the probability of winning is the same if Monty Hall doesn’t know which door has the car.

Back to My Muffins

So as it turns out, in a double blind Monty Hall scenario it doesn’t really matter whether or not a decision to switch doors was made (though according to the simulations I should just stay). The probability stays the same. As I told Eugene over Twitter:

So, there you go!

Omnomnomnomnom. Tell me what you think!

Errata and Addendum

11.53am - gist updated as I discovered the bug when actually choosing which muffin to eat

comments powered by Disqus