Ignore:
Timestamp:
Dec 30, 2004, 11:31:34 PM (18 years ago)
Author:
Peter
Message:

fixed bug in standard error function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/WeightedAverager.h

    r215 r220  
    6868
    6969    ///
    70     /// The variance is calculated as \f$ \frac{\sum w_i^2}{(\sum
     70    /// The standard deviation is calculated as \f$ \frac{\sum w_i^2}{(\sum
    7171    /// w_i)^2-\sum w_i^2}\frac{\sum w_i(x_i-m)^2}{\sum w_i} \f$
    72     /// @return squared error
    7372    ///
    74     /// @return variance of mean
     73    /// @return standard deviation of mean
    7574    ///
    7675    inline double standard_error(void)  const
    77     { return (squared_sum()/((sum_w()*sum_w())-squared_sum())
     76    { return sqrt(squared_sum()/((sum_w()*sum_w())-squared_sum())
    7877              *squared_error()/sum_w()); }
    7978
Note: See TracChangeset for help on using the changeset viewer.