Skip to main content

mean

Function mean 

Source
pub fn mean(values: &[f64]) -> f64
Expand description

Compute arithmetic mean.

ยงExample

use codec_eval::stats::mean;

assert!((mean(&[1.0, 2.0, 3.0, 4.0, 5.0]) - 3.0).abs() < 0.001);