| Bell | R Documentation |
Density, distribution function, quantile function and random generation
for the Bell distribution with parameter theta.
dbell(x, theta, log = FALSE)
pbell(x, theta)
rbell(n, theta, max_z = 100L)
qbell(p, theta, max_z = 100L)
x |
vector of nonnegative integers (for |
theta |
scalar nonnegative Bell parameter. |
log |
logical; if TRUE, probabilities p are given as log(p). |
n |
number of observations to generate (for |
max_z |
maximum support value used for approximation in
|
p |
numeric vector of probabilities between 0 and 1 inclusive (for |
Let B_x denote the xth Bell number. The Bell distribution has
probability mass function
P(X = x) = \theta^x \exp(-\exp(\theta) + 1) \frac{B_x}{x!},
for nonnegative integers x and \theta \ge 0.
For \theta > 0, the Bell mean is E[X] = \theta e^\theta.
At \theta = 0, the distribution is degenerate at 0.
The functions follow the standard naming used in base R:
dbell for the density, pbell for the distribution function,
qbell for the quantile function and rbell for random
generation.
For dbell, a numeric vector of probabilities.
For pbell, a numeric vector of cumulative probabilities.
For qbell, an integer vector of quantiles.
For rbell, an integer vector of random values.
dbell(0:5, theta = 1)
pbell(0:5, theta = 1)
qbell(c(0.25, 0.5, 0.9), theta = 1)
set.seed(1)
rbell(10, theta = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.