rvbern | R Documentation |
Sample a vector of Bernoulli variables with higher speed
(same length with "p"
).
The Bernoulli random variables can have different means.
rvbern(p)
p |
A vector of probabilities, each being the head probability of an independent coin toss |
A vector of 1s (head) and 0s (tail)
rvbern(c(0.9,0.1,0.2,0.3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.