Statistics.Distributions.Exponential (statistics v0.6.3)

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 variate from the distribution with specified lambda

Functions

@spec cdf() :: (... -> any())

The cumulative density function

Examples

iex> Statistics.Distributions.Exponential.cdf().(1)
0.6321205588285577
@spec cdf(number()) :: (... -> any())
@spec pdf() :: (... -> any())

The probability density function

Examples

iex> Statistics.Distributions.Exponential.pdf().(1)
0.36787944117144233
@spec pdf(number()) :: (... -> any())
@spec ppf() :: (... -> any())

The percentile-point function

Examples

iex> Statistics.Distributions.Exponential.ppf().(0.1)
0.10536051565782628
@spec ppf(number()) :: (... -> any())
@spec rand() :: number()

Draw a random variate from the distribution with specified lambda

Uses the closed-form inverse CDF (PPF) evaluated with uniform number between 0.0 and 1.0

Examples

iex> Statistics.Distributions.Exponential.rand()
0.145709384787
@spec rand(number()) :: number()