pub fn online_variance<I>(iter: I, ddof: u8) -> Option<f64>where
I: IntoIterator<Item = f64>,
Expand description
Numerical stable online variance aggregation.
See: Welford, B. P. (1962). “Note on a method for calculating corrected sums of squares and products”. Technometrics. 4 (3): 419–420. doi:10.2307/1266577. JSTOR 1266577. and: Ling, Robert F. (1974). “Comparison of Several Algorithms for Computing Sample Means and Variances”. Journal of the American Statistical Association. 69 (348): 859–866. doi:10.2307/2286154. JSTOR 2286154.