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:

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

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 2/3 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 1/3 no matter whether or not a switch happened.

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:

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:

Plugging it into Bayes Theorem:

But switching doors:

So, in order for the probability to be 2/3 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:

in reality my fat self is probably gonna eat all three muffins.

— bsky.app/profile/chewxy.com (@chewxy) May 10, 2017

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