[−][src]Function math::stats::variance
pub fn variance<'a, T: Clone + Iterator<Item = &'a A>, A>(
element_iterator: T,
ddof: usize
) -> f64 where
A: Copy + ToPrimitive + 'a,
&'a A: Deref,
ddof
stands for delta degress of freedom, and the sum of squares will be
divided by count - ddof
, where count
is the number of elements
for population variance, set ddof
to 0
for sample variance, set ddof
to 1