Package dev.nm.stat.test.distribution
Class AndersonDarling
- java.lang.Object
-
- dev.nm.stat.test.HypothesisTest
-
- dev.nm.stat.test.distribution.AndersonDarling
-
public class AndersonDarling extends HypothesisTest
This algorithm calculates the Anderson-Darling k-sample test statistics and p-values. The Anderson-Darling k-sample test tests whether the k samples are from the same distribution, which does not needs to be specified. The results produce two statistics and two p-values. TkN and pkN are the statistic and p-value when there are no tied observations. TakN and pakN are the statistic and p-value when the distribution is discrete, or when the continuous data are grouped. Under these two circumstances there may be tied observations.
-
-
Constructor Summary
Constructors Constructor Description AndersonDarling(double[]... x)
Runs the Anderson-Darling test.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAlternativeHypothesis()
Get the description of the alternative hypothesis.String
getNullHypothesis()
Get a description of the null hypothesis.double
pValue()
Get the p-value for the test statistics.double
pValueAlternative()
Gets the alternative p-value (adjusted for ties).double
statistics()
Get the test statistics.double
statisticsAlternative()
Gets the alternative Anderson-Darling statistic (adjusted for ties).-
Methods inherited from class dev.nm.stat.test.HypothesisTest
isNullRejected, nGroups, nObs, oneSidedPvalue
-
-
-
-
Method Detail
-
getAlternativeHypothesis
public String getAlternativeHypothesis()
Description copied from class:HypothesisTest
Get the description of the alternative hypothesis.- Specified by:
getAlternativeHypothesis
in classHypothesisTest
- Returns:
- the alternative hypothesis description
- See Also:
- Wikipedia: Alternative hypothesis
-
getNullHypothesis
public String getNullHypothesis()
Description copied from class:HypothesisTest
Get a description of the null hypothesis.- Specified by:
getNullHypothesis
in classHypothesisTest
- Returns:
- the null hypothesis description
- See Also:
- Wikipedia: Null hypothesis
-
pValue
public double pValue()
Description copied from class:HypothesisTest
Get the p-value for the test statistics.- Specified by:
pValue
in classHypothesisTest
- Returns:
- the p-value
- See Also:
- Wikipedia: P-value
-
statistics
public double statistics()
Description copied from class:HypothesisTest
Get the test statistics.- Specified by:
statistics
in classHypothesisTest
- Returns:
- the test statistics
- See Also:
- Wikipedia: Test statistic
-
pValueAlternative
public double pValueAlternative()
Gets the alternative p-value (adjusted for ties).- Returns:
- the alternative p-value
-
statisticsAlternative
public double statisticsAlternative()
Gets the alternative Anderson-Darling statistic (adjusted for ties).- Returns:
- the alternative Anderson-Darling statistic
-
-