Skip to main content

sample_variance

Function sample_variance 

pub fn sample_variance(values: &[f64]) -> Result<f64, StatisticsError>
Expand description

Returns the sample variance of values using Bessel’s correction.

§Errors

Returns StatisticsError::InsufficientData when fewer than two values are provided, or StatisticsError::TooManyValues if the slice length cannot be represented exactly in the internal floating-point count conversion.