Comparison of Several Algorithms for Computing Sample Means and Variances

  title={Comparison of Several Algorithms for Computing Sample Means and Variances},
  author={Robert F. Ling},
  journal={Journal of the American Statistical Association},
  • R. F. Ling
  • Published 1 December 1974
  • Computer Science
  • Journal of the American Statistical Association
Abstract Several one-pass and two-pass algorithms for the computation of sample means and variances are compared by their performance on sets of randomly generated data and systematically generated data with random noise. The relation between the performance of each algorithm and the coefficient of variation of the population from which random data sets are generated is explored. 
Computing standard deviations: accuracy
Four algorithms for the numerical computation of the standard deviation of (unweighted) sampled data are analyzed and it is concluded that all four algorithms will provide accurate answers for many problems, but two of the algorithms are substantially more accurate on difficult problems than are the other two.
Accurate and consistent calculation of the mean and variance in Monte-Carlo simulations
In parallelized Monte-Carlo simulations, the order of summation is not always the same. When the mean is calculated in running fashion, this may create an artificial randomness in results which ought
Some Experiences in Computing Estimates and Their Variances Using Data from Complex Survey Designs
This paper focuses on the development and use of computer programs which take the design into account for analyses of large scale surveys, including stratification and perhaps more than one stage of selection.
Accuracy of Sample Moments Calculations among Widely Used Statistical Programs
Abstract Four widely used statistical program packages—BMDP, SPSS, DATATEXT, and OSIRIS—were compared for computational accuracy on sample means, standard deviations, and correlations. Only one,
Computational Efficiency Evaluation In Output Analysis
A central quantity in steady-state simulation is the time-average variance constant, and several estimators have been proposed, including nonoverlapping and overlapping batch means methods, spectral methods, and the regenerative method.
Numerically stable parallel computation of (co-)variance
This paper studies a popular incremental technique originally proposed by Welford, which is extended to weighted covariance and correlation and showcases applications from the classic computation of variance as well as advanced applications such as stock market analysis with exponentially weighted moving models and Gaussian mixture modeling for cluster analysis that all benefit from this approach.
Assessing the Reliability of Statistical Software: Part I
Abstract Entry-level tests of the accuracy of statistical software, such as Wilkinson's Statistics Quiz, have long been available, but more advanced collections of tests have not. This article
Precision averaging for real-time analysis
Modifications of these algorithms are presented, and previously unpublished ones are introduced in the interest of avoiding overflow and minimizing truncation errors (highly desirable), and the applicability of each is discussed with respect to some of the basic functions that real-time programs must perform.
On the accuracy of linear regression routines in some data mining packages
The National Institute of Standards and Technology Statistical Reference Datasets tests for the numerical accuracy of statistical packages to 7 data mining packages find that one package has an unstable algorithm for the calculation of the sample variance and only two have reliable linear regression routines.
Algorithm for error-free determination of the variance of all contiguous subsequences and fixed-length contiguous subsequences for a sequence of industrial measurement data
The author proves a theorem on the number of bits of precision that an arithmetic type must have to guarantee error-free determination of the arithmetic mean and variance and presents the extension of Welford's formula for determining variance for the sliding window method—determining the variance of fixed-length contiguous subsequences.


Error-free methods for statistical computations
Methods are described which are error-free, simple in concept, and usually less costly in machine time than those mentioned by Neely.
Comparison of several algorithms for computation of means, standard deviations and correlation coefficients
Bank-wide simulation studies may be performed upon request, and this is presently regarded as the highest potential level of development for the banking information system.
Some Results Relevant to Choice of Sum and Sum-of-Product Algorithms
Sum and sum-of-product algorithms, some designed to minimize significance error, are compared and recommendations for usage are offered. A simplified method of rounding is presented and the benefit
Note on a Method for Calculating Corrected Sums of Squares and Products
In many problems the "corrected sum of squares" of a set of values must be calculated i.e. the sum of squares of the deviations of the values about their mean. The most usual way is to calculate the
A comparison of floating point summation methods
This note compares the schemes by Linz and Kahan with the straight recursive summation of pairwise summing of numbers to reduce accumulated roundoff error.
A floating-point technique for extending the available precision
A technique is described for expressing multilength floating-point arithmetic in terms of singlelength floating point arithmetic, i.e. the arithmetic for an available (say: single or double
Reducing truncation errors using cascading accumulators
Neweomb operators are needed for example to deal with the pertm'bation of Saturn 's orbit by Jupiter, and are constructed from the operators for exterior perturbation by use of a simple program.
Correction d'une somme en arithmetique a virgule flottante
SummaryLetS be the sum of given numbers, calculated by normalized floatingpoint arithmetic, the rounding—off law being a truncature with a guard digit. We give an algorithm to obtain all the digits
On accurate floating-point summation
An algorithm is given for accurately summing n t-digit floating-point numbers and the relative error in the computed sum is at most ⌈(“t” + 1)/“&ngr;”, which can be corrected to full <italic>t-digit accuracy.