get_critical_value#

pycafee.normalitycheck.lilliefors.Lilliefors.get_critical_value(self, n_rep, alfa=None, correction=None)#

This function returns the tabulated value of the Lilliefors test.

Parameters
n_repint

The total number of observations (n_rep >= 4).

alfafloat, optional

The significance level (between 0.0 and 0.20, default = 0.05)

Returns
criticalfloat or None.

The critical value for the requested confidence level.

alfafloat

The corresponding significance level.

See also

draw_tabulated_values

draw a graph with the original tabulated data.

Notes

  • For data with sample size between 21 and 24 (20 < n_rep < 25), the critical value returned is the value for 25 observations;

  • For data with sample size between 26 and 29 (25 < n_rep < 30), the critical value returned is the value for 30 observations;

  • For data with a sample size higher than 31 (n_rep > 30), the critical value returned is the aproximation proposed by the authors.

This function has tabulated values for the following confidence levels:

  • 99% (ɑ = 0.01);

  • 95% (ɑ = 0.05);

  • 90% (ɑ = 0.10);

  • 85% (ɑ = 0.15);

  • 80% (ɑ = 0.20);

The function returns None for other confidence levels.

References

1

LILLIEFORS, H. W. On the Kolmogorov-Smirnov Test for Normality with Mean and Variance Unknown. Journal of the American Statistical Association, v. 62, n. 318, p. 399–402, 1967. DOI: 10.1080/01621459.1967.10482916.

Examples

Getting the tabulated value for 5% of significance and 6 observations

>>> from pycafee.normalitycheck import Lilliefors
>>> lilliefors_test = Lilliefors()
>>> result = lilliefors_test.get_critical_value(6)
>>> print(result)
LillieforsResult(tabulate=0.319, alpha=0.05)

Getting the tabulated value for 1% of significance and 10 observations

>>> from pycafee.normalitycheck import Lilliefors
>>> lilliefors_test = Lilliefors()
>>> result = lilliefors_test.get_critical_value(10, alfa=0.10)
>>> print(result)
LillieforsResult(tabulate=0.239, alpha=0.1)