change_door: Change Doors

Description Usage Arguments Details Value Examples

View source: R/monty-hall-problem (4).R

Description

change_door( stay=T, opened.door, a.pick ) generates the option given to the contestant to change from their initial selection to the other door that still remains closed.

Usage

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

Arguments

...

Based on the game playing strategy stay=TRUE or stay=False will be assigned.

Details

The contestant is now granted a chance to change from his/her initial selection to the door that still remains closed. Contestant must now decide if they wish to stick with original selection, or change to the remaining unopened door.

Value

The function returns a length 3 character vector indicating a number between 1 and 3, this will indicate a final pick made by the contestant.

Examples

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

bbeltran2395/montyhall documentation built on Dec. 19, 2021, 6:46 a.m.