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

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

Reply via email to