We give an error analysis of an algorithm for computing the sample variance due to Chan, Golub, and LeVeque [The American Statistician 7 (1983), pp. 242-247]. It is shown that this algorithm is numerically stable. The algorithm computes the sample variance (and the sample mean) using just one pass through the sample data. It is amenable to pairwise summation and thus requires only O(log n) parallel steps.
All Science Journal Classification (ASJC) codes
- Computational Mathematics
- Applied Mathematics