Changeset 218 for trunk/src/Averager.h
- Timestamp:
- Dec 30, 2004, 11:29:15 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/Averager.h
r197 r218 93 93 94 94 /// 95 /// @return \f$ \sum_i (x_i-m)^2\f$ 96 /// 97 inline double sum_xsqr_centered(void) const { return xx_-x_*x_/n_; } 98 99 /// 95 100 /// The variance is calculated using the \f$ (n-1) \f$ correction, 96 101 /// which means it is the best unbiased estimator of the variance … … 101 106 /// 102 107 inline double variance(void) const 103 { return (n_>1) ? (xx_-x_*x_/n_)/(n_-1) : 0; }108 { return (n_>1) ? sum_xsqr_centered()/(n_-1) : 0; } 104 109 105 110 ///
Note: See TracChangeset
for help on using the changeset viewer.