This class provides efficient and accurate online algorithms for calculating mean, variance, skew, and kurtosis. The class provides template specializations, so that no unnecessary data members will be kept or unnecessary calculations done. The online algorithms used are Welford for variance, and the stable M3 and M4 are taken from: https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Higher‐order_statistics
Synopsis
Declared in <bdlsta_moment.h>
template<>
class Moment<BloombergLP::bdlsta::MomentLevel::e_M2>;
Description
The formula for sample skewness is taken from: http://www.macroption.com/skewness‐formula/
The formula for sample excess kurtosis is taken from: http://www.macroption.com/kurtosis‐formula/
Enums
Name |
Description |
Status codes returned by statistical computations. |
Member Functions
Name |
Description |
Add the specified |
|
Returns the number of elements in the data set. |
|
Return the kurtosis of the data set. The behavior is undefined unless |
|
Load into the specified |
|
Return the mean of the data set. The behavior is undefined unless |
|
Load into the specified |
|
Return skew of the data set. The behavior is undefined unless |
|
Load into the specified |
|
Return the variance of the data set. The behavior is undefined unless |
|
Load into the specified |
Created with MrDocs