public class T extends HypothesisTest
t.test.| Constructor and Description |
|---|
T(double[] sample,
double mu)
Construct a one-sample location test of whether the mean of a normally distributed population
has a value specified in a null hypothesis.
|
T(double[] sample1,
double[] sample2)
Construct Welch's t-test, an adaptation of Student's t-test, for the use with two samples
having possibly unequal variances.
|
T(double[] sample1,
double[] sample2,
boolean isEqualVar,
double mu)
Construct a two sample location test of the null hypothesis that the means of two normally
distributed populations are equal.
|
T(double[] sample1,
double[] sample2,
double mu)
Construct Welch's t-test, an adaptation of Student's t-test, for the use with two samples
having possibly unequal variances.
|
| Modifier and Type | Method and Description |
|---|---|
double[] |
confidenceInterval(double confidence)
Get the confidence interval.
|
double |
df()
Get the degree of freedom.
|
String |
getAlternativeHypothesis()
Get the description of the alternative hypothesis.
|
String |
getNullHypothesis()
Get a description of the null hypothesis.
|
double |
leftConfidenceInterval(double confidence)
Get the one sided left confidence interval, [0, a]
|
double |
leftOneSidedPvalue()
Get the left, one-sided p-value.
|
double |
mean1()
Get the mean of the first sample.
|
double |
mean2()
Get the mean of the second sample.
|
double |
pValue()
Get the p-value for the test statistics.
|
double |
rightConfidenceInterval(double confidence)
Get the one sided right confidence interval, [a, ∞)
|
double |
rightOneSidedPvalue()
Get the right, one-sided p-value.
|
double |
statistics()
Get the test statistics.
|
isNullRejected, nGroups, nObs, oneSidedPvaluepublic T(double[] sample,
double mu)
sample - a samplemu - the hypothetical mean in the null hypothesispublic T(double[] sample1,
double[] sample2)
sample1 - sample 1sample2 - sample 2public T(double[] sample1,
double[] sample2,
double mu)
sample1 - sample 1sample2 - sample 2mu - the hypothetical mean-difference in the null hypothesispublic T(double[] sample1,
double[] sample2,
boolean isEqualVar,
double mu)
sample1 - sample 1sample2 - sample 2isEqualVar - true if we assume the variances of the two samples are equal;
false otherwisemu - the hypothetical mean-difference in the null hypothesis. The default value
is 0.public String getNullHypothesis()
HypothesisTestgetNullHypothesis in class HypothesisTestpublic String getAlternativeHypothesis()
HypothesisTestgetAlternativeHypothesis in class HypothesisTestpublic double statistics()
HypothesisTeststatistics in class HypothesisTestpublic double pValue()
HypothesisTestpValue in class HypothesisTestpublic double rightOneSidedPvalue()
public double leftOneSidedPvalue()
public double[] confidenceInterval(double confidence)
confidence - the confidence level, e.g., for a 2-sided 95% confidence interval, we use
0.975 because 1 - 0.95 = 2 * (1 - 0.025)public double rightConfidenceInterval(double confidence)
confidence - the confidence level, e.g., 0.95 for 95% confidence intervalpublic double leftConfidenceInterval(double confidence)
confidence - the confidence level, e.g., 0.95 for 95% confidence intervalpublic double df()
public double mean1()
public double mean2()
Copyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.