Bernoulli Distribution
dbern(x, prob, log = FALSE)
pbern(q, prob, lower.tail = TRUE, log = FALSE)
qbern(p, prob, lower.tail = TRUE, log = FALSE)
rbern(n, prob)
A vector of 0s and 1s.
A numeric vector of values between 0 and 1 of the probability of success.
A flag specifying whether to return the log-transformed value.
A vector of quantiles.
A flag specifying whether to return the lower or upper tail of the distribution.
A vector of probabilities.
A non-negative whole number of the number of random samples to generate.
An numeric vector of the random samples.
dbern(1, 0.5)
#> [1] 0.5