Function engram::statistics::var
source · pub fn var<T: Into<f64> + Copy + Add + Sub>(data: &[T]) -> f64
Expand description
Returns the sample variance of a list of values.
§Examples
let values = vec![1.0, 2.0, 3.0, 4.0, 5.0];
let variance = var(&values);