Learn R Programming

statip (version 0.2.3)

dbern: The Bernoulli distribution

Description

Density, distribution function, quantile function and random generation for the Bernoulli distribution.

Usage

dbern(x, prob, log = FALSE)

qbern(p, prob, lower.tail = TRUE, log.p = FALSE)

pbern(q, prob, lower.tail = TRUE, log.p = FALSE)

rbern(n, prob)

Arguments

x

numeric. Vector of quantiles.

prob

Probability of success on each trial.

log

logical. If TRUE, probabilities p are given as log(p).

p

numeric in [0, 1]. Vector of probabilities.

lower.tail

logical. If TRUE (default), probabilities are P[X <= x], otherwise, P[X > x].

log.p

logical. If TRUE, probabilities p are given as log(p).

q

numeric. Vector of quantiles.

n

number of observations. If length(n) > 1, the length is taken to be the number required.

See Also

See the help page of the Binomial distribution.