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

Poisson

Create a Poisson distribution


Description

Poisson distributions are frequently used to model counts.

Usage

Poisson(lambda)

Arguments

lambda

The shape parameter, which is also the mean and the variance of the distribution. Can be any positive number.

Details

We recommend reading this documentation on https://alexpghayes.github.io/distributions3, where the math will render with additional detail.

In the following, let X be a Poisson random variable with parameter lamdba = λ.

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

Value

A Poisson object.

See Also

Examples

set.seed(27)

X <- Poisson(2)
X

random(X, 10)

pdf(X, 2)
log_pdf(X, 2)

cdf(X, 4)
quantile(X, 0.7)

cdf(X, quantile(X, 0.7))
quantile(X, cdf(X, 7))

distributions3

Probability Distributions as S3 Objects

v0.1.1
MIT + file LICENSE
Authors
Alex Hayes [aut, cre] (<https://orcid.org/0000-0002-4985-5160>), Ralph Moller-Trane [aut], Emil Hvitfeldt [ctb] (<https://orcid.org/0000-0002-0679-1945>), Daniel Jordan [ctb], Bruna Wundervald [ctb]
Initial release

We don't support your browser anymore

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