Changeset 557


Ignore:
Timestamp:
Mar 9, 2006, 9:38:07 AM (16 years ago)
Author:
Peter
Message:

fixed bug in Averager::variance

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/statistics/Averager.h

    r490 r557  
    120120    ///
    121121    inline double variance(void) const
    122     { return n_ ? sum_xx_centered()/n_ : 0; }
     122    { return n_>1 ? sum_xx_centered()/n_ : 0; }
    123123
    124124    ///
Note: See TracChangeset for help on using the changeset viewer.