Description Usage Arguments Details Value Examples
View source: R/monty-hall-problem.R
'play_n_games()' will play the Monty Hall game n amount of times and return a table of game outcomes.
1 | play_n_games(n = 100)
|
n |
Set equal to any number to change how many times the game loop is played. |
The function will automatically run the game 100 times (n = 100). It will return a table reporting proportions of game outcomes based on two strategies. These proportions should be rounded to 2 decimal places.
A table with proportions of LOSE and WIN outcomes from stay and switch strategies.
1 | play_n_games(n = 1000)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.