Struct probability::distribution::Bernoulli[][src]

pub struct Bernoulli { /* fields omitted */ }

A Bernoulli distribution.

Methods

impl Bernoulli
[src]

Create a Bernoulli distribution with success probability p.

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

Create a Bernoulli distribution with failure probability q.

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

Return the success probability.

Return the failure probability.

Trait Implementations

impl Clone for Bernoulli
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for Bernoulli
[src]

impl Debug for Bernoulli
[src]

Formats the value using the given formatter. Read more

impl Discrete for Bernoulli
[src]

Compute the probability mass function.

impl Distribution for Bernoulli
[src]

The type of outcomes.

Compute the cumulative distribution function.

impl Entropy for Bernoulli
[src]

Compute the differential entropy. Read more

impl Inverse for Bernoulli
[src]

Compute the inverse of the cumulative distribution function.

impl Kurtosis for Bernoulli
[src]

Compute the excess kurtosis.

impl Mean for Bernoulli
[src]

Compute the expected value.

impl Median for Bernoulli
[src]

Compute the median.

impl Modes for Bernoulli
[src]

Compute the modes.

impl Sample for Bernoulli
[src]

Draw a sample.

impl Skewness for Bernoulli
[src]

Compute the skewness.

impl Variance for Bernoulli
[src]

Compute the variance.

Compute the standard deviation.

Auto Trait Implementations

impl Send for Bernoulli

impl Sync for Bernoulli