#include <yat/statistics/tTest.h>
Public Member Functions | |
tTest (void) | |
Default Constructor. | |
void | add (double value, bool target, double weight=1.0) |
void | reset (void) |
Set everything to zero. | |
double | score (void) |
double | p_value () const |
double | p_value_one_sided (void) const |
See http://en.wikipedia.org/wiki/Student's_t-test for more details on the t-test.
void theplu::yat::statistics::tTest::add | ( | double | value, | |
bool | target, | |||
double | weight = 1.0 | |||
) |
Adding a data value to tTest.
double theplu::yat::statistics::tTest::p_value | ( | ) | const |
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.
double theplu::yat::statistics::tTest::p_value_one_sided | ( | void | ) | const |
void theplu::yat::statistics::tTest::reset | ( | void | ) |
double theplu::yat::statistics::tTest::score | ( | void | ) |
Calculates the t-score, i.e. the ratio between difference in mean and standard deviation of this difference. The t-score is calculated as where is the weighted mean, n is the weighted version of number of data points , and is an estimation of the variance