Abstract
Four algorithms for the numerical computation of the standard deviation of (unweighted) sampled data are analyzed. Two of the algorithms are well-known in the statistical and computational literature; the other two are new algorithms specifically intended for automatic computation. Our discussion is expository, with emphasis on reaching a suitable definition of “accuracy.” Each of the four algorithms is analyzed for the conditions under which it will be accurate. We conclude that all four algorithms will provide accurate answers for many problems, but two of the algorithms, one new, one old, are substantially more accurate on difficult problems than are the other two.
- 1 Chan, T.F.C., and Lewis, J.G. Rounding error analysis of algorithms for computing means and standard deviations. Tech. Rep. No. 289, Dept. of Mathematical Sciences, The Johns Hopkins U., Baltimore, Md., April 1978.Google Scholar
- 2 Cotton, I.W. Remark on stably updating mean and standard deviation of data. Comm. ACM 18, 8 (Aug. 1975), 458. Google ScholarDigital Library
- 3 Hanson, R.J. Stably updating mean and standard deviation of data. Comm. ACM 18, 1 (Jan. 1975), 57-58. Google ScholarDigital Library
- 4 Ling, R.F. Comparison of several algorithms for computing means and variances. J. Amer. Statistical Assoc. 69, 348 (Dec. 1974), 859-866.Google ScholarCross Ref
- 5 Neely, P.M. Comparison of several algorithms for computation of means, standard deviations and correlation coefficients. Comm. ACM 9, 7 (July 1966), 496-499. Google ScholarDigital Library
- 6 Welford, B.P. Note on a method for calculating corrected sums of squares and products. Technometrics 4 (Aug. 1962), 419 -420.Google ScholarCross Ref
- 7 West, D.H.D. Updating mean and variance estimates: An improved method. Comm. ACM 22, 9 (Sept. 1979), 532-535. Google ScholarDigital Library
- 8 West, D.H.D. Incremental least squares and the approximate separation of exponentials. Nuclear Instruments and Methods 136 (1976), 137-143.Google ScholarCross Ref
- 9 Wilkinson, J.H. Rounding errors in algebraic processes. Prentice-Hall, Englewood Cliffs, N.J., 1963. Google ScholarDigital Library
- 10 Youngs, E.A., and Cramer, E.M. Some results relevant to choice of sum and sum-of-product algorithms. Technometrics 13 (Aug. 1971 ), 657-665.Google ScholarCross Ref
- 11 Nelson, L.S. Further remarks on stably updating mean and standard deviation estimates. Comm. A CM 22, 8 (Aug. 1979), 483. Google ScholarDigital Library
Recommendations
Stably updating mean and standard deviation of data
By considering the (sample) mean of a set of data as a fit to this data by a constant function, a computational method is given based on a matrix formulation and Givens transformations. The (sample) mean and standard deviation can be updated as data ...
Remark on stably updating mean and standard deviation of data
Although not published as a numbered algorithm, Hanson's article “Stably Updating Mean and Standard Deviation of Data” in the January, 1975, issue of Communications, [1] describes an algorithm for sequentially recomputing the mean and standard deviation ...
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 ...
Comments