Description Usage Arguments Value
Run simulations of the Monty Hall problem. Default settings are canonical/classic game parameters, with arguments to change various parameters.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
niter |
Number of simulation iterations or games. |
seed |
Seed integer to set in 'set.seed()'. |
ndoors |
Total quantity of doors for game simulations. |
ndec1 |
Door index to *always* choose in decision 1. |
ndec2 |
Door index to *always* choose in decision 2. |
nprizes |
Total number of prizes for game simulations. |
nrevealdif |
Number of doors Monty does not reveal between player decisions 1 and 2. |
prize.index |
Door index for prize location in each game. |
selectdec1 |
Either "random" or a door index to choose for decision 1. |
doorswitch |
Some number between 0-100 (percent chance to switch). Defaults to 1 (100 percent). |
montyselect |
Set indices of doors Monty reveals. Defaults to "random". |
verbose.results |
Whether to return iteration/game details alongside results. |
A vector of game results, with simulation details if verbose.results = TRUE.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.