statistics v0.4.0 Statistics.Distributions.Exponential

Exponential distribution.

lambda is the rate parameter and must be greater than zero.

Summary

Functions

The cumulative density function

The probability density function

The percentile-point function

Draw a random number from the distribution with specified lambda

Functions

cdf()

Specs

cdf :: (... -> any)

The cumulative density function

Examples

iex> Statistics.Distributions.Exponential.cdf().(1)
0.6321205588285577
cdf(lambda)

Specs

cdf(number) :: (... -> any)
pdf()

Specs

pdf :: (... -> any)

The probability density function

Examples

iex> Statistics.Distributions.Exponential.pdf().(1)
0.36787944117144233
pdf(lambda)

Specs

pdf(number) :: (... -> any)
ppf()

Specs

ppf :: (... -> any)

The percentile-point function

Examples

iex> Statistics.Distributions.Exponential.ppf().(0.1)
0.10536051565782628
ppf(lambda)

Specs

ppf(number) :: (... -> any)
rand()

Specs

rand :: number

Draw a random number from the distribution with specified lambda

Uses the rejection sampling method

Examples

iex> Statistics.Distributions.Exponential.rand()
0.145709384787
rand(lambda)

Specs

rand(number) :: number