change_door: Change doors

Description Usage Arguments Details Value Examples

View source: R/monty-hall-problem.R

Description

Contestant has the choice to switch or stay with original choice of the door.

Usage

1
change_door(stay = T, opened.door, a.pick)

Arguments

...

arguments are ( stay=T, opened.door, a.pick )

Details

The contestant is given the option to change from their initial selection to the other door that is still closed. The function will represent the game-playing strategy as the argument stay=TRUE or stay=FALSE. After host opens one of the doors that is not what the contestant picked nor the car door the contestant has the choice of switching to the other door.

Value

The function returns a length 1 numeric vector.

Examples

1
change_door( stay=T, opened.door, a.pick )

malmufre/montyhall documentation built on Sept. 20, 2020, 12:46 a.m.