Description Usage Arguments Details Value Examples
View source: R/monty-hall-problem (4).R
open_goat_door( game, a.pick )
generates a selection made from the host,
will always open a door containing a goat behind it. This selection cannot
be the door the contestant initially selected.
1 | open_goat_door(game, a.pick)
|
... |
If the contestant selected car, randomly select one of the two goats, if contestant selected goat, select other door containing a goat. |
When the host opens a door revealing a goat, it cannot be a door the contestant selected, nor can it be the door containing the car. If the contestant selected the car in his/her initial selection, the host can open either of the other doors containing goats.
The function returns a length 3 character vector indicating a number between 1 and 3, that will indicate the door opened by the host revealing a goat.
1 | open_goat_door( game, a.pick )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.