#include <yat/statistics/Averager.h>
Public Member Functions | |
Averager (void) | |
Averager (double x, double xx, long n) | |
Averager (const Averager &a) | |
void | add (double d, long n=1) |
double | cv (void) const |
Coeffient of variation. | |
double | mean (void) const |
long | n (void) const |
void | rescale (double a) |
Rescales the object. | |
double | standard_error (void) const |
double | std (void) const |
The standard deviation is defined as the square root of the variance. | |
double | std (double m) const |
The standard deviation is defined as the square root of the variance. | |
double | sum_x (void) const |
double | sum_xx (void) const |
double | sum_xx_centered (void) const |
double | variance (double m) const |
The variance with know mean. | |
double | variance (void) const |
The estimated variance. | |
double | variance_unbiased (void) const |
void | reset (void) |
Reset everything to zero. | |
const Averager & | operator= (const Averager &) |
The assignment operator. | |
const Averager & | operator+= (const Averager &) |
Related Functions | |
(Note that these are not member functions.) | |
template<typename InputIterator > | |
void | add (Averager &a, InputIterator first, InputIterator last) |
adding a range of values to Averager a |
theplu::yat::statistics::Averager::Averager | ( | void | ) |
Default constructor
theplu::yat::statistics::Averager::Averager | ( | double | x, | |
double | xx, | |||
long | n | |||
) |
Constructor taking sum of x, sum of squared x, xx, and number of samples n.
theplu::yat::statistics::Averager::Averager | ( | const Averager & | a | ) |
Copy constructor
void theplu::yat::statistics::Averager::add | ( | double | d, | |
long | n = 1 | |||
) |
Adding n (default=1) number of data point(s) with value d.
double theplu::yat::statistics::Averager::cv | ( | void | ) | const |
Coeffient of variation.
Coeffient of variation (cv) is defined as ratio between the standard deviation and the mean: .
double theplu::yat::statistics::Averager::mean | ( | void | ) | const |
long theplu::yat::statistics::Averager::n | ( | void | ) | const |
Operator to add another Averager
void theplu::yat::statistics::Averager::rescale | ( | double | a | ) |
Rescales the object.
,
double theplu::yat::statistics::Averager::standard_error | ( | void | ) | const |
double theplu::yat::statistics::Averager::std | ( | double | m | ) | const |
The standard deviation is defined as the square root of the variance.
double theplu::yat::statistics::Averager::std | ( | void | ) | const |
The standard deviation is defined as the square root of the variance.
double theplu::yat::statistics::Averager::sum_x | ( | void | ) | const |
double theplu::yat::statistics::Averager::sum_xx | ( | void | ) | const |
double theplu::yat::statistics::Averager::sum_xx_centered | ( | void | ) | const |
double theplu::yat::statistics::Averager::variance | ( | void | ) | const |
The estimated variance.
The variance is calculated as , where is the mean.
double theplu::yat::statistics::Averager::variance | ( | double | m | ) | const |
The variance with know mean.
The variance is calculated as .
double theplu::yat::statistics::Averager::variance_unbiased | ( | void | ) | const |
The variance is calculated using the correction, which means it is the best unbiased estimator of the variance , where is the mean.