create_game: Recreate The Monty Hall Problem Game.

Description Usage Arguments Details Value Examples

View source: R/Monty-Hall-Problem.R

Description

create_game() starts a new game with three doors, two of which conceal goats and one which conceals a car.

Usage

1

Arguments

...

no arguments are used by the function.

Details

The game setup is designed after the TV show "Let's Make a Deal", where a player chooses one of three doors in the hope of revealing a car and not a goat. Once the player select's their first door, the game host opens another door, revealing a goat. Then the player is given the opportunity to stick with their original door selection or swtich to the other unopened door. It has been debated as to whether it is more adventageous to switch doors or to stay with the original selection This simulation allows us to see the odds of winning based on either strategy.

Value

The function returns a length 3 character vector indicating the positions of goats and the car.

Examples

1

DMBurwell/montyhall documentation built on Jan. 31, 2021, 12:41 a.m.