commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Albretch Mueller" <lbrt...@gmail.com>
Subject Re: commons.apache.org/math/stat/
Date Sun, 08 Jun 2008 13:39:28 GMT
> Anyone else have ideas on how best to do this?
~
 IMHO this is so simple that I would doubt there is a "best" way to do it ;-).
~
 you are the ones that know well/own the underlying data structures and logic
~
 If you take a close look at:
~
http://en.wikipedia.org/wiki/Mean
http://en.wikipedia.org/wiki/Standard_deviation
http://en.wikipedia.org/wiki/Skewness
~
 You will see that, since these are essentially summations and their
exponentiations, you could derive the relationship of the new stat
values based on:
~
 1) the old stat ones,
 2) the count of how many have been computed so far, and
 3) the new entry
~
 I must run out of my place right now. If no one has done so when I
come back (within 2 hours) I will digest to
you/user@commons.apache.org the math, propose some pseudo code along
with some basic java code on how to do that.
~
 lbrtchx
~
On Sun, Jun 8, 2008 at 8:56 AM, Phil Steitz <phil@steitz.com> wrote:
> Albretch Mueller wrote:
>>
>>  as part of
>>
>>  http://commons.apache.org/math/
>>
>>  you have:
>>
>>
>>  http://commons.apache.org/math/apidocs/org/apache/commons/math/stat/descriptive/DescriptiveStatistics.html#addValue(double)
>>
>>  however I don't see something like:
>>
>>  addValue(new_val, NoV, Mean, Std_Dev, Skew)
>>
>>  in order to get the new statistics based on the old one?
>>
>>  It is very easy to do the Math to calculate the new Mean, Std_Dev and
>> Skew, based on the old values for a certain new value
>>
>>  Why doesn't http://commons.apache.org/math/stat/ give you that?
>>
>
> No reason, other than that no one has suggested this.  Patches are always
> welcome.  I am not sure what the best API would be for this enhancement, but
> it would probably belong in the StatUtils class.  Anyone else have ideas on
> how best to do this?
>
> Phil
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message