[][src]Trait statrs::statistics::CheckedSkewness

pub trait CheckedSkewness<T> {
    fn checked_skewness(&self) -> Result<T>;
}

The CheckedSkewness trait specifies an object that has a closed form solution for its skewness(s) with possible failure modes

Required methods

fn checked_skewness(&self) -> Result<T>

Returns the skewness.

Examples

use statrs::statistics::CheckedSkewness;
use statrs::distribution::FisherSnedecor;

let n = FisherSnedecor::new(1.0, 1.0).unwrap();
assert!(n.checked_skewness().is_err());
Loading content...

Implementors

impl CheckedSkewness<f64> for FisherSnedecor[src]

fn checked_skewness(&self) -> Result<f64>[src]

Returns the skewness of the fisher-snedecor distribution

Errors

If freedom_2 <= 6.0

Remarks

Returns NaN if freedom_1 or freedom_2 is INF

Formula

This example is not tested
((2d1 + d2 - 2) * sqrt(8 * (d2 - 4))) / ((d2 - 6) * sqrt(d1 * (d1 + d2
- 2)))

where d1 is the first degree of freedom and d2 is the second degree of freedom

impl CheckedSkewness<f64> for Hypergeometric[src]

fn checked_skewness(&self) -> Result<f64>[src]

Returns the skewness of the hypergeometric distribution

Errors

If N <= 2

Formula

This example is not tested
((N - 2K) * (N - 1)^(1 / 2) * (N - 2n)) / ([n * K * (N - K) * (N -
n)]^(1 / 2) * (N - 2))

where N is population, K is successes, and n is draws

impl CheckedSkewness<f64> for InverseGamma[src]

fn checked_skewness(&self) -> Result<f64>[src]

Returns the skewness of the inverse gamma distribution

Errors

If shape <= 3

Formula

This example is not tested
4 * sqrt(α - 2) / (α - 3)

where α is the shape

impl CheckedSkewness<f64> for Pareto[src]

fn checked_skewness(&self) -> Result<f64>[src]

Returns the skewness of the Pareto distribution

Errors

If α <= 3.0

where α is the shape

Formula

This example is not tested
    (2*(α + 1)/(α - 3))*sqrt((α - 2)/α)

where α is the shape

impl CheckedSkewness<f64> for StudentsT[src]

fn checked_skewness(&self) -> Result<f64>[src]

Returns the skewness of the student's t-distribution

Errors

If x <= 3.0

Formula

This example is not tested
0
Loading content...