Statistics.Distributions.Hypergeometric (statistics v0.6.3)

Hypergeometric distribution.

It models the probability that an n numbers of trials result in exactly k successes, with a population of pn items, where pk are considered as successes.

Summary

Functions

The cumulative density function

The probability mass function

The percentile-point function

Draw a random number from hypergeometric distribution

Functions

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

The cumulative density function

Examples

iex> Statistics.Distributions.Hypergeometric.cdf(52, 5, 13).(2)
0.9072328931572629
@spec pmf(non_neg_integer(), non_neg_integer(), non_neg_integer()) :: (... -> any())

The probability mass function

Examples

iex> Statistics.Distributions.Hypergeometric.pmf(50, 5, 10).(4)
0.003964583058015066
@spec ppf(non_neg_integer(), non_neg_integer(), non_neg_integer()) :: (... -> any())

The percentile-point function

Examples

iex> Statistics.Distributions.Hypergeometric.ppf(80, 20, 50).(0.1)
10
Link to this function

rand(pn, pk, n)

Draw a random number from hypergeometric distribution