eelbrain.test.lilliefors

eelbrain.test.lilliefors(data, formatted=False, **kwargs)

Lilliefors’ test for normal distribution

The Lilliefors test is an adaptation of the Kolmogorov-Smirnov test. It is used to test the null hypothesis that data come from a normally distributed population, when the null hypothesis does not specify which normal distribution, i.e. does not specify the expected value and variance.

Parameters:
data : array_like
formatted : bool

Return a single string with the results instead of the numbers.

kwargs :

All keyword arguments are forwarded to scipy.stats.kstest().

Returns:
D : float

The D-value of the Kolmogorov-Smirnov Test

p_estimate : float

The approximate p value according to Dallal and Wilkinson (1986). Requires minimal sample size of 5. p is reasonably accurate only when it is <= .1 (cf. Dallal and Wilkens).

Notes

Uses the scipy.stats.kstest implementation of the Kolmogorov-Smirnov test.

References

Dallal, G. E. and Wilkinson, L. (1986). An Analytic Approximation to the
Distribution of Lilliefors’s Test Statistic for Normality. The American Statistician, 40(4), 294–296.
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.