dist_poisson {distributional} | R Documentation |
The Poisson Distribution
Description
Poisson distributions are frequently used to model counts.
Usage
dist_poisson(lambda)
Arguments
lambda |
vector of (non-negative) means. |
Details
We recommend reading this documentation on https://pkg.mitchelloharawild.com/distributional/, where the math will render nicely.
In the following, let X
be a Poisson random variable with parameter
lambda
= \lambda
.
Support: \{0, 1, 2, 3, ...\}
Mean: \lambda
Variance: \lambda
Probability mass function (p.m.f):
P(X = k) = \frac{\lambda^k e^{-\lambda}}{k!}
Cumulative distribution function (c.d.f):
P(X \le k) = e^{-\lambda}
\sum_{i = 0}^{\lfloor k \rfloor} \frac{\lambda^i}{i!}
Moment generating function (m.g.f):
E(e^{tX}) = e^{\lambda (e^t - 1)}
See Also
Examples
dist <- dist_poisson(lambda = c(1, 4, 10))
dist
mean(dist)
variance(dist)
skewness(dist)
kurtosis(dist)
generate(dist, 10)
density(dist, 2)
density(dist, 2, log = TRUE)
cdf(dist, 4)
quantile(dist, 0.7)
[Package distributional version 0.4.0 Index]