yat  0.14.5pre
tTest.h
1 #ifndef _theplu_yat_statistics_ttest_
2 #define _theplu_yat_statistics_ttest_
3 
4 // $Id: tTest.h 3114 2013-11-10 23:51:47Z peter $
5 
6 /*
7  Copyright (C) 2004, 2005 Peter Johansson
8  Copyright (C) 2006 Jari Häkkinen, Peter Johansson, Markus Ringnér
9  Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson
10  Copyright (C) 2013 Peter Johansson
11 
12  This file is part of the yat library, http://dev.thep.lu.se/yat
13 
14  The yat library is free software; you can redistribute it and/or
15  modify it under the terms of the GNU General Public License as
16  published by the Free Software Foundation; either version 3 of the
17  License, or (at your option) any later version.
18 
19  The yat library is distributed in the hope that it will be useful,
20  but WITHOUT ANY WARRANTY; without even the implied warranty of
21  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22  General Public License for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with yat. If not, see <http://www.gnu.org/licenses/>.
26 */
27 
28 #include "AveragerWeighted.h"
29 #include "yat/utility/deprecate.h"
30 
31 #include <gsl/gsl_cdf.h>
32 
33 namespace theplu {
34 namespace yat {
35 namespace statistics {
36 
44  class tTest
45  {
46 
47  public:
51  tTest(void);
52 
53 
57  void add(double value, bool target, double weight=1.0);
58 
64  void reset(void);
65 
91  double score(void) const;
92 
97  double p_left(void) const;
98 
104  double p_right(void) const;
105 
113  double p_value() const;
114 
119  double p_value_one_sided(void) const YAT_DEPRECATE;
120 
121  private:
122 
123  mutable double dof_;
124  mutable bool updated_;
125  mutable double t_;
126  AveragerWeighted pos_;
127  AveragerWeighted neg_;
128  };
129 
130 }}} // of namespace statistics, yat, and theplu
131 
132 #endif
double p_left(void) const
Class to calulate averages with weights.
Definition: AveragerWeighted.h:66
void reset(void)
Set everything to zero.
tTest(void)
Default Constructor.
double score(void) const
void add(double value, bool target, double weight=1.0)
Class for Student&#39;s t-test.
Definition: tTest.h:44
double p_right(void) const
double p_value_one_sided(void) const

Generated on Tue Sep 26 2017 02:33:29 for yat by  doxygen 1.8.5