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_rep
int The total number of observations (
n_rep >= 4).- alfa
float, optional The significance level (between
0.0and0.20, default =0.05)
- n_rep
- Returns
- critical
floatorNone. The critical value for the requested confidence level.
- alfa
float The corresponding significance level.
- critical
See also
draw_tabulated_valuesdraw a graph with the original tabulated data.
Notes
For data with sample size between
21and24(20 < n_rep < 25), the critical value returned is the value for25observations;For data with sample size between
26and29(25 < n_rep < 30), the critical value returned is the value for30observations;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
Nonefor 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 and6observations>>> 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 and10observations>>> 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)