![]() |
PIP 5.6.1
Platform-Independent Primitives
|
Template class for calculating statistical measures of a data set Calculates mean, variance, skewness and kurtosis for a numeric sample. More...
#include <pistatistic.h>
Public Member Functions | |
| PIStatistic () | |
| Constructs an object with all accumulated values set to zero. | |
| bool | calculate (const PIVector< T > &val, const T &given_mean) |
| Calculates all statistics using the supplied mean value. More... | |
| bool | calculate (const PIVector< T > &val) |
| Calculates all statistics and derives the mean from the sample. | |
Static Public Member Functions | |
| static T | calculateMean (const PIVector< T > &val) |
| Returns arithmetic mean of the sample, or zero for an empty vector. | |
Public Attributes | |
| T | mean |
| Sample mean. | |
| T | variance |
| Variance estimate accumulated for the sample. | |
| T | skewness |
| Sample skewness. | |
| T | kurtosis |
| Excess kurtosis of the sample. | |
Template class for calculating statistical measures of a data set Calculates mean, variance, skewness and kurtosis for a numeric sample.
|
inline |
Calculates all statistics using the supplied mean value.
Returns false when the sample contains fewer than two values.