Hacker News new | ask | show | jobs
by Hussell 458 days ago
The statisticians have a bunch of tricks to transform the formulas into more-easily computable forms, e.g. calculate both the average and the standard deviation in a single pass through the data instead of one pass to calculate the average and a second to calculate the standard deviation. Converting the math in here to efficient code isn't very easy.
1 comments

You mean Welford's algorithm. Since code was requested:

https://jonisalonen.com/2013/deriving-welfords-method-for-co...