pub fn mean(data: &Vec<f64>) -> f64
Calculates the mean, or the average, of a vector of floats.
Wikipedia
Panics if dataset is empty.
let data = vec![1.0, 3.0, 3.0, 2.0, 1.0]; assert_eq!(kirstine::mean(&data), 2.0);