Computes the variance of a dataset by incrementally adding values to an accumulator. Welfords method is more numerically stable than the standard method.
Welfords method goes back to a 1962 paper by B. P. Welford and is presented in Donald Knuth’s Art of Computer Programming, Vol 2.
This implemenation is modelled after the following:
See also: