tTest Class Reference

Student's t-Test. More...

`#include <tTest.h>`

Inheritance diagram for tTest:

## Public Member Functions

int | dof ()
| Returns the degrees of freedom. More...
double | lcl (double confidenceLevel)
| Lower Confidence Limit. More...
virtual QString | logInfo ()
double | power (double alpha, int size=0)
double | pValue ()
bool | setSample1 (const QString &colName)
bool | setSample2 (const QString &colName, bool paired=false)
double | statistic ()
double | t ()
| tTest (ApplicationWindow *parent, double testValue, double level, const QString &sample1=QString(), const QString &sample2=QString(), bool paired=false)
double | ucl (double confidenceLevel)
| Upper Confidence Limit. More...
Public Member Functions inherited from StatisticTest
virtual void | outputResultsTo (Table *)
virtual Table * | resultTable (const QString &name=QString())
| Returns a pointer to the table created to display the results. More...
void | setSignificanceLevel (double s)
void | setTail (const Tail &tail)
void | setTestValue (double val)
void | showDescriptiveStatistics (bool show=true)
| StatisticTest (ApplicationWindow *parent, double testValue=0.0, double level=0.05, const QString &sample=QString())
Public Member Functions inherited from Statistics
double * | data ()
| Returns the y values of the input data set. More...
unsigned int | dataSize ()
| Returns the size of the input data set. More...
QString | logInfo (bool header=true)
double | mean ()
virtual bool | run ()
| Actually does the job. Should be reimplemented in derived classes. More...
QString | sampleName ()
bool | setData (const QString &)
void | showResultsLog (bool show=true)
double | standardDeviation ()
double | standardError ()
| Statistics (ApplicationWindow *parent, const QString &name=QString())
double | variance ()
| ~Statistics ()

## Protected Member Functions

void | freeMemory ()
| Frees the memory allocated for the X and Y data sets. More...
double | t (int size)
Protected Member Functions inherited from Statistics
void | memoryErrorMessage ()

## Protected Attributes

double | d_diff
bool | d_independent_test
double | d_s12
Statistics * | d_sample2
Protected Attributes inherited from StatisticTest
bool | d_descriptive_statistics
double | d_significance_level
int | d_tail
double | d_test_val
Protected Attributes inherited from Statistics
QString | d_col_name
| The name of the source data set. More...
double * | d_data
| y data set to be analysed More...
double | d_mean
unsigned int | d_n
| The size of the data set to be analyzed. More...
bool | d_result_log
| Flag specifying if the results should be displayed in the results log. More...
double | d_sd
double | d_se
Table * | d_table
| A table source of data. More...
double | d_variance

## Additional Inherited Members

Public Types inherited from StatisticTest
enum | Tail { Left = 0, Right = 1, Both = 2 }
enum | TestType { StudentTest = 0, NormalityTest = 1, ChiSquareTest = 2, AnovaTest = 3 }

## Detailed Description

Student's t-Test.

## Constructor & Destructor Documentation

## tTest()

tTest::tTest | ( | ApplicationWindow * | parent,
|  | double | testValue,
|  | double | level,
|  | const QString & | sample1 = `QString()`,
|  | const QString & | sample2 = `QString()`,
|  | bool | paired = `false`
| ) |  |

References setSample2().

## Member Function Documentation

## dof()

int tTest::dof | ( |  | ) |

virtual

Returns the degrees of freedom.

Reimplemented from Statistics.

References d_independent_test, Statistics::d_n, d_sample2, and Statistics::dataSize().

Referenced by lcl(), logInfo(), power(), pValue(), statistic(), and ucl().

## freeMemory()

void tTest::freeMemory | ( |  | ) |

protected virtual

Frees the memory allocated for the X and Y data sets.

Reimplemented from Statistics.

References d_sample2, and Statistics::freeMemory().

Referenced by statistic().

## lcl()

double tTest::lcl | ( | double | confidenceLevel | ) |

virtual

Lower Confidence Limit.

Reimplemented from StatisticTest.

References d_diff, Statistics::d_mean, Statistics::d_n, d_s12, d_sample2, Statistics::d_se, and dof().

Referenced by statistic().

## logInfo()

QString tTest::logInfo | ( |  | ) |

virtual

Reimplemented from StatisticTest.

References StatisticTest::Both, ApplicationWindow::d_decimal_digits, StatisticTest::d_descriptive_statistics, d_diff, d_independent_test, d_sample2, StatisticTest::d_significance_level, Statistics::d_table, StatisticTest::d_tail, StatisticTest::d_test_val, dof(), StatisticTest::Left, Statistics::logInfo(), pValue(), StatisticTest::Right, and t().

Referenced by setSample1().

## power()

double tTest::power | ( | double | alpha,
|  | int | size = `0`
| ) |  |

References StatisticTest::Both, d_independent_test, Statistics::d_n, d_sample2, StatisticTest::d_tail, dof(), StatisticTest::Left, StatisticTest::Right, and t().

Referenced by statistic().

## pValue()

double tTest::pValue | ( |  | ) |

virtual

Reimplemented from StatisticTest.

References StatisticTest::Both, Statistics::d_n, StatisticTest::d_tail, dof(), StatisticTest::Left, StatisticTest::Right, and t().

Referenced by logInfo(), and statistic().

## setSample1()

bool tTest::setSample1 | ( | const QString & | colName | ) |

inline

References logInfo(), Statistics::setData(), setSample2(), and t().

## setSample2()

bool tTest::setSample2 | ( | const QString & | colName,
|  | bool | paired = `false`
| ) |  |

References Statistics::d_data, d_diff, d_independent_test, Statistics::d_mean, Statistics::d_n, d_s12, d_sample2, Statistics::d_sd, Statistics::data(), Statistics::dataSize(), Statistics::mean(), Statistics::standardDeviation(), and Statistics::Statistics().

Referenced by setSample1(), and tTest().

## statistic()

double tTest::statistic | ( |  | ) |

inline virtual

Reimplemented from StatisticTest.

References dof(), freeMemory(), lcl(), power(), pValue(), t(), and ucl().

## t() [1/2]

double tTest::t | ( |  | ) |

References d_diff, Statistics::d_mean, Statistics::d_n, d_s12, d_sample2, Statistics::d_sd, and StatisticTest::d_test_val.

Referenced by logInfo(), power(), pValue(), setSample1(), and statistic().

## t() [2/2]

double tTest::t | ( | int | size | ) |

protected

References Statistics::d_mean, Statistics::d_sd, and StatisticTest::d_test_val.

## ucl()

double tTest::ucl | ( | double | confidenceLevel | ) |

virtual

Upper Confidence Limit.

Reimplemented from StatisticTest.

References d_diff, Statistics::d_mean, Statistics::d_n, d_s12, d_sample2, Statistics::d_se, and dof().

Referenced by statistic().

## Member Data Documentation

## d_diff

double tTest::d_diff

protected

Referenced by lcl(), logInfo(), setSample2(), t(), and ucl().

## d_independent_test

bool tTest::d_independent_test

protected

Referenced by dof(), logInfo(), power(), and setSample2().

## d_s12

double tTest::d_s12

protected

Referenced by lcl(), setSample2(), t(), and ucl().

## d_sample2

Statistics* tTest::d_sample2

protected

Referenced by dof(), freeMemory(), lcl(), logInfo(), power(), setSample2(), t(), and ucl().

The documentation for this class was generated from the following files:

- qtiplot/src/analysis/tTest.h
- qtiplot/src/analysis/tTest.cpp