Mlv. Pitteway et Jw. Wright, REAL-TIME AVERAGE AND VARIANCE WITH MODULO ARITHMETIC, International journal of computer mathematics, 63(3-4), 1997, pp. 275-278
The arithmetic mean, and sample variance, are the most common summary
statistics of a data set. There are circumstances (within computationa
l loops, and in real-time data analysis, for examples) where it is des
irable to maintain a current estimate of the mean and variance. The ''
lossy'' (sometimes called the ''running'') mean and variance are frequ
ently useful also. We present an algorithm for these applications, and
show the provisions necessary for use with cyclical (e.g. phase-angle
) data.