create_game: Create a new Monty Hall Problem game.

Description Usage Arguments Details Value Examples

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

Description

create_game() generates a new game that consists of two doors with goats behind them, and one with a car.

Usage

1

Arguments

...

no arguments are used by the function

Details

The game setup replicates the game on TV show "Let's Make a Deal" where there are three doors a contestant to choose from, one of which has a car behind it and two have a goats. The contestant selects a door then the host have goats. The contestant selects a door, then the host opens a door to reveal a goat, and then the contestant is given a opportunity to stay with their with their original selection or switch to other unopened door. There was a famous debate about whether it was optimal to stay or switch when given the option to switch, so this simulation was created to test both strategies.

Value

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

Examples

1

Rami-Assaad/montyhall documentation built on Dec. 18, 2021, 9:52 a.m.