Bernoulli | R Documentation |
Probability mass function, distribution function, quantile function and random generation for the Bernoulli distribution.
dbern(x, prob = 0.5, log = FALSE)
pbern(q, prob = 0.5, lower.tail = TRUE, log.p = FALSE)
qbern(p, prob = 0.5, lower.tail = TRUE, log.p = FALSE)
rbern(n, prob = 0.5)
x , q |
vector of quantiles. |
prob |
probability of success; ( |
log , log.p |
logical; if TRUE, probabilities p are given as log(p). |
lower.tail |
logical; if TRUE (default), probabilities are |
p |
vector of probabilities. |
n |
number of observations. If |
Binomial
prop.table(table(rbern(1e5, 0.5)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.