pub fn variance(values: &[f64], sample: bool) -> Option<f64>Expand description
Variance. sample == true uses Bessel’s correction (divide by n-1);
otherwise the population variance (divide by n). None if empty.
Note: sample variance of a single element divides by zero and yields NaN,
preserving the historical behaviour of the call sites this replaced.