The CheckedSkewness
trait specifies an object that has a closed form
solution for its skewness(s) with possible failure modes
Returns the skewness.
use statrs::statistics::CheckedSkewness;
use statrs::distribution::FisherSnedecor;
let n = FisherSnedecor::new(1.0, 1.0).unwrap();
assert!(n.checked_skewness().is_err());
Returns the skewness of the fisher-snedecor distribution
If freedom_2 <= 6.0
Returns NaN
if freedom_1
or freedom_2
is INF
((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
Returns the skewness of the hypergeometric distribution
If N <= 2
((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
Returns the skewness of the inverse gamma distribution
If shape <= 3
4 * sqrt(α - 2) / (α - 3)
where α
is the shape
Returns the skewness of the Pareto distribution
If α <= 3.0
where α
is the shape
(2*(α + 1)/(α - 3))*sqrt((α - 2)/α)
where α
is the shape
Returns the skewness of the student’s t-distribution
If x <= 3.0