4 ms·
My favorite is Welford's Algorithm [1] which lets you compute mean and standard deviation in one pass. Every programmer should be aware of it. [1]: https://en.
by nwhitehead 7y ago
My favorite is Welford's Algorithm [1] which lets you compute mean and standard deviation in one pass. Every programmer should be aware of it.
[1]: https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance https://en.wikipedia.org/wiki/Algorithms_for_calculating_var...
- anonymoushn 7y agoIf readers would like to read an implementation, one is here: https://github.com/sharpobject/runningstats https://github.com/sharpobject/runningstats It includes skewness and kurtosis.
- mc13 7y agoExactly, i deal with a few of data processing programs, wish my more experienced colleagues told me about these algorithms before, but doesn't this algorithm only compute an approximation and not the exact value ?
- anonymoushn 7y agoTo about the extent that a 64-bit float can ever be said to contain an exact value, this algorithm will compute the exact value. There's no sampling.