27 Feb
2004
27 Feb
'04
2:04 a.m.
* Is there a way to compute the standard deviation without multiple passes over the data (one to compute the mean and a second to sum the squares of the differences from the mean?
I do not understand the problem in getting stdev in a single pass. Perhaps I not understood your problem. If you have a series of values you merely have to calculate their sum and sum-of-squares and use the usual formula.
The sandbox contains the latest and greatest version which computes the standard deviation in a single pass using a recurrence formula that has much better numerical performance than the textbook approach. Raymond Hettinger