Description Usage Arguments Details Value Author(s) Examples
Simulate a random sample from the Bernoulli distribution.
1 | psi.rbern(n, p)
|
n |
number of observations. |
p |
probability of success. |
A random variable has the Bernoulli(p) distribution if takes the value one with probability p and the value zero with probability 1-p.
The Bernoulli(p) distribution is a particular case of the binomial distribution with n=1.
a numeric vector representing a random sample from Bernoulli(p)
Georgi N. Boshnakov (but note that this function is a simple wrapper for
rbinom
from core R)
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.