Struct probability::distribution::Binomial[][src]

pub struct Binomial { /* fields omitted */ }

A binomial distribution.

Methods

impl Binomial
[src]

Create a binomial distribution with n trails and success probability p.

It should hold that p >= 0 and p <= 1.

Create a binomial distribution with n trails and failure probability q.

It should hold that if q >= 0 or q <= 1. This constructor is preferable when q is very small.

Return the number of trials.

Return the success probability.

Return the failure probability.

Trait Implementations

impl Clone for Binomial
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for Binomial
[src]

impl Debug for Binomial
[src]

Formats the value using the given formatter. Read more

impl Discrete for Binomial
[src]

Compute the probability mass function.

For large n, a saddle-point expansion is used for more accurate computation.

References

  1. C. Loader, “Fast and Accurate Computation of Binomial Probabilities,”

impl Distribution for Binomial
[src]

The type of outcomes.

Compute the cumulative distribution function.

The implementation is based on the incomplete beta function.

impl Entropy for Binomial
[src]

Compute the differential entropy. Read more

impl Inverse for Binomial
[src]

Compute the inverse of the cumulative distribution function.

For small n, a simple summation is utilized. For large n and large variances, a normal asymptotic approximation is used. Otherwise, the Newton method is employed.

References

  1. S. Moorhead, “Efficient evaluation of the inverse binomial cumulative distribution function where the number of trials is large,” Oxford University, 2013.

impl Kurtosis for Binomial
[src]

Compute the excess kurtosis.

impl Mean for Binomial
[src]

Compute the expected value.

impl Median for Binomial
[src]

Compute the median.

impl Modes for Binomial
[src]

Compute the modes.

impl Sample for Binomial
[src]

Draw a sample.

impl Skewness for Binomial
[src]

Compute the skewness.

impl Variance for Binomial
[src]

Compute the variance.

Compute the standard deviation.

Auto Trait Implementations

impl Send for Binomial

impl Sync for Binomial