Trait statrs::statistics::Mode [−][src]
The Mode
trait specififies that an object has a closed form solution
for its mode(s)
Required methods
fn mode(&self) -> T
[src]
Returns the mode. May panic depending on the implementor.
Examples
use statrs::statistics::Mode; use statrs::distribution::Uniform; let n = Uniform::new(0.0, 1.0).unwrap(); assert_eq!(0.5, n.mode());
Implementors
impl Mode<f64> for Beta
[src]
impl Mode<f64> for Cauchy
[src]
impl Mode<f64> for Chi
[src]
impl Mode<f64> for ChiSquared
[src]
impl Mode<f64> for Erlang
[src]
impl Mode<f64> for Exponential
[src]
impl Mode<f64> for FisherSnedecor
[src]
impl Mode<f64> for Gamma
[src]
impl Mode<f64> for InverseGamma
[src]
fn mode(&self) -> f64
[src]
Returns the mode of the inverse gamma distribution
Formula
ⓘ
β / (α + 1)
/// where α
is the shape and β
is the rate
impl Mode<f64> for LogNormal
[src]
fn mode(&self) -> f64
[src]
Returns the mode of the log-normal distribution
Formula
ⓘ
e^(μ - σ^2)
where μ
is the location and σ
is the scale
impl Mode<f64> for Normal
[src]
impl Mode<f64> for Pareto
[src]
impl Mode<f64> for StudentsT
[src]
impl Mode<f64> for Triangular
[src]
impl Mode<f64> for Uniform
[src]
impl Mode<f64> for Weibull
[src]
fn mode(&self) -> f64
[src]
Returns the median of the weibull distribution
Formula
ⓘ
if k == 1 { 0 } else { λ((k - 1) / k)^(1 / k) }
where k
is the shape and λ
is the scale
impl Mode<i64> for DiscreteUniform
[src]
impl Mode<u64> for Bernoulli
[src]
impl Mode<u64> for Binomial
[src]
impl Mode<u64> for Geometric
[src]
impl Mode<u64> for Hypergeometric
[src]
fn mode(&self) -> u64
[src]
Returns the mode of the hypergeometric distribution
Formula
ⓘ
floor((n + 1) * (k + 1) / (N + 2))
where N
is population, K
is successes, and n
is draws