# Changeset 718 for trunk/yat/statistics/Averager.h

Ignore:
Timestamp:
Dec 26, 2006, 10:56:26 AM (16 years ago)
Message:

 r704 /// template void  add_values(const T& v, u_long n=1); void add_values(const T& v, u_long n=1); /** @return standard deviation divided by mean. */ inline double cv(void) const { return x_ ? std()/mean() : 0; } double cv(void) const; /// /// @return Mean of presented data, \f$\frac{1}{n}\sum x_i \f$ /// inline double mean(void) const { return n_ ? x_/n_ : 0; } double mean(void) const; /// /// @return Number of data points /// inline u_long n(void) const { return n_; } u_long n(void) const; /// /// \f$\sqrt{variance()/n} \f$ /// inline double standard_error(void) const { return sqrt(variance()/n_); } double standard_error(void) const; /// /// @return The standard deviation, root of the variance(). /// inline double std(void) const { return sqrt(variance()); } double std(void) const; /// /// @return Standard deviation around \a m, root of the variance(m). /// inline double std(double m) const { return sqrt(variance(m)); } double std(double m) const; /// /// @return The sum of x /// inline double sum_x(void) const { return x_; } double sum_x(void)  const; /// /// @return The sum of squares /// inline double sum_xx(void) const { return xx_; } double sum_xx(void) const; /// /// @return \f$\sum_i (x_i-m)^2 \f$ /// inline double sum_xx_centered(void) const { return xx_-x_*x_/n_; } double sum_xx_centered(void)  const; /// /// @return Variance when the mean is known to be \a m. /// inline double variance(double m) const { return n_ ? (xx_ - 2*m*x_ + m*m*n()) /n_ : 0; } double variance(double m) const; /// /// @return Estimation of variance /// inline double variance(void) const { return n_>1 ? sum_xx_centered()/n_ : 0; } double variance(void) const; /// /// @return unbiased estimation of variance /// inline double variance_unbiased(void) const { return (n_>1) ? sum_xx_centered()/(n_-1) : 0; } double variance_unbiased(void) const; ///