Changeset 589 for trunk/c++_tools/statistics/tScore.h

Ignore:
Timestamp:
Aug 24, 2006, 1:08:40 PM (15 years ago)
Message:

closes #79 and cleaned up code

File:
1 edited

Legend:

Unmodified
 r532 /// Class for Fisher's t-test. /// /// See /// http://en.wikipedia.org/wiki/Student's_t-test for more /// details on the t-test. /// class tScore : public Score { /// Calculates the value of t-score, i.e. the ratio between /// difference in mean and standard deviation of this /// difference. \f$\frac{ \vert \frac{1}{n_x}\sum x_i - /// \frac{1}{n_y}\sum y_i \vert } {\frac{\sum (x_i-m_x)^2 + \sum /// (y_i-m_y)^2}{n_x-1+n_y-1}} \f$ /// difference. \f$t = \frac{ m_x - m_y } /// {\frac{s^2}{n_x}+\frac{s^2}{n_y}} \f$ where \f$m \f$ is the /// mean, \f$n \f$ is the number of data points and \f$s^2 = /// \frac{ \sum_i (x_i-m_x)^2 + \sum_i (y_i-m_y)^2 }{ n_x + n_y - /// 2 } /// /// @return t-score if absolute=true /// absolute value of t-score is returned /// @return t-score if absolute=true absolute value of t-score /// is returned /// double score(const classifier::Target& target, /// /// Weighted version of t-Score @return t-score if absolute=true /// absolute value of t-score is returned. /// Calculates the weighted t-score, i.e. the ratio between /// difference in mean and standard deviation of this /// difference. \f$ t = \frac{ m_x - m_y } { /// \frac{s2}{n_x}+\frac{s2}{n_y} \f$where \f$ m \f$is the /// weighted mean, n is the weighted version of number of data /// points and \f$ s2 \f$is an estimation of the variance \f$ s^2 /// = \frac{ \sum_i w_i(x_i-m_x)^2 + \sum_i w_i(y_i-m_y)^2 }{ n_x /// + n_y - 2 } \f\$. See AveragerWeighted for details. /// /// @todo document /// @return t-score if absolute=true absolute value of t-score /// is returned /// double score(const classifier::Target& target, /// ///Calculates the p-value, i.e. the probability of observing a ///t-score equally or larger if the null hypothesis is true. If P ///is near zero, this casts doubt on this hypothesis. The null ///hypothesis is ...  @return the one-sided p-value( if ///absolute=true is used the two-sided p-value) /// Calculates the p-value, i.e. the probability of observing a /// t-score equally or larger if the null hypothesis is true. If P /// is near zero, this casts doubt on this hypothesis. The null /// hypothesis is that the means of the two distributions are /// equal. Assumtions for this test is that the two distributions /// are normal distributions with equal variance. The latter /// assumtion is dropped in Welch's t-test. /// /// @return the one-sided p-value( if absolute=true is used /// the two-sided p-value) /// double p_value() const;