

Accurately computing running variance - signa11
http://www.johndcook.com/standard_deviation.html

======
winxordie
"This better way of computing variance goes back to a 1962 paper by B. P.
Welford and is presented in Donald Knuth's Art of Computer Programming, Vol 2,
page 232, 3rd edition. Although this solution has been known for decades, not
enough people know about it."

I'd generalize that to "although Knuth's book has been around for decades, not
enough people have read it yet."

------
tansey
Great article!

I write a ton of statistical reporting code at work. We don't deal with the
kind of rare cases that the author points out can cause high degrees of
imprecision, but it's useful to know. The speedup alone makes changing my
implementation worth it.

------
profquail
More algorithms (for various coding situations) and info:

[http://en.wikipedia.org/wiki/Algorithms_for_calculating_vari...](http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance)

------
nbecker
Does anyone know how to generalize this to complex data?

~~~
eru
Complex in the sense of "complex numbers" or in the sense of composite data?

~~~
nbecker
Complex numbers

