Monty_Hall: Monty Hall Simulator

Description Usage Arguments Details Value Author(s) Examples

View source: R/Personal_Functions.R

Description

A simulator for the famous Monty Hall Problem

Usage

1
Monty_Hall(Games = 10, Choice = "Stay")

Arguments

Games

The number of games to run on the simulation

Choice

Wether you would like the simulation to either 'Stay' with the first chosen door, 'Switch' to the other door, or 'Random' where you randomly decide to either stay or switch.

Details

This is just a toy example of the famous Monty Hall problem. It returns a ggplot bar chart showing the counts for wins or loses in the simulation.

Value

A ggplot graph is produced. There is no return value.

Author(s)

Travis Barton

Examples

1
Monty_Hall(100, 'Stay')

LilRhino documentation built on Oct. 31, 2019, 4:59 p.m.