Lilliefors Test for Normality

Statistics
Introduced by
Hubert W. Lilliefors
Year
1967
Type
Goodness-of-fit / normality test

What does it do?

The Lilliefors test is a goodness-of-fit test that checks whether a continuous sample comes from a normal distribution when the mean and variance are unknown and must be estimated from the data.

Introduced by Hubert W. Lilliefors in 1967, it adjusts the critical values of the Kolmogorov-Smirnov test so that they remain valid once the distribution's parameters are estimated rather than known in advance.

The intuition behind the method

Picture drawing the staircase of your data's empirical distribution and laying a smooth normal curve on top of it, fitted using the sample's own mean and standard deviation. The test measures the single largest vertical gap between the two. A small gap means the data hug the normal curve closely; a large gap signals a departure from normality. Because the normal curve is fitted to the same data, the gap tends to be smaller than it would be against a fixed curve, so the test uses smaller critical values than the ordinary Kolmogorov-Smirnov table rather than the larger ones that table would require.

History

Hubert W. Lilliefors introduced this correction in a 1967 Journal of the American Statistical Association paper, which addressed the fact that Kolmogorov-Smirnov critical values are not valid once the distribution's parameters are estimated from the sample. He obtained the corrected critical values by Monte Carlo calculation and included a brief Monte Carlo study of the test's power. In 1986 Gerard E. Dallal and Leland Wilkinson gave an analytic approximation to the upper-tail probabilities of the Lilliefors statistic for probabilities below .10, which they reported as more accurate than Lilliefors's original table, with few exceptions.

When to use it

Use the Lilliefors test when you want to check whether a single continuous variable is consistent with a normal distribution and the population mean and variance are not known, so they must be estimated from the sample. This is the usual situation in applied work, and it is the reason to prefer Lilliefors over the plain Kolmogorov-Smirnov test here. Choose a different approach when the distribution's parameters are fully specified in advance; the ordinary one-sample Kolmogorov-Smirnov test with its standard table applies in that case. The test is designed for continuous data and has limited power in small samples, so a non-rejection from a very small sample is weak evidence. It is not the appropriate tool for discrete data or for a distribution other than the normal. Other normality tests, such as the Shapiro-Wilk and Anderson-Darling tests, address the same question; which one is more suitable depends on the sample size and on the kinds of departure from normality of concern.

Limitations and considerations

  • Low power in small samples: the 1967 paper reports only a brief power investigation, and a non-rejection in a small sample may reflect low power rather than normality.
  • Built for the normal case: the corrected critical values are derived for a normal reference with estimated mean and variance, so they do not transfer to other distribution families with estimated parameters.
  • The statistic uses only the single largest gap between the two distributions, so it summarises the whole sample in one value and does not show where the departure from normality occurs.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Adjusts the Kolmogorov-Smirnov critical values for the case where the mean and variance are estimated from the sample, so the ordinary KS table does not make the test overly conservative.
  • Needs no prespecified mean or variance: the reference curve is built from the sample's own x̄ and s, as the model formula shows.
  • Computationally simple: the statistic is the largest gap between two cumulative distributions, and an analytic approximation for upper-tail probabilities below .10 is available.

Applications

  • Checking the normality assumption of a continuous variable before applying parametric tests such as t-tests or ANOVA, when the population mean and variance are not known.
  • Screening residuals or measurements for departures from normality, where the reference parameters must be estimated from the same data.
  • Supplementing visual checks, such as Q-Q plots, with a formal test of whether the sample is consistent with a normal distribution.

How it works

How it works

1

The null hypothesis states that the data were drawn from a normal distribution whose mean and standard deviation are unknown. Instead of fixing these parameters in advance, they are estimated from the sample (the sample mean x̄ and sample standard deviation s), so the reference curve is the standardised normal evaluated at the standardised observations. Use the same divisor convention (n or n−1) for s as the reference table or software that supplies the critical values.

Formula
H_0:\; F(x) = \Phi\!\left(\frac{x-\bar{x}}{s}\right)
2

The test statistic D is the maximum absolute distance between the empirical cumulative distribution function Fₙ(x) and the fitted normal CDF. Because the parameters were estimated from the data, D is compared against Lilliefors's corrected critical values, or against the Dallal-Wilkinson analytic approximation to its upper-tail probabilities for probabilities below .10. With few exceptions, that approximation is more accurate than Lilliefors's original table. D is not compared against the standard Kolmogorov-Smirnov table. A large D gives a small p-value and leads to rejection of normality.

Formula
D = \max_x \left| F_n(x) - \Phi\!\left(\frac{x-\bar{x}}{s}\right) \right|

Common pitfalls

  • Using ordinary Kolmogorov-Smirnov critical values after estimating the mean and variance from the data. This makes the test too conservative; the Lilliefors correction exists to fix this.
  • Treating a non-significant result as proof of normality. It means only that the test did not reject, which in small samples may reflect low power.
  • Applying the estimated-parameter critical values to a case where the mean and variance were actually specified in advance; in that case the one-sample Kolmogorov-Smirnov test with its standard table is the appropriate choice.
  • Drawing firm conclusions from a very small sample without noting that the test has limited power there.

Frequently asked questions

How does the Lilliefors test differ from the Kolmogorov-Smirnov test?

Both compare the empirical and a theoretical CDF using the maximum absolute gap. The plain Kolmogorov-Smirnov test assumes the distribution's parameters are known in advance; when you estimate the mean and variance from the same data, those critical values become too conservative. Lilliefors recomputes the critical values for this estimated-parameter case, so it is the correct choice when parameters are unknown.

What sample size do I need?

The test can be computed for small samples, but its power is limited there, so a non-significant result from a very small sample should be interpreted cautiously. No single minimum sample size is given here, because the cited sources do not supply one.

What does a non-significant p-value mean?

A large p-value means there is not enough evidence to reject normality. It does not prove the data are normal, and especially in small samples it may simply reflect low power.

Can it test distributions other than the normal?

The test is derived for the normal distribution with estimated mean and variance. It is not a general goodness-of-fit test for arbitrary distributions, and its critical values should not be borrowed for other families.

Related methods

Sources

  1. Lilliefors, H. W. (1967). On the Kolmogorov-Smirnov Test for Normality with Mean and Variance Unknown. Journal of the American Statistical Association, 62(318), 399-402.

    Open DOI reference
  2. Dallal, G. E., & Wilkinson, L. (1986). An Analytic Approximation to the Distribution of Lilliefors's Test Statistic for Normality. The American Statistician, 40(4), 294-296.

    Open DOI reference