Monty Hall problem: Difference between revisions

Content added Content deleted
No edit summary
Line 371: Line 371:
Not switching allows you to win 33337 out of 100000 times.
Not switching allows you to win 33337 out of 100000 times.
Switching allows you to win 66529 out of 100000 times.</pre>
Switching allows you to win 66529 out of 100000 times.</pre>

=={{header|R}}==


# Since R is a vector based language that penalizes for loops, we will avoid
# Since R is a vector based language that penalizes for loops, we will avoid
Line 437: Line 439:
## AUTHOR: Gregg Lind <gregg.lind @ gmail.com>
## AUTHOR: Gregg Lind <gregg.lind @ gmail.com>
## Date: 9/13/2008
## Date: 9/13/2008
## License: Public Domain, attribution politely requested
## Purpose: Two variations on the Monty Hall problem written in R
## Purpose: Two variations on the Monty Hall problem written in R