View source: R/random_streak.R
random_streak | R Documentation |
Constructs a histogram of a streaky stat applied to ofers for repeated flips of a coin.
random_streak(n = 50, p = 0.5, iter = 1000, stat = sd)
n |
number of coin flips |
width |
probability of heads in each flip |
iter |
number of simulations |
stat |
function to be applied to the sequence of ofers |
Jim Albert
y <- rbinom(500, size=1, prob=0.3) mavg_plot(y, width=20)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.