open_goat_door: Host Opens Goat Door.

Description Usage Arguments Details Value Examples

View source: R/newscriptmontyhall.R

Description

open_goat_door() generates door with goat behind it to be opened by the host.

Usage

1
open_goat_door(game, a.pick)

Arguments

...

initial door selected by the contestant

Details

The host will open a goat door and a door different than the one that was chosen by the contestant.So if the contestant has chose initially a car door then the host can now choose randomly any other door, but if the contestant has initially chose a door where there is a goat behind it, then now the host must choose the other goat door so the host will have in this case one option door to be choosed.

Value

The function returns a one numerical number indicating which door is slected by the host.

Examples

1

ZEINAZEINEDDINE/montyhall documentation built on Sept. 20, 2020, 12:44 a.m.