SuanShu, a Java numerical and statistical library

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

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

public class Lilliefors
extends HypothesisTest

Lilliefors test tests the null hypothesis that data come from a normally distributed population with an estimated sample mean and variance. The test statistic is the maximal absolute difference between empirical and the hypothetical NormalDistribution distribution function.

Since the hypothesized CDF has been moved closer to the data by estimation based on the data, the "null distribution" of the test statistic, i.e. its probability distribution assuming the null hypothesis is true, is stochastically smaller than the Kolmogorov–Smirnov distribution, hence the Lilliefors distribution.

We first compute the p-value from the Dallal-Wilkinson (1986) formula, which is claimed to be only reliable when the p-value is smaller than 0.1. When this p-value is > 0.1, we compute again the p-value from the distribution of the modified statistic (Stephen 1974).

The R equivalent function is lillie.test in package nortest.

See Also:

Field Summary
 
Fields inherited from class com.numericalmethod.suanshu.stats.test.HypothesisTest
k, N, pValue, testStatistics
 
Constructor Summary
Lilliefors(double[] sample)
          Perform the Lilliefors test to test for the null hypothesis that data come from a normally distributed population with an estimated sample mean and variance.
 
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
 

Constructor Detail

Lilliefors

public Lilliefors(double[] sample)
Perform the Lilliefors test to test for the null hypothesis that data come from a normally distributed population with an estimated sample mean and variance.

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.