Description Usage Arguments Details Value Examples
View source: R/monty-hall-problem.R
Allows user to run the simulation for n times to know the WIN/LOSE probability.
1 | play_n_games(n = 100)
|
... |
arguments used are number of simulations user specifies |
The function helps us understand game outcomes if contestant stays or switches and it takes into account the number of times the contestant plays.Results are stored in a data frame and returns probabilities of the two game strategies that are stay and switch.
number of times where stay and switch strategies show WIN and LOSE outcomes.
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.