yat  0.10.4pre
tTest.h
1 #ifndef _theplu_yat_statistics_ttest_
2 #define _theplu_yat_statistics_ttest_
3 
4 // $Id: tTest.h 2119 2009-12-12 23:11:43Z 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 
11  This file is part of the yat library, http://dev.thep.lu.se/yat
12 
13  The yat library is free software; you can redistribute it and/or
14  modify it under the terms of the GNU General Public License as
15  published by the Free Software Foundation; either version 3 of the
16  License, or (at your option) any later version.
17 
18  The yat library is distributed in the hope that it will be useful,
19  but WITHOUT ANY WARRANTY; without even the implied warranty of
20  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21  General Public License for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with yat. If not, see <http://www.gnu.org/licenses/>.
25 */
26 
27 #include "AveragerWeighted.h"
28 
29 #include <gsl/gsl_cdf.h>
30 
31 namespace theplu {
32 namespace yat {
33 namespace statistics {
34 
42  class tTest
43  {
44 
45  public:
49  tTest(void);
50 
51 
55  void add(double value, bool target, double weight=1.0);
56 
62  void reset(void);
63 
89  double score(void);
90 
102  double p_value() const;
103 
107  double p_value_one_sided(void) const;
108 
109  private:
110 
111  double dof_;
112  bool updated_;
113  double t_;
114  AveragerWeighted pos_;
115  AveragerWeighted neg_;
116 
117  };
118 
119 }}} // of namespace statistics, yat, and theplu
120 
121 #endif

Generated on Mon Nov 11 2013 09:41:44 for yat by  doxygen 1.8.1