SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.stats.test.distribution.normality
Class DAgostino

java.lang.Object
  extended by com.numericalmethod.suanshu.stats.test.HypothesisTest
      extended by com.numericalmethod.suanshu.stats.test.distribution.normality.DAgostino

public class DAgostino
extends HypothesisTest

D'Agostino's K2 test is a goodness-of-fit measure of departure from normality.

It tests whether or not the given sample comes from a normally distributed population. The test is based on transformations of the sample kurtosis and skewness, and has power only against the alternatives that the distribution is skewed and/or kurtic.

The R equivalent function is dagoTest in fBasics.

See Also:
"D'Agostino, Ralph B., Albert Belanger, and Ralph B. D'Agostino, Jr. "A Suggestion for Using Powerful and Informative Tests of Normality", The American Statistician, Vol. 44, No. 4. (Nov., 1990), pp. 316-321."

Field Summary
 double K2
          test statistics K2
 double pvalueZ1
          the p-value for Z1
 double pvalueZ2
          the p-value for Z2
 double Z1
          Z1
 double Z2
          Z2
 
Fields inherited from class com.numericalmethod.suanshu.stats.test.HypothesisTest
k, N, pValue, testStatistics
 
Constructor Summary
DAgostino(double[] sample)
          Perform D'Agostino's test to test for the departure from normality.
 
Method Summary
 java.lang.String alternativeHypothesis()
          Get a description of the alternative hypothesis.
 java.lang.String nullHypothesis()
          Get a description of the null hypothesis.
 
Methods inherited from class com.numericalmethod.suanshu.stats.test.HypothesisTest
oneSidedPvalue, pValue, rejectNull, testStatistics
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

K2

public final double K2
test statistics K2


Z1

public final double Z1
Z1


Z2

public final double Z2
Z2


pvalueZ1

public final double pvalueZ1
the p-value for Z1


pvalueZ2

public final double pvalueZ2
the p-value for Z2

Constructor Detail

DAgostino

public DAgostino(double[] sample)
Perform D'Agostino's test to test for the departure from normality.

Parameters:
sample - a sample
Method Detail

nullHypothesis

public java.lang.String nullHypothesis()
Description copied from class: HypothesisTest
Get a description of the null hypothesis.

Specified by:
nullHypothesis in class HypothesisTest
Returns:
the null hypothesis description
See Also:
Wikipedia: Null hypothesis

alternativeHypothesis

public java.lang.String alternativeHypothesis()
Description copied from class: HypothesisTest
Get a description of the alternative hypothesis.

Specified by:
alternativeHypothesis in class HypothesisTest
Returns:
the alternative hypothesis description
See Also:
Wikipedia: Alternative hypothesis

SuanShu, a Java numerical and statistical library

Copyright © 2011 Numerical Method Inc. Ltd. All Rights Reserved.