tTest.h
Go to the documentation of this file.
/***************************************************************************
File : tTest.h
Project : QtiPlot
--------------------------------------------------------------------
Copyright : (C) 2010 by Ion Vasilief
Email (use @ for *) : ion_vasilief*yahoo.fr
Description : Student's t-Test
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, *
* Boston, MA 02110-1301 USA *
* *
***************************************************************************/
#ifndef TTEST_H
#define TTEST_H
#include <StatisticTest.h>
class tTest : public StatisticTest
{
Q_OBJECT
public:
tTest(ApplicationWindow *parent, double testValue, double level,
const QString& sample1 = QString(), const QString& sample2 = QString(), bool paired = false);
bool setSample1(const QString& colName){return setData(colName);};
bool setSample2(const QString& colName, bool paired = false);
virtual QString logInfo();
double t();
double statistic(){return t();};
double pValue();
int dof();
double power(double alpha, int size = 0);
double lcl(double confidenceLevel);
double ucl(double confidenceLevel);
protected:
double t(int size);
void freeMemory();
Statistics *d_sample2;
bool d_independent_test;
double d_s12, d_diff;
};
#endif
tTest::pValue
double pValue()
Definition: tTest.cpp:72
tTest::ucl
double ucl(double confidenceLevel)
Upper Confidence Limit.
Definition: tTest.cpp:142
tTest::d_s12
double d_s12
Definition: tTest.h:65
tTest::logInfo
virtual QString logInfo()
Definition: tTest.cpp:156
tTest::d_sample2
Statistics * d_sample2
Definition: tTest.h:63
Statistics
Abstract base class for data analysis operations.
Definition: Statistics.h:38
tTest::d_independent_test
bool d_independent_test
Definition: tTest.h:64
tTest::d_diff
double d_diff
Definition: tTest.h:65
ApplicationWindow
QtiPlot&#39;s main window.
Definition: ApplicationWindow.h:133
tTest::tTest
tTest(ApplicationWindow *parent, double testValue, double level, const QString &sample1=QString(), const QString &sample2=QString(), bool paired=false)
Definition: tTest.cpp:37
tTest::freeMemory
void freeMemory()
Frees the memory allocated for the X and Y data sets.
Definition: tTest.cpp:275
tTest::dof
int dof()
Returns the degrees of freedom.
Definition: tTest.cpp:48
tTest
Student&#39;s t-Test.
Definition: tTest.h:35
tTest::power
double power(double alpha, int size=0)
Definition: tTest.cpp:94
tTest::setSample2
bool setSample2(const QString &colName, bool paired=false)
Definition: tTest.cpp:236
StatisticTest
Abstract base class for statistic tests.
Definition: StatisticTest.h:37
Statistics::setData
bool setData(const QString &)
Definition: Statistics.cpp:64
tTest::lcl
double lcl(double confidenceLevel)
Lower Confidence Limit.
Definition: tTest.cpp:127
tTest::statistic
double statistic()
Definition: tTest.h:49
StatisticTest.h
tTest::setSample1
bool setSample1(const QString &colName)
Definition: tTest.h:43
tTest::t
double t()
Definition: tTest.cpp:56