The Monty Hall Problem
Written by Mike James   
Thursday, 06 March 2014
Article Index
The Monty Hall Problem
Applying the logic

Just three doors 

Now try the original MH(3,2) problem.

The reasoning is exactly the same as in the MH(100,98) case, but not quite as extreme.

The player picks a door which has a 1/3 chance of having a car behind it.

This means that the car has a 2/3 chance of being behind the doors that the host has control of. After the host opens the door to reveal a goat the car still has a 2/3 chance of being behind the unopen door - again you would be an idiot not to swap. 

Easy really!

And it is all because the car has more chance of being behind one of the doors that hasn't been picked!

 

goat2

The general case

You can even generalize to MH(n,m).  

When the player picks a single door there are n-1 left and so the probability of picking the wining door is just 1/n and the probability of the car being behind a door in the unpicked set is (n-1)/n or (1-1/n).

If the host now opens m doors to show m goats the probability that the car is behind the remaining n-m-1 doors is still (1-1/n) and hence the chance that is behind any one door is (1-1/n)/(n-m-1).

As long as

(1-1/n)/(n-m-1) > 1/n

then the player should switch. 

For example in the case of MH(3,1) we have

(1-1/3)/(3-1-1)=2/3>1/3

so you should switch. In the case of MH(100,98)

(1-1/100)/(100-98-1) > 1/100

and again you should switch. 

If you work this out for a few other examples, you should be able to see that only if the host opens even one door the player should switch because the probability that the car is behind one of the other doors is still better than the initial choice offered.

Other examples

What is interesting is that this situation occurs in other situations and you need to keep watch for it. 

For example, you get exactly the same set of conditions with the three-shell trick. Here you place a pea under a shell, let the player pick a shell at random, reveal that the pea isn't  under one of the other two shells, should the player switch? Of course, this is just MH(3,2). 

There are card games where the banker has a knowledge of the hand and can remove cards that are clearly non-winning and show the players - the same mechanism applies. 

Whenever you make a random choice of some state and leave a larger set of possible states, then it is always better to re-choose if another mechanism whittles down the number of possible states after the choice.

The reason is that it is more likely that your first choice failed, and that what you are looking for is in the set of states that has now been reduced. So the probability of your new guess being correct is always geater than the probablity of your original guess.

goat1

Related Articles

Dangerous Logic - De Morgan & Programming

How not to shuffle - the Knuth Fisher-Yates algorithm

Universal Hashing

What's a Sample of Size One Worth?       

The Monte Carlo Method        

Inside Random Numbers       

 

 

To be informed about new articles on I Programmer, install the I Programmer Toolbar, subscribe to the RSS feed, follow us on, Twitter, FacebookGoogle+ or Linkedin,  or sign up for our weekly newsletter.

 

blog comments powered by Disqus

 

 

Banner


Game Of Phones From DZone
14/07/2014

DZone's 2014 Guide to Mobile Development presents an analysis of the current state of mobile development with survey results from over 1000 mobile developers.



DevArt Exhibition Now Open
05/07/2014

Google's DevArt is now on show at London's Barbican Centre as part of  Digital Revolution, the biggest exploration of digital creativity ever staged in the UK.


More News

 



Last Updated ( Thursday, 06 March 2014 )
 
 

   
RSS feed of all content
I Programmer - full contents
Copyright © 2014 i-programmer.info. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.