[R] Monty Hall simulation

Farley, Robert FarleyR at metro.net
Mon May 12 20:03:14 CEST 2008


The common "Monty Hall" problem (where the MC helps out the contestant) is not random!  See:
http://en.wikipedia.org/wiki/Monty_Hall_problem




My edits were removed as I had no references.  :-(

Maybe you can verify my statements, included below. :-)


Another analysis considers three types of hosts and three prize levels. The Benevolent Host always shows the worst remaining prize after you choose, the Random Host randomly picks a remaining door to show, and the Malevolent Host always shows the best remaining prize. The prizes are bad, middle, best; e.g. Goat, Luggage, Car. The Player is unaware of which prize is which. He may expect to be choosing among Pigs, Goats, Blenders, Luggage, Cars, and Houses.

If you always switch, the results for each host are:

Results after switching, expanded behaviors 
Host V /Prize -> 	Bad 	Middle 	Good 
Benevolent Host 	0% 	33% 		67% 
Random Host 		33% 	33% 		33% 
Malevolent Host 	67% 	33% 		0% 

If each host were equally likely, the total probability for each prize would be 33%-the same as not switching. Without knowing the type of Host and the prize mix, you can make no meaningful statement about the success of a switching strategy.

The only way for a Player to "improve the odds" is if he or she can get some meaningful information from the prize shown. I.e., if you know what the three prizes are and what type of Host you have, then you can develop a winning strategy. If you were wrong about either the Host or the prize mix, that strategy may be harmful.






 
Robert Farley
Metro
www.Metro.net 
 
-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Johannes Huesing
Sent: Sunday, May 11, 2008 01:26
To: r-help at r-project.org
Subject: Re: [R] Monty Hall simulation

cirrus74 <cirrus74 at hotmail.com> [Sun, May 11, 2008 at 03:44:46AM CEST]:
> 
> Is it possible to simulate the Monty Hall problem using R? If so, could
> someone please show me how? Thanks for any help rendered.

The kind of simulation, as any thinking about this seeingly paradoxical
situation, depends on your mindset.

To my mind, 

niter <- 999
prize <- sample(c("car", "car", "goat"), niter, replace=TRUE)

would be a perfect simulation.

-- 
Johannes Hüsing               There is something fascinating about science. 
                              One gets such wholesale returns of conjecture 
mailto:johannes at huesing.name  from such a trifling investment of fact.                
http://derwisch.wikidot.com         (Mark Twain, "Life on the Mississippi")

______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list