commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <>
Subject Re: [math] Summary Stats Higher Moments?
Date Wed, 23 Dec 2015 13:44:53 GMT
On 12/22/15 9:58 AM, wrote:
> Hi,
> I see that org.apache.commons.math3.stat.descriptive.DescriptiveStatistics
> uses the singleton update formulas (from Pebay) for calculating
> (un-normalized) moments up to the 4th moment. Is there some reason that
> org.apache.commons.math3.stat.descriptive.SummaryStatistics excludes both
> third and fourth central moments?
> Is it just a matter of computational efficiency, ie. DescriptiveStatistics
> calculates moments only when the getter is invoked (and all orders need not
> be calculated at once) while the "storeless" SummaryStatistics would need
> to calculate all 4 orders at every call to update()?

Yes, that is the reason; but it is really more a matter of no one
having asked for this feature.  You are correct that the updating
formulas make this possible and the nested nature of the moments
means that there should not be much cost to adding the third and
fourth moments.  I would be happy to review and apply a patch (with
tests) adding these.


>  Or is there some other
> blocker?
> Thanx,
> Mike Brzustowicz

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

View raw message