commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luc Maisonobe <>
Subject Re: [math] (unbiased) standard deviation ?
Date Sun, 26 Oct 2008 15:44:00 GMT
nicolas de loof a écrit :
> Hello
> For the monitoring component I've got a set of values. I'd like to compute
> the std. deviation, but as I don't store the full values but only aggregates
> (sum, sum of squares) I can't use commons-math StandardDeviation.
> Is there anything in commons-math for such use case ? I've found at
> some
> algorithm to compute "an
> unbiased<> estimate",
> but if something stable and tested is available in math I'd prefer not to
> reinvent the wheel !
> Nicolas

The various classes dealing with such features are designed to be built
empty and to be updated at each sample element. For example the
SummaryStatistics and DescriptiveStatistics classes provide an addValue
method whereas all implementations of StorelessUnivariateStatistics
provide an increment method.

These methods take care of computing the sum and sum of squares for you.
The SummaryStatistics class maintains many values in addition to these
ones (min, max ...). Could you use these classes instead of storing the
data by yourself and later computing the results ?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message