Raul Miller-4 wrote: > > On Wed, Sep 14, 2011 at 10:48 AM, Johann Hibschman > <[email protected]> wrote: >> Raul Miller <[email protected]> writes: >>> J's standard deviation routine seems to already be dealing with the >>> numerical stability issue. >>> [...] >>> Or am I overlooking something? >> >> J's standard deviation routine is perfectly accurate for any sane data. >> John Cook gave an (extreme) example where Welford's method gives a >> reasonable value the sum-of-squared-deviance method (the one used by J's >> stddev) breaks down: >> >> stddev 1e11+?1e6#0 >> 0.538747 >> >> (He actually goes all the way to 1e12 rather than just 1e11.) > > Ok, thanks, I see where I went off track now... > > But this issue seems easy to work around: > stddev (- mean) 1e12+1e6?@$0 > 0.288806 >
You(r subtracted) mean (is) this: stddev _1e12+1e12+1e6?@$0 0.288461 > Are there generic extreme data cases where this approach breaks down > and the Welford approach does not? > > Thanks, > > -- > Raul > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > > -- View this message in context: http://old.nabble.com/Welford%27s-method-for-standard-deviations-tp32458412s24193p32472966.html Sent from the J Programming mailing list archive at Nabble.com. ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
