Trait statrs::statistics::MeanN[][src]

pub trait MeanN<T> {
    fn mean(&self) -> Option<T>;
}
Expand description

The Mean trait implements the calculation of a mean.

Required methods

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

Implementors

impl MeanN<Matrix<f64, Dynamic, Const<1_usize>, VecStorage<f64, Dynamic, Const<1_usize>>>> for Dirichlet[src]

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

Returns the means of the dirichlet distribution

Formula

α_i / α_0

for the ith element where α_i is the ith concentration parameter and α_0 is the sum of all concentration parameters

impl MeanN<Matrix<f64, Dynamic, Const<1_usize>, VecStorage<f64, Dynamic, Const<1_usize>>>> for Multinomial[src]

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

Returns the mean of the multinomial distribution

Formula

n * p_i for i in 1...k

where n is the number of trials, p_i is the ith probability, and k is the total number of probabilities

impl MeanN<Matrix<f64, Dynamic, Const<1_usize>, VecStorage<f64, Dynamic, Const<1_usize>>>> for MultivariateNormal[src]

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

Returns the mean of the normal distribution

Remarks

This is the same mean used to construct the distribution