Changeset 1422 for trunk/yat/statistics


Ignore:
Timestamp:
Aug 20, 2008, 8:43:09 PM (13 years ago)
Author:
Peter
Message:

docs - fixes #366

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/statistics/Percentiler.h

    r1420 r1422  
    5252  public:
    5353    /**
    54        \param perc percentile to calculate [0,100]. Defaule value is
     54       \param perc percentile to calculate [0,100]. Default value is
    5555       50, which implies class will calculate median.
    5656       \param sorted if true class assumes that ranges are already
     
    6363       Function is a non-mutable function, i.e., \a first and \a last
    6464       can be const_iterators.
     65
     66       The \a Nth percentile is defined such that, for example, when
     67       having four numbers \f$ 0.69 < 1.41 < 3.14 < 28 \f$, the \a Nth
     68       percentile is:
     69
     70       - \f$ 0.69 \f$ if \f$ N < 25 \f$
     71       - \f$ (0.69+1.41)/2 \f$ if \f$ N=25 \f$
     72       - \f$ 1.41 \f$ if \f$ 25 < N < 50 \f$
     73       - \f$ (1.41+3.14)/2 \f$ if \f$ N=50 \f$
     74       - \f$ 3.14 \f$ if \f$ 50 < N < 75 \f$
     75       - \f$ (3.14+28)/2 \f$ if \f$ N=75 \f$
     76       - \f$ 28 \f$ if \f$ 75 < N \f$
     77
     78       Similarily, if we have a weighted range \f$ x_0=0.69, w_0=1 ;
     79       x_1=1.41, w_1=0 ; x_2=3.14, w_2=0.5 ; x_3=28, w_3=0.5 \f$, we
     80       calculate the accumulated normalized weight \f$ S_k = \frac
     81       {100}{\sum w_i}\sum_{i=0}^k w_i \f$ and the percentile is
     82
     83       - \f$ 0.69 \f$ if \f$ N < S_0 \f$
     84       - \f$ (0.69+3.14)/2 \f$ if \f$ N=S_0  \f$
     85       - \f$ 3.14 \f$ if \f$ S_0 < N < S_2 \f$
     86       - \f$ (3.14+28)/2 \f$ if \f$ N=S_2 \f$
     87       - \f$ 28 \f$ if \f$ S_2 < N \f$
     88       
     89       Note, that data point with weight zero is completely ignored.
    6590
    6691       \return percentile of range
Note: See TracChangeset for help on using the changeset viewer.