Further remark on stably updating mean and standard deviation estimates
A procedure for sequentially recomputing the mean and standard deviation of a weighted series of numbers as new values are added is given by Hanson [2]. To accommodate the most frequently occurring situation, Cotton [1] expressed Hanson's formulas in terms of unit weights. The result is accurate for updating the mean. However, for updating the standard deviation, Cotton chose to use Hanson's eq. (14), which Hanson rejected as being inaccurate when the new value is close to the mean.