Re: [R] Monty Hall simulation

2008-05-12 Thread Farley, Robert
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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Johannes Huesing
Sent: Sunday, May 11, 2008 01:26
To: r-help@r-project.org
Subject: Re: [R] Monty Hall simulation

cirrus74 <[EMAIL PROTECTED]> [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:[EMAIL PROTECTED]  from such a trifling investment of fact.  
  
http://derwisch.wikidot.com (Mark Twain, "Life on the Mississippi")

__
R-help@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.

__
R-help@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.


Re: [R] Monty Hall simulation

2008-05-11 Thread Johannes Huesing
cirrus74 <[EMAIL PROTECTED]> [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:[EMAIL PROTECTED]  from such a trifling investment of fact.  
  
http://derwisch.wikidot.com (Mark Twain, "Life on the Mississippi")

__
R-help@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.


[R] Monty Hall simulation

2008-05-11 Thread cirrus74

Is it possible to simulate the Monty Hall problem using R? If so, could
someone please show me how? Thanks for any help rendered.
-- 
View this message in context: 
http://www.nabble.com/Monty-Hall-simulation-tp17169235p17169235.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@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.