DEV Community

Cover image for Monty Hall Problem

Monty Hall Problem

Huy Bui on September 27, 2019

Monty Hall Problem is a famous probability puzzle in statistics. It is named after Monty, the host of the television game show "Let's Makes a Deal"...
Collapse
 
evanoman profile image
Evan Oman • Edited

Great explanation!

I think the k doors case is the best way to develop an intuition for the problem.

Suppose there were 100 doors, you choose one. Then Monty goes ahead and opens 98 non-winning doors from the remaining 99, leaving one door unopened. I think the decision to switch makes more intuitive sense here, and then you can see that the intuition still applies when you scale back to 3 doors.

Collapse
 
williamhuybui profile image
Huy Bui

You are right! Since he never chooses that winning door so we increase our belief that is the one every time he opens the new door.

Collapse
 
blindfish3 profile image
Ben Calder

lol - I had a day-long argument with an ex-girlfriend about this. She insisted that it was a 1 in 2 chance of making the right choice after one door is opened and I was adamant it was 2 in 3. For once I was right :)
Anyway - it's a really good example of how people's intuition around statistics can be completely wrong. Same as the fact that one roll of a dice is never going to affect the outcome of the next...

Collapse
 
williamhuybui profile image
Huy Bui

Thank you. You can use my blog post as part of your explanation next time you see her. :D

Collapse
 
eidsonator profile image
Todd Eidson

I first learned of this problem about ten years ago and one of my hobbies for a while was "arguing" about it over a few drinks with my brother until he finally saw the light. I believe it was the hundred doors variant that finally got him to understand.

It's a strange coincidence that you posted this - I just wrote a Monty Hall Problem simulator on Thursday to get some Java practice in before my new job starts next week. It runs through a million iterations and gets a consistent 67% wins when switching doors.

Collapse
 
williamhuybui profile image
Huy Bui

I was really excited when my simulation result matches the exact result. This stuff is fun!

Collapse
 
williamhuybui profile image
Huy Bui

This is interesting: "This 'equal probability' assumption is a deeply rooted intuition (Falk 1992:202)"..."The problem continues to attract the attention of cognitive psychologists".

I actually had to wrap my mind around to find a good way to make sense of the "switching" strategy in the (n,k) version. Once my simulation worked, I gained some intuition and understood more about the original version.

It is weird how the brain works but it is good to know that I am not alone.

Collapse
 
sumoa profile image
Sumoa

I'm sorry to point this out, but there is an error in your Bayesian formula.

(1/3)/(1/3+2/3) is 1/3 and not 2/3.

I'm not exactly sure where the error is.

Collapse
 
williamhuybui profile image
Huy Bui • Edited

I fixed it. Thank you!

Collapse
 
kumaarpranv profile image
kumaarpranv

written a python simulation when I was introduced to this and funny how true it was.