Description Usage Arguments Value Examples
This function simulates the probability that a game show contestant, searching for a new car behind a set of three closed doors, will win the prize upon switching their original door choice after a non- winning door is revealed. The problem was first proposed by Steve Selvin.
1 |
n |
The number of games to simulate. |
shift |
Whether to switch to a second door, a boolean value. |
A rational approximation of the probability that a player will win a new car after switching their original door choice after a non-winning door is revealed.
1 | monty(10000)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.