Class 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 Normal 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.

    In this implementation, 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:
    • G. E. Dallal, L. Wilkinson, "An analytic approximation to the distribution of Lilliefors' test for normality," The American Statistician, 40, 294-296, 1986.
    • M. A. Stephens, "EDF statistics for goodness of fit and some comparisons," Journal of the American Statistical Association, 69, 730-737, 1974.
    • Wikipedia: Lilliefors test