statistics v0.5.0 Statistics.Distributions.Binomial
Binomial distribution.
This models the expected outcome of a number of binary trials, each with known probability, (often called a Bernoulli trial)
Link to this section Summary
Functions
The cumulative density function
The probability mass function
The percentile-point function
Draw a random number from a t distribution with specified degrees of freedom
Link to this section Functions
Link to this function
cdf(n, p)
The cumulative density function
Examples
iex> Statistics.Distributions.Binomial.cdf(4, 0.5).(2)
0.6875
Link to this function
ppf(n, p)
ppf(non_neg_integer(), number()) :: (... -> any())
ppf(non_neg_integer(), number()) :: (... -> any())
The percentile-point function
Examples
iex> Statistics.Distributions.Binomial.ppf(10, 0.5).(0.5)
5
Draw a random number from a t distribution with specified degrees of freedom
Uses the rejection sampling method
Examples
iex> Statistics.Distributions.Binomial.rand(10, 0.5)
5.0