Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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.


statip

Statistical Functions for Probability Distributions and Regression

v0.2.3
GPL-3
Authors
Paul Poncet [aut, cre], The R Core Team [aut, cph] (C function 'BinDist' copied from package 'stats'), The R Foundation [cph] (C function 'BinDist' copied from package 'stats'), Adrian Baddeley [ctb] (C function 'BinDist' copied from package 'stats')
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.