statistics v0.5.0 Statistics.Distributions.Poisson

The Poisson distribution is a discrete probablility distribution.

It models the probability of a given number of events occurring in a fixed interval if the events occur with a known average rate and are independent of the previous event.

Link to this section Summary

Functions

Get the probability that a value lies below k

Probability mass function

The percentile-point function

Draw a random number from this distribution

Link to this section Functions

Link to this function cdf(lambda)
cdf(number()) :: (... -> any())

Get the probability that a value lies below k

Examples

iex> Statistics.Distributions.Poisson.cdf(1).(1) 0.73575888234288467

Link to this function pmf(lambda)
pmf(number()) :: (... -> any())

Probability mass function

Examples

iex> Statistics.Distributions.Poisson.pmf(1).(1)
0.36787944117144233
Link to this function ppf(lambda)
ppf(number()) :: (... -> any())

The percentile-point function

Get the maximum point which lies below the given probability. This is the inverse of the cdf and will take only positive integer values (but returns a float)

Examples

iex> Statistics.Distributions.Poisson.ppf(1).(0.95)
3.0
Link to this function rand(lambda)
rand(number()) :: number()

Draw a random number from this distribution

This is a discrete distribution and the values it can take are positive integers.

Examples

iex> Statistics.Distributions.Poisson.rand(1)
1.0