Talk:Monty Hall problem: Difference between revisions

Line 33:
:::The problem is that if you make 100000 runs, you should always switch, but remember where you started. That way, you can see if you would have won by staying and if you did win by switching all in one run. Doing it like this can guarantee that you will ''always'' record a total of 100000 outcomes. If you do 100000 runs switching and then 100000 runs staying, then you won't necessarily end up with 100000 total wins. I think Lupus is expecting that the examples only run through once checking to see if you would have won had you stayed and if you did win by switching. --[[User:Mwn3d|Mwn3d]] 17:54, 5 November 2008 (UTC)
:::: Now I understand! As Mwn3d surmised I was expecting the programs to keep a running total of both strategies at once. Thanks for the explanation. --[[User:Lupus|Lupus]] 18:50, 5 November 2008 (UTC)
 
== Is the Perl implementation correct? ==
 
Perl implementation looks suspiciously short. I don't know much of Perl, but it seems to me that the function <tt>play</tt> just calculates a random number in range 0 to 2 and then checks if the result was 0. So it does not actually play the game. --[[User:PauliKL|PauliKL]] 14:25, 12 November 2008 (UTC)
Anonymous user