Trait statrs::statistics::DiscreteDistribution[][src]

pub trait DiscreteDistribution<T: Float>: Distribution<u64> {
    fn mean(&self) -> Option<T> { ... }
fn variance(&self) -> Option<T> { ... }
fn std_dev(&self) -> Option<T> { ... }
fn entropy(&self) -> Option<T> { ... }
fn skewness(&self) -> Option<T> { ... } }

Provided methods

fn mean(&self) -> Option<T>[src]

Expand description

Returns the mean, if it exists.

fn variance(&self) -> Option<T>[src]

Expand description

Returns the variance, if it exists.

fn std_dev(&self) -> Option<T>[src]

Expand description

Returns the standard deviation, if it exists.

fn entropy(&self) -> Option<T>[src]

Expand description

Returns the entropy, if it exists.

fn skewness(&self) -> Option<T>[src]

Expand description

Returns the skewness, if it exists.

Implementors

impl DiscreteDistribution<f64> for NegativeBinomial[src]

fn mean(&self) -> Option<f64>[src]

Returns the mean of the negative binomial distribution

Formula

r * (1-p) / p

fn variance(&self) -> Option<f64>[src]

Returns the variance of the negative binomial distribution

Formula

r * (1-p) / p^2

fn skewness(&self) -> Option<f64>[src]

Returns the skewness of the negative binomial distribution

Formula

(2-p) / sqrt(r * (1-p))