QtiPlot  0.9.8.2
StatisticTest.h
Go to the documentation of this file.
1 /***************************************************************************
2  File : StatisticTest.h
3  Project : QtiPlot
4  --------------------------------------------------------------------
5  Copyright : (C) 2010 by Ion Vasilief
6  Email (use @ for *) : ion_vasilief*yahoo.fr
7  Description : Base class for statistic tests
8 
9  ***************************************************************************/
10 
11 /***************************************************************************
12  * *
13  * This program is free software; you can redistribute it and/or modify *
14  * it under the terms of the GNU General Public License as published by *
15  * the Free Software Foundation; either version 2 of the License, or *
16  * (at your option) any later version. *
17  * *
18  * This program 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 *
21  * GNU General Public License for more details. *
22  * *
23  * You should have received a copy of the GNU General Public License *
24  * along with this program; if not, write to the Free Software *
25  * Foundation, Inc., 51 Franklin Street, Fifth Floor, *
26  * Boston, MA 02110-1301 USA *
27  * *
28  ***************************************************************************/
29 #ifndef STATISTICTEST_H
30 #define STATISTICTEST_H
31 
32 #include <Statistics.h>
33 
34 class Table;
35 
37 class StatisticTest : public Statistics
38 {
39  Q_OBJECT
40 
41  public:
42  enum Tail{Left = 0, Right = 1, Both = 2};
44 
45  StatisticTest(ApplicationWindow *parent, double testValue = 0.0, double level = 0.05, const QString& sample = QString());
46  void setTail(const Tail& tail){d_tail = tail;};
47  void setTestValue(double val){d_test_val = val;};
48  void showDescriptiveStatistics(bool show = true){d_descriptive_statistics = show;};
49 
50  void setSignificanceLevel(double s){
51  if (s < 0.0 || s > 1.0)
52  return;
54  }
55 
56  virtual QString logInfo(){return Statistics::logInfo();};
57  virtual double statistic(){return 0.0;};
58  virtual double pValue(){return 0.0;};
60  virtual double lcl(double){return 0.0;};
62  virtual double ucl(double){return 0.0;};
63 
65  virtual Table *resultTable(const QString& name = QString());
66  virtual void outputResultsTo(Table *);
67 
68  protected:
69  double d_test_val;
71  int d_tail;
73 };
74 
75 #endif
virtual void outputResultsTo(Table *)
Definition: StatisticTest.cpp:41
Tail
Definition: StatisticTest.h:42
StatisticTest(ApplicationWindow *parent, double testValue=0.0, double level=0.05, const QString &sample=QString())
Definition: StatisticTest.cpp:32
virtual double pValue()
Definition: StatisticTest.h:58
Definition: StatisticTest.h:43
TestType
Definition: StatisticTest.h:43
void setSignificanceLevel(double s)
Definition: StatisticTest.h:50
virtual double statistic()
Definition: StatisticTest.h:57
Definition: StatisticTest.h:42
Abstract base class for data analysis operations.
Definition: Statistics.h:38
void showDescriptiveStatistics(bool show=true)
Definition: StatisticTest.h:48
bool d_descriptive_statistics
Definition: StatisticTest.h:72
Definition: StatisticTest.h:43
QString logInfo(bool header=true)
Definition: Statistics.cpp:120
double d_significance_level
Definition: StatisticTest.h:70
void setTail(const Tail &tail)
Definition: StatisticTest.h:46
void setTestValue(double val)
Definition: StatisticTest.h:47
QtiPlot&#39;s main window.
Definition: ApplicationWindow.h:133
virtual QString logInfo()
Definition: StatisticTest.h:56
Definition: StatisticTest.h:43
int d_tail
Definition: StatisticTest.h:71
virtual Table * resultTable(const QString &name=QString())
Returns a pointer to the table created to display the results.
Definition: StatisticTest.cpp:67
double d_test_val
Definition: StatisticTest.h:69
virtual double lcl(double)
Lower Confidence Limit.
Definition: StatisticTest.h:60
Chi-Square test for variance.
Definition: ChiSquareTest.h:35
Definition: StatisticTest.h:42
MDI window providing a spreadsheet table with column logic.
Definition: Table.h:57
Abstract base class for statistic tests.
Definition: StatisticTest.h:37
Definition: StatisticTest.h:42
virtual double ucl(double)
Upper Confidence Limit.
Definition: StatisticTest.h:62