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

dist_poisson

The Poisson Distribution


Description

[Stable]

Usage

dist_poisson(lambda)

Arguments

lambda

vector of (non-negative) means.

Details

Poisson distributions are frequently used to model counts.

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 = λ.

Support: {0, 1, 2, 3, ...}

Mean: λ

Variance: λ

Probability mass function (p.m.f):

P(X = k) = λ^k e^(-λ) / k!

Cumulative distribution function (c.d.f):

P(X ≤ k) = e^(-λ) ∑_{i = 0}^k λ^i / i!

Moment generating function (m.g.f):

E(e^(tX)) = e^(λ (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)

distributional

Vectorised Probability Distributions

v0.2.2
GPL-3
Authors
Mitchell O'Hara-Wild [aut, cre] (<https://orcid.org/0000-0001-6729-7695>), Earo Wang [ctb] (<https://orcid.org/0000-0001-6448-5260>), Matthew Kay [ctb] (<https://orcid.org/0000-0001-9446-0419>), Alex Hayes [aut] (<https://orcid.org/0000-0002-4985-5160>)
Initial release

We don't support your browser anymore

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