Description Usage Arguments Details Value Examples
View source: R/monty-hall-problem.R
change_door()
decides for the contestant as to whether they are
keeping their initial door selection or changing their initial
selection.
1 | change_door(stay = T, opened.door, a.pick)
|
stay |
= a true/false argument where we assign the "TRUE" value to if the contestant is sticking with their initial door selection and "FALSE" if they are staying with their initial selection. opened.door = the argument which has the returned door from the open_goat_door() function. a.pick = the arguement containing the contestants initial door selection from the select_door() function |
After the Monty Hall reveals a goat door in the "Let's Make a Deal" game show, the contestant must make a decision as to whehter they are going to keep their initial door selection or change their selection to the other available door. There was a famous debate about whether it was optimal to stay or switch when given the option to switch.
The function returns a length 1 numeric vector indictating the contestants final door choice in the Monty Hall Problem game. The door choice will either be doors 1, 2, or 3.
1 | change_door( stay=T, opened.door, a.pick )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.