pub trait Skewness<T> {
fn skewness(&self) -> T;
}The Skewness trait specifies an object that has a closed form solution
for its skewness(s)
Returns the skewness. May panic depending
on the implementor.
use statrs::statistics::Skewness;
use statrs::distribution::Uniform;
let n = Uniform::new(0.0, 1.0).unwrap();
assert_eq!(0.0, n.skewness());
Loading content...
Returns the skewness of the bernoulli
distribution
q = (1 - p)
(1 - 2p) / sqrt(p * q)
Returns the skewness of the Beta distribution
2(β - α) * sqrt(α + β + 1) / ((α + β + 2) * sqrt(αβ))
where α is shapeA and β is shapeB
Returns the skewness of the binomial distribution
(1 - 2p) / sqrt(n * p * (1 - p)))
Returns the skewness of the chi distribution
Returns NaN if freedom is INF
where μ is the mean and σ the standard deviation
of the distribution
Returns the skewness of the chi-squared distribution
where k is the degrees of freedom
Returns the skewness of the discrete uniform distribution
Returns the skewness of the erlang distribution
where k is the shape
Returns the skewness of the exponential distribution
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 gamma distribution
where α is the shape
Returns the skewness of the geometric distribution
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 log-normal distribution
(e^(σ^2) + 2) * sqrt(e^(σ^2) - 1)
where μ is the location and σ is the scale
Returns the skewness of the normal distribution
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 poisson distribution
where λ is the rate
Returns the skewness of the student’s t-distribution
If x <= 3.0
Returns the skewness of the triangular distribution
(sqrt(2) * (min + max - 2 * mode) * (2 * min - max - mode) * (min - 2 *
max + mode)) /
( 5 * (min^2 + max^2 + mode^2 - min * max - min * mode - max * mode)^(3
/ 2))
Returns the skewness for the continuous uniform distribution
Returns the skewness of the weibull distribution
(Γ(1 + 3 / k) * λ^3 - 3μσ^2 - μ^3) / σ^3
where k is the shape, λ is the scale, and Γ is
the gamma function, μ is the mean of the distribution.
and σ the standard deviation of the distribution
Returns the skewness of the multinomial distribution
(1 - 2 * p_i) / (n * p_i * (1 - 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
Loading content...