yat
0.14.5pre
|
Class for Student's t-test. More...
#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. More... | |
double | score (void) const |
double | p_left (void) const |
double | p_right (void) const |
double | p_value () const |
double | p_value_one_sided (void) const |
Class for Student's t-test.
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_left | ( | void | ) | const |
double theplu::yat::statistics::tTest::p_right | ( | void | ) | const |
double theplu::yat::statistics::tTest::p_value | ( | ) | const |
Calculates the two-sided p-value, i.e., the probability to observe a t-score equal (or greater) than |t| or smaller than -|t|, where t is the observed t-score (returned by score()).
double theplu::yat::statistics::tTest::p_value_one_sided | ( | void | ) | const |
void theplu::yat::statistics::tTest::reset | ( | void | ) |
Set everything to zero.
double theplu::yat::statistics::tTest::score | ( | void | ) | const |
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
If all weights are equal to unity this boils down to where is the mean, is the number of data points and