[−][src]Trait statrs::statistics::CheckedMode
The CheckedMode
trait specifies that an object has a closed form solution
for its mode(s) with a possible failure mode
Required methods
fn checked_mode(&self) -> Result<T>
Returns the mode.
Examples
use statrs::statistics::CheckedMode; use statrs::distribution::Beta; let n = Beta::new(1.0, 1.0).unwrap(); assert!(n.checked_mode().is_err());
Implementors
impl CheckedMode<f64> for Beta
[src]
fn checked_mode(&self) -> Result<f64>
[src]
Returns the mode of the Beta distribution.
Remarks
Since the mode is technically only calculate for α > 1, β > 1
, those
are the only values we allow. We may consider relaxing this constraint
in
the future.
Errors
If α <= 1
or β <= 1
Formula
ⓘThis example is not tested
(α - 1) / (α + β - 2)
where α
is shapeA and β
is shapeB