Displaying 2 results from an estimated 2 matches for "welford".
Did you mean:
telford
2004 Apr 06
0
Accuracy Bug (PR#1228), (PR#6743)
...damental criticism is still
correct, and even on the Athlon, it's easy to find cases where
tst.var() *does* produce output.
daheiser> It is an excellent example of how errors and
daheiser> faults occur when the programmer follows the
daheiser> mathematical formula exactly. Welford's algorithm
daheiser> does not produce this error. It gives correct
daheiser> standard deviation and variance values.
Actually, after reading
@article{ChaTL97,
author = {Tony F. Chan and John Gregg Lewis},
title = {Computing standard deviations: accuracy},
journal = {...
2006 Feb 19
2
Computing means, variances and sums
...- sum(rep(0.02, 10))/10 -0.02
> 10*z^2/9
[1] 1.3374513502689138e-35
and so the non-zero variance is arising from (x[i] - mean) being non-zero.
(I did check that was what was happening at C level.)
There has been talk of other ways to arrange these computations, for
example Kahan summation and Welford's algorithm (see Chan & Lewis, 1979,
CACM 22, 526-531 and references therein). However, R already used the
two-pass algorithm which is the most accurate (in terms of error bounds)
in that reference.
Why are most people seeing 0? Because the way computation is done in
modern FPUs is n...