Statistics::tTest Function

Overload List

#SignatureDescription
1double tTest(TVec *Data, double Mean, THypothesisResult &hRes, double &Signif, DewArray<double> &ConfInt, const THypothesisType hType = THypothesisType::htTwoTailed, const double Alpha = 0.05);One or two sample paired or pooled T-test.
2double tTest(TVec *Data1, TVec *Data2, THypothesisResult &hRes, double &Signif, DewArray<double> &ConfInt, bool Paired = false, THypothesisType hType = THypothesisType::htTwoTailed, double Alpha = 0.05);Performs the two sample pooled or paired t-test.

Overload 1: double tTest(TVec *Data, double Mean, THypothesisResult &hRes, double &Signif, DewArray<double> &ConfInt, const THypothesisType hType = THypothesisType::htTwoTailed, const double Alpha = 0.05);

One or two sample paired or pooled T-test.

#NameTypeDescription
1DataTVec *
2Meandouble
3hResTHypothesisResult &
4Signifdouble &
5ConfIntDewArray<double> &
6hType = THypothesisType::htTwoTailedconst THypothesisType
7Alpha = 0.05const double
Remarks:

Performs the one sample T-test. It compares Data mean value with the Mean. The null hypothesis is that Data mean value is equal to the Mean.

Declared in Dew::Stats::Units::Statistics · Dew.Stats/Units.Statistics.h · Cross-compiler

Overload 2: double tTest(TVec *Data1, TVec *Data2, THypothesisResult &hRes, double &Signif, DewArray<double> &ConfInt, bool Paired = false, THypothesisType hType = THypothesisType::htTwoTailed, double Alpha = 0.05);

Performs the two sample pooled or paired t-test.

#NameTypeDescription
1Data1TVec *First set of data from which to compute the mean.
2Data2TVec *Second set of data from which to compute the mean.
3hResTHypothesisResult &Returns the result of the null hypothesis (default assumption is that the means are equal).
4Signifdouble &(Significance level) returns the probability of observing the given result by chance given that the null hypothesis is true.
5ConfIntDewArray<double> &Returns the 100*(1-Alpha) percent confidence interval for the mean.
6Paired = falseboolIf true, tTest routine will perform Two-Sample Paired t-Test. If false, tTest will perform Two-Sample Pooled (unpaired) t-Test.
7hType = THypothesisType::htTwoTailedTHypothesisTypeDefines the type of the null hypothesis (left, right and two - tailed).
8Alpha = 0.05doubleDefines the desired significance level. If the significance probability (Signif) is bellow the desired significance (Alpha), the null hypothesis is rejected.

Returns: The T-test statistics.

Remarks:

It compares Data1 mean value with Data2 mean value. The assumption is Data1 and Data2 variances are equal, but unknown. The null hypothesis is that Data1 mean is equal to Data2 mean.

See Also: Statistics::ZTest
Declared in Dew::Stats::Units::Statistics · Dew.Stats/Units.Statistics.h · Cross-compiler