View source: R/chapter1_annot.R View source: R/chapter1.R
| HTSimulation | R Documentation |
Simulates and summarizes the distribution of a trajectory of a trivial game
based on n coin tosses, interpreted as Heads winning $1 and T losing $1.
HTSimulation(m, n, prob_heads = 0.5)
The distribution is estimated by sampling m trajectories.
Returns a tibble with two columns each of length m:
winnings: the total winnings at the end of the nth round.
ahead: the total number of rounds during which the player was ahead.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.