Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add exact calculation of higher order moments #25

Open
NAThompson opened this issue Jan 18, 2019 · 0 comments
Open

Add exact calculation of higher order moments #25

NAThompson opened this issue Jan 18, 2019 · 0 comments

Comments

@NAThompson
Copy link

NAThompson commented Jan 18, 2019

I noticed here, line 58, that the variance is not calculated exactly, but rather calculated using an approximation.

I ran a git blame on this file as well as the higher order moments and found that at the time it was written (2008), there was no known exact, numerically stable, single pass, online algorithm which can compute higher order moments. This changed in 2009 with the publication of the following paper:

  • Philippe P. Pébay: ["Formulas for Robust, One-Pass Parallel Computation of Covariances and Arbitrary-Order Statistical Moments.] Technical Report SAND2008-6212, Sandia National Laboratories, September 2008.

Updating the variance, covariance, skewness, kurtosis, and all higher order moments to use these formulas is no small task, but since the current approximation seems uncontrolled, at some point it seems like it is reasonable to add them to the accumulators library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant