Description Usage Arguments Value Examples
Simulate a sequence of coin tosses
1 | sim_coin_tosses(n_sims, n, prob)
|
n_sims |
The number of simulations |
n |
The length of the coin toss sequence |
prob |
the probability of a head (1) |
An list of length n_sims
, where each
element is a vector of length n
containing a
coin toss sequence: 0 (tails), 1 (heads).
1 | sim_coin_tosses(n_sims = 2, n = 4, prob = 1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.