123 Street Avenue, City Town, 99999

(123) 555-6789

email@address.com

 

You can set your address, phone number, email and site description in the settings tab.
Link to read me page with more information.

The Monty Hall Problem (or why game show contestants need probability lessons)

Blog

Will Moyle's personal blog

The Monty Hall Problem (or why game show contestants need probability lessons)

Will Moyle

Nearly every probability course will make some reference to the ‘Monty Hall Problem’. This peculiar problem has been around for decades and illustrates the surprising, and often counter-intuitive, nature of probability. It’s loosely based upon a game show called ‘Let’s Make a Deal’ and named after the show’s host.

The set-up is this: the player is presented with three doors. Behind one door is a prize - let’s say, for the sake of argument, it’s an Oculus Rift (the door is quite small). Behind the other two doors, there’s something less exciting (maybe it’s a Nintendo Virtual Boy). The player chooses a door. Without any other information, we can hopefully all agree that the odds of our player being pleased with what’s behind the door is 1 in 3 (unless she’s a particular fan of terrible 90’s VR consoles).

Here’s where things get interesting - the game show host opens one of the other two doors that doesn’t hide our grand prize. The player then gets to choose whether to stick with her initial choice, or to open the other closed door. What should she do? The prize is behind one of two doors, so surely the odds are now 50:50 and it makes no difference which door she opens?

Clearly, by the way I phrased the question, the answer is no. She should always switch! In fact, she would have a 2 in 3 chance of getting the prize if she swaps to the other door.

I’m not going to get into the intricacies of probability here, there are a number of sources that’ll explain things much better than I ever could (in fact there's a whole website dedicated to it). Our problem gets more complex when you consider a choice between N doors, in which the host opens P doors without the prize [1].

I was reintroduced to this problem in an excellent book that I’m reading (Naked Statistics, by Charles Wheelan) and it got me thinking about how I could simulate this problem for myself. As is so often the way, this lead to a sleepless night during which I planned out a program in my head that would allow a user to play this game manually themselves and also to run play the game automatically a large number of times, for different numbers of doors, to see if the formulas are correct (hint: they are, they were written by people much smarter than me).

You can find the program that I wrote on my GitHub page, but below are the results of my experiments:

As mentioned earlier, with 3 doors, the win rate when switching is 67%. As the number of doors increases (assuming the host still only opens one 'wrong' door), the win rate drops, but it's always higher than not switching.

 
montyhallchart1
 

Given a set number of doors, in this case 100, the win rate increases as the host opens more doors. If the host opens 98 of the remaining 99 doors, then you have a 99% chance of winning if you switch.

 
montyhallchart2
 

So there you have it, probability is a tricky thing. Perhaps it's best not to trust your gut, especially when you have a computer around!


[1] By the way, for the maths geeks among you, the probability of winning after switching when you have N doors and the host opens P wrong doors is (N - 1) / [N * (N - P - 1)]. Selvin, Steve (August 1975b). "On the Monty Hall problem (letter to the editor)". American Statistician 29 (3): 134. JSTOR 2683443