[Home]History of Algorithms for calculating variance

HomePage | Recent Changes | Preferences

Revision 3 . . (edit) July 1, 2001 4:22 pm by (logged).184.149.xxx
Revision 2 . . June 30, 2001 4:07 pm by Larry Sanger [Moving editorial comments to /Talk]
Revision 1 . . (edit) June 29, 2001 8:30 pm by Larry Sanger
  

Difference (from prior major revision) (minor diff, author diff)

Changed: 3c3
*Variance = {(x1-µ)2 + (x2-µ)2 + ... + (xn-µ)2} / n; where µ is the Arithmetic Mean of the data set.
*Variance = {(x1-µ)2 + (x2-µ)2 + ... + (xn-µ)2} / n; where µ is the arithmetic mean of the data set.

Removed: 11,19d10
:Editorial comment: it is actually the first formula that has precision problems when dealing with limited-precision arithmetic. If the difference between measurements and the mean is very small, then the first formula will yield precision problems, as information will be lost in the (xi - µ) operation. There is no such loss of significance in the intermediate operations of the second formula. -- ScottMoonen

:Editorial comment the second: in fact, the second formula is the one more commonly beset with problems. The first can have problems when the mean is very large relative to the variance, but this is relatively rare in practice and this problem also affects the second formula. Much more common is the situation where you have comparable mean and variance and a very large number of observations. In this case, the second formula will result in the subtraction of two very large numbers whose difference is relatively small (by a factor roughly equal to the number of observations). If you have one million observations, you lose roughly six significant figures with the second formula if you use ordinary floating point arithmetic. -- TedDunning

:''comment: The problem may occur
#when the deviations are very small relative to the mean or
#when they are small relative to the representational capacity of the arithmetic instrument (floating point computer, fixed point calculator, paper and pencil).
To be precise we have to specify the instrument and the nature of the data. -- DickBeldin''



Changed: 42c33,35
back to Variance
back to Variance

/Talk?

HomePage | Recent Changes | Preferences
Search: