public abstract class HypothesisTest extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
HypothesisTest(double[]... samples)
Construct an instance of
HypothesisTest from the samples. |
| Modifier and Type | Method and Description |
|---|---|
abstract String |
getAlternativeHypothesis()
Get the description of the alternative hypothesis.
|
abstract String |
getNullHypothesis()
Get a description of the null hypothesis.
|
boolean |
isNullRejected(double alpha)
Use the p-value to check whether the null hypothesis can be rejected for a given significance level.
|
int |
nGroups()
Get the number of groups of observations.
|
int |
nObs()
Get the total number of observations.
|
static double |
oneSidedPvalue(ProbabilityDistribution F,
double x)
The one-sided p-value is the probability of observing a test statistic at least as extreme as the one observed.
|
abstract double |
pValue()
Get the p-value for the test statistics.
|
abstract double |
statistics()
Get the test statistics.
|
protected HypothesisTest(double[]... samples)
HypothesisTest from the samples.samples - an array of samplespublic abstract double statistics()
public abstract double pValue()
public int nGroups()
public int nObs()
public boolean isNullRejected(double alpha)
alpha - a significance level of testtrue if the hypothesis is rejected due to p-value < αpublic abstract String getNullHypothesis()
public abstract String getAlternativeHypothesis()
public static double oneSidedPvalue(ProbabilityDistribution F, double x)
F - a univariate distributionx - the critical valueCopyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.