Learn R Programming

distributional (version 0.6.0)

dist_poisson: The Poisson Distribution

Description

[Stable]

Poisson distributions are frequently used to model counts. The Poisson distribution is commonly used to model the number of events occurring in a fixed interval of time or space when these events occur with a known constant mean rate and independently of the time since the last event. Examples include the number of emails received per hour, the number of decay events per second from a radioactive source, or the number of customers arriving at a store per day.

Usage

dist_poisson(lambda)

Arguments

lambda

The rate parameter (mean and variance) of the distribution. Can be any positive number. This represents the expected number of events in the given interval.

Details

We recommend reading this documentation on pkgdown which renders math nicely. https://pkg.mitchelloharawild.com/distributional/reference/dist_poisson.html

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)} $$

Skewness:

$$ \gamma_1 = \frac{1}{\sqrt{\lambda}} $$

Excess kurtosis:

$$ \gamma_2 = \frac{1}{\lambda} $$

See Also

Examples

Run this code
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)

Run the code above in your browser using DataLab