Joural of Moder Applied Statistical Methods Volume 14 Issue 1 Article 9 5-1-2015 Modified Lilliefors Test Achut Adhikari Uiversity of Norther Colorado, adhi2939@gmail.com Jay Schaffer Uiversity of Norther Colorado, jay.schaffer@uco.edu Follow this ad additioal works at: http://digitalcommos.waye.edu/jmasm Recommeded Citatio Adhikari, Achut ad Schaffer, Jay (2015) "Modified Lilliefors Test," Joural of Moder Applied Statistical Methods: Vol. 14 : Iss. 1, Article 9. DOI: 10.22237/jmasm/1430453280 Available at: http://digitalcommos.waye.edu/jmasm/vol14/iss1/9 This Regular Article is brought to you for free ad ope access by the Ope Access Jourals at DigitalCommos@WayeState. It has bee accepted for iclusio i Joural of Moder Applied Statistical Methods by a authorized editor of DigitalCommos@WayeState.
Joural of Moder Applied Statistical Methods May 2015, Vol. 14, No. 1, 53-69. Copyright 2015 JMASM, Ic. ISSN 1538 9472 Modified Lilliefors Test A. Adhikari Uiversity of Norther Colorado Greeley, Colorado J. Schaffer Uiversity of Norther Colorado Greeley, Colorado A ew expoetiality test was developed by modifyig the Lilliefors test of expoetiality. The proposed test cosidered the sum of all the absolute differeces betwee the expoetial cumulative distributio fuctio (CDF) ad the sample empirical distributio fuctio (EDF). The proposed test is simple to uderstad ad easy to compute. Keywords: Cumulative distributio fuctio, empirical distributio fuctio, expoetiality test, critical value, sigificace level, ad power Itroductio Expoetial distributios are quite ofte used i duratio models ad survival aalysis, icludig several applicatios i macroecoomics, fiace ad labor ecoomics (optimal isurace policy, duratio of uemploymet spell, retiremet behavior, etc.). Quite ofte the data-geeratig process for estimatig these types of models is assumed to behave as a expoetial distributio. This calls for developig tests for distributioal assumptios i order to avoid misspecificatio of the model (Acosta & Rojas, 2009). The validity of estimates ad tests of hypotheses for aalyses derived from liear models rests o the merits of several key assumptios. The aalysis of variace ca lead to erroeous ifereces if certai assumptios regardig the data are ot satisfied (Kuehl, 2000, p. 123). As statistical cosultats we should always cosider the validity of the assumptios, be doubtful, ad coduct aalyses to examie the adequacy of the model. Gross violatios of the assumptios may yield a ustable model i the sese that differet samples could lead to a totally differet model with opposite coclusios (Motgomery, Peck, & Viig, 2006, p. 122). I this study we developed a ew Goodess-of-Fit Test (GOFT) of expoetiality ad compare it with four other existig GOFTs i terms of Both authors are i the Applied Statistics ad Research Methods. Email Dr. Adhikari at adhi2939@gmail.com. Email Dr. Schaffer at Jay.Schaffer@uco.edu. 53
ADHIKARI & SCHAFFER computatio ad performace. This study also derived the critical values of the proposed test. The proposed test cosidered the sum of all the absolute differeces betwee the empirical distributio fuctio (EDF) ad the expoetial cumulative distributio fuctio (CDF). Methodology To geerate critical values, this study used data simulatio techiques to mimic the desired parameter settigs. Three differet scale parameters (θ = 1, 5, ad 10) were used to geerate radom samples from a expoetial distributio. Sample sizes 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30, 35, 40, 45 ad 50 were used. The study cosidered three differet sigificace levels (α) (0.01, 0.05 ad 0.10). For each sample size ad sigificace level, 50,000 trials were ru from a expoetial distributio which geerated 50,000 test statistics. The 50,000 test statistics were the arraged i the order from smallest to largest. The proposed test is a right tail test. So, this study used the 99 th, 95 th, ad 90 th percetile of the test statistics as the critical values for the give sample size for the 0.01, 0.05, ad 0.10 sigificace levels respectively. To verify the accuracy of the iteded sigificace levels ad to compare the power of the proposed test with other four expoetiality tests, data were produced from varieties of 12 distributios (Weibull (1,0.50), Weibull (1,0.75), Gamma (4,0.25), Gamma (0.55,0.275), Gamma (0.55,0.412), Gamma (4,0.50), Gamma (4,0.75), Gamma (4,1), Chi-Square (1), Chi-Square (2), t (5) ad log-ormal (0,1)) to see how the proposed test statistic works. Fifty thousad replicatios were draw from each distributio for sample sizes 5, 10, 15, 20, 25, 30, 40, 50, 60, 70, 80, 90, 100, 200, 300, 400, 500, 1000, ad 2000. For each sample size, the proposed test statistic ad critical values were compared to make decisios about the ull hypothesis. There were 50,000 trials for each sample size. The study tracked the umber of rejectios (rejectio yes or o) i 50,000 trials to evaluate capacity of the proposed test to detect the departure from expoetiality. The study used R 3.0.2 for most of the simulatios to geerate test statistics, critical values ad power comparisos. Microsoft Excel 2010 was also used to make tables ad charts. Mote Carlo simulatio techiques were used to geerate radom umbers which were used to approximate the distributio of critical values for each test. The proposed modified Lilliefors expoetiality test statistic (PML) takes the form, 54
MODIFIED LILLIEFORS TEST * where i * i i, (1) PML F x S x i1 F x is the CDF of expoetial distributio usig the maximum likelihood estimator for the scale parameter θ ad S(x i ) is the sample cumulative distributio fuctio. The estimator ˆ is the uiformly miimum variace ubiased estimator (UMVUE) of the scale parameter θ. * F x, is give by 2 The CDF, i xi, (2) x * F xi 1 exp where x i1 i x. The EDF is give by equatio 3 S xi i (3) Lilliefors test (LF-test) statistic (Lilliefors, 1969) is give by: Sup, (4) x * D F xi S xi xi where, F*(x i ) = 1 exp x, x i1 i x, ad S(x i ) is the empirical distributio fuctio (EDF). Fikelstei & Schafers test (S-test) statistics (Fikelstei & Schafer, 1971) is give by: ˆ i i i i1 S F X F X max 0,, ˆ 0, i1, (5) 1 where, ˆ x i i x. Va-Soest test (VS-test) statistics (Soest, 1969) is give by: 55
ADHIKARI & SCHAFFER W 2 2 1 i 0.5 ti 12 i1, (6) xi x i1 i where, ti 1 exp, ad x. Sriivasa test ( D - test) statistics x (Sriivasa, 1970) is give by: D max1 i S x F x ;, (7) i where, λ is a scale parameter, Fx ; = 1-1 Accordig to Pugh (1963), the test statistic, x i x D 1, Sx i is the EDF. -test, is based o the Rao-Blackwell ad Lehma-Scheffe theorems which give the best ubiased estimate. Schafer, Fikelstei ad Collis (1972) corrected the critical poits of this test statistic origially proposed by Sriivasa (1970). Results Developmet of critical values The critical values from the simulated data geerated for the three differet values of the scale parameters (θ = 1, 5, ad 10) are exactly the same for the set of parameters. It appeared that the critical values for the proposed test are the fuctios of the sample size () ad the sigificace levels (α) but ivariat with the choice of the scale parameter (θ). Table 1 shows the critical values for the proposed test. Due to space limitatios, oly five digits are show o Table 1. 56
MODIFIED LILLIEFORS TEST Table 1. Critical Values for the Proposed Expoetiality Test (θ = 1) α = 0.01 α = 0.05 α = 0.10 4 1.0567 0.8331 0.7409 5 1.1760 0.9315 0.8202 6 1.2703 1.0109 0.8931 7 1.3642 1.0856 0.9562 8 1.4647 1.1580 1.0189 9 1.5403 1.2209 1.0757 10 1.6274 1.2875 1.1310 15 1.9444 1.5561 1.3653 20 2.2271 1.7731 1.5636 25 2.4762 1.9682 1.7342 30 2.7097 2.1624 1.9066 35 2.9111 2.3291 2.0584 40 3.1062 2.4837 2.1904 45 3.3216 2.6331 2.3204 50 3.4557 2.7526 2.4309 Accuracy of sigificace levels The simulated sigificace levels are preseted o Table 2. Due to the limitatios of the space, the simulated sigificace levels are rouded to three digits. The results showed that all five tests of expoetiality worked very well i terms of cotrollig the iteded sigificace levels. The study foud that the proposed test performs very closely to other four tests of expoetiality i terms of the accuracy of the iteded sigificace levels (for each sample size ad overall averages across the 19 differet sample sizes). To allow for a better view of the five expoetiality tests across all sample sizes ad sigificace levels, the colums for Lilliefors test are labelled by LF, Va-Soest test by VS, proposed modified Lilliefors test by PML, Sriivasa test by D ad Fikelstei & Schafers test by S for the rest of the tables ad figures preseted i this study. Table 2. Average Simulated Sigificace Levels α LF D CVM S PML 0.010 0.010 0.010 0.010 0.010 0.010 0.050 0.051 0.051 0.051 0.051 0.051 0.100 0.100 0.100 0.101 0.101 0.101 57
ADHIKARI & SCHAFFER Power aalysis First, cosider the relatioship betwee the alterative distributio, Weibull (1, 0.50) ad the simulated power. Figure 1 summarizes the power aalysis for the Weibull (1, 0.50) alterative distributio. The PML-test outperformed the power for all other four expoetiality tests across all sigificace levels ad sample sizes. The power of all four expoetiality tests exceeded the LF-test. The VS-test, the D-test, ad the S-test showed similar performace i power. It appears that for sample sizes 40 or more, the powers for all five expoetiality tests close to 1. Figure 1. Power for Alterative Distributio: Weibull (1, 0.50) Secod, cosider the relatioship betwee the alterative distributio, Weibull (1, 0.75) ad the simulated power. Figure 2 summarizes the power aalysis for the Weibull (1, 0.75) alterative distributio. This distributio has the 58
MODIFIED LILLIEFORS TEST same scale parameter (θ = 1) with the previous Weibull (1, 0.50) distributio but the shape parameter (β) is chaged from 0.50 to 0.75. This caused the power to reduce substatially across all sample sizes ad all sigificace levels uder cosideratio. The PML-test outperformed the power for all other four expoetiality tests across all sample sizes ad sigificace levels. I all parameter settigs uder ivestigatio, the powers for the LF-test were the lowest as compared to other four expoetiality tests. The powers of the S-test ad VS-test were almost idetical across all sample sizes ad sigificace levels. For a fixed sigificace level, the powers for the D-test were greater tha the S-test ad VS-test for small sample sizes but this relatioship was reversed for medium to large sample sizes. For all sigificace levels with sample sizes at least 200, the powers for all five expoetiality tests were almost equal ad they approach 1. Figure 2. Power for Alterative Distributio: Weibull (1, 0.75) 59
ADHIKARI & SCHAFFER Third, cosider the relatioship betwee the alterative distributio, Gamma (4, 0.25) ad the simulated power. Figure 3 summarize the power aalysis for the Gamma (4, 0.25) alterative distributio. Accordig to Bai ad Egelhardt (1992), the shape parameter, k, i the Gamma distributio determies the basic shape of the graph of the probability distributio fuctio (PDF). The value of the shape parameter i ull distributio is 1 ad the shape parameter i this alterative distributio is 0.25 which are much differet. The PML-test outperformed the powers of all other four expoetiality tests across all sample sizes ad all sigificace levels uder cosideratio. For a fixed sigificace level, the powers of the D-test, VS-test, ad S-test exceeded the powers of the LF-test for small sample sizes. For medium to large sample sizes, the LF-test, D-test, S- test, ad the VS-test exhibited the idetical power across all sigificace levels. I all parameter settigs, the powers of the D-test, the VS-test ad the S-test were similar. For sample sizes at least 40, the powers of all five expoetiality tests were foud almost equal which were close to 1 across all sigificace levels. Figure 3. Power for Alterative Distributio: Gamma (4, 0.25) 60
MODIFIED LILLIEFORS TEST Fourth, cosider the relatioship betwee the alterative distributio, Gamma (0.55, 0.275) ad the simulated power. Figure 4 summarizes the power aalysis for the Gamma (0.55, 0.275) alterative distributio. The PML-test outperformed other four expoetiality tests across all sample sizes ad sigificace levels. The LF-test exhibited the lowest power across all sample sizes ad sigificace levels. For sample sizes at least 50, the powers for all five tests were foud almost equal which were close to 1 across all sigificace levels. I all parameter settigs, the powers for the VS-test, the D-test, ad the S-test were idetical but all these three tests outperformed the LF-test across all sample sizes ad sigificace levels. Figure 4. Power for Alterative Distributio: Gamma (0.55, 0.275) Although the overall power treds i the previous alterative distributio (Gamma (4, 0.25)) ad this distributio were similar amog five expoetiality tests, the powers for this distributio was lower tha the previous alterative 61
ADHIKARI & SCHAFFER distributio across all sample sizes ad sigificace levels. I the previous alterative distributio, the value of the shape parameter (K) is 0.25 which is 0.275 i this alterative distributio. Fifth, cosider the relatioship betwee the alterative distributio, Gamma (0.55, 0.412) ad the simulated power. Figure 5 summarizes the power aalysis for the Gamma (0.55, 0.412) alterative distributio. The PML-test outperformed other four expoetiality tests across all sample sizes ad sigificace levels. The LF-test exhibited the lowest power across all sample sizes ad sigificace levels. For sample sizes at least 80, the powers for all five tests were foud almost equal which were close to 1 across all sigificace levels. I all parameter settigs, the powers for the VS-test, the D-test, ad the S-test were idetical but all three tests outperformed the LF-test across all sample sizes ad sigificace levels. Comparig the powers for this alterative distributio with the previous alterative distributio (Gamma (0.55, 0.275)), the powers were reduced i this alterative distributio across all sample sizes ad sigificace levels. This is due to oly the chage i shape parameter (k) from 0.275 to 0.412. The scale parameters (θ) were the same o these two alterative distributios. It is relevat to argue that for Gamma alterative distributio, the powers for these five expoetiality tests deped oly o the shape parameter (k). It is also importat to ote that the shape parameter (k) i the ull distributio was 1. So, this study showed that as the shape parameter i the alterative distributio is close to the shape parameter of the ull distributio, the simulated powers would be decreased. Before cosiderig the power for ext two alterative distributios, it is imperative to discuss that the Chi-Square distributio is a special case of Gamma distributio. Accordig to Bai ad Egelhardt (1992), if a variable Y is a special Gamma distributio with scale parameter (θ = 2) ad shape parameter (k = ν/2), the variable Y is said to follow a Chi-Square distributio with ν degrees of freedom. So, if Y ~ Gamma (θ = 2, k = ν/2), a special otatio for this distributio ca be writte as: 2 Y ~ (8) Usig equatio 8, the Gamma (4, 0.5) ad the Chi-Square (1) distributios are equivalet. This study previously showed that the power for the Gamma distributio depeds oly o the shape parameter (k). So, the powers of the Gamma (4, 0.5) ad Chi-Square (1) alterative distributios must be equivalet. 62
MODIFIED LILLIEFORS TEST Figure 5. Power for Alterative Distributio: Gamma (0.55, 0.412) Sixth, cosider the relatioship betwee the alterative distributios, Gamma (4, 0.5), Chi-Square (1) ad the simulated power. Figure 6 summarizes the power aalysis for the Gamma (4, 0.5) ad Chi-Square (1) alterative distributios. For a fixed sample size ad a sigificace level, powers for these two alterative distributios were exactly the same. As i the previous alterative distributios, the PML-test outperformed all other four expoetiality tests across all sample sizes ad sigificace levels. The LF-test was i the last place o the power curve. The powers for the VS-test ad S-test were idetical for a fixed sample size ad a sigificace level. The D-test demostrated the superior power tha the VS-test ad the S-test for small sample sizes across all sigificace levels but this relatioship was reversed for medium to large sample sizes. For sample sizes at least 200, the powers for all five tests were equivalets which were close to 1. As compare with the previous alterative distributio (Gamma (0.55, 0.412)), powers for these two alterative distributios decrease across all sample sizes ad 63
ADHIKARI & SCHAFFER sigificace levels. It is relevat to ote that the shape parameter (k) was chaged from 0.412 to 0.50 which caused the decrease i power. It appears that as the value of the shape parameter (k) approaches that of the ull distributio (k = 1), the simulated powers decreases. Figure 6. Power for Alterative Distributio: Chi-Square (1) Seveth, cosider the relatioship betwee the alterative distributio Gamma (4, 0.75) ad the simulated power. Figure 7 summarizes the power aalysis for the Gamma (4, 0.75) alterative distributio. The PML-test outperformed all other four expoetiality tests across all sample sizes ad sigificace levels. The LF-test was i the last place o the power curve. The powers for the VS-test ad S-test were idetical for a fixed sample size ad sigificace level. The D-test demostrated the superior power tha the VS-test ad the S-test for small sample sizes across all sigificace levels but this relatioship was reversed for medium to large sample sizes. For sample size at 64
MODIFIED LILLIEFORS TEST least 1,000, the powers of all five tests were equivalets which were close to 1. As compare with the previous alterative distributio (Gamma (4, 0.5)), powers of this alterative distributios were sigificatly decrease across all sample sizes ad sigificace levels. It is relevat to ote that the shape parameter (k) was chaged from 0.5 to 0.75 which caused the decrease i power. Amog five Gamma alterative distributios discussed i this chapter, this alterative distributio exhibited the lowest power across all sample sizes ad sigificace levels. Figure 7. Power for Alterative Distributio: Gamma (4, 0.75) Before cosiderig the power for ext two alterative distributios, it is idispesable to revisit that the Chi-Square distributio is a special case of Gamma distributio (equatio 8). This study previously showed that the power for the Gamma distributio depeds oly o the shape parameter (k). Null distributios were geerated usig the expoetial (θ = 5) for power simulatio. 65
ADHIKARI & SCHAFFER Usig 8, Gamma (4, 1) ad Chi-Square (2) alterative distributios must produce similar powers for the set of parameters ( ad α). I other words Gamma (4, 1) ad Chi-Square (2) alterative distributios ca be used for the simulatio of sigificace levels. Eighth, cosider the relatioship betwee the alterative distributios, Gamma (4, 1), Chi-Square (2) ad the simulated power. Figure 8 summarizes the power aalysis for the Gamma (4, 1) ad Chi-Square (2) alterative distributios. The powers of all five expoetiality tests across all sample sizes ad sigificace levels were too low which were pretty close to their sigificace levels. It is due to the fact that the power of these five expoetiality tests depeds oly o the shape parameter (k). It appears that the scale parameter (θ) does ot have ay role o the simulated powers. Figure 8. Power for Alterative Distributio: Chi-Square (2) 66
MODIFIED LILLIEFORS TEST Nith, cosider the relatioship betwee the alterative distributio t (5) ad the simulated power. Figure 9 summarizes the power aalysis for the t (5) alterative distributio. This is the oly oe symmetric distributio used i the power aalyses. All five expoetiality tests quickly detected o-expoetiality. For sample sizes at least 15, the powers for all five tests were almost idetical which were close to 1. The rage of the powers was foud to be very arrow across all sample sizes for a fixed sigificace level. Figure 9. Power for Alterative Distributio: t (5) Fially, cosider the relatioship betwee the alterative distributio log-ormal (0, 1) ad the simulated power. Figure 10 summarizes the power aalysis for the log-ormal (0, 1) alterative distributio. For small sample sizes, all five expoetiality tests demostrated similar power across all sigificace levels. For medium to large sample sizes, the PML-test ad S-test were i the top, the VS-test was i the middle ad the D-test ad LF-test were i the bottom of the power curve. It appears that the PML-test exhibited equal or better power amog 67
ADHIKARI & SCHAFFER five expoetiality tests i the set of parameters cosidered i this study. For sample sizes at least 1000, the powers for all five tests were almost idetical which were close to 1. Figure 10. Power for Alterative Distributio: log-ormal (0, 1) Coclusio This study claimed that the PML-test demostrated cosistetly superior power over the S-test, LF-test, VS-test, ad D-test for most of the alterative distributios preseted i this study. The D-test, VS-test, ad S-test exhibited similar power for a fixed sample size ad a sigificace level. The LF-test cosistetly showed the lowest power amog five expoetiality tests. So, practically speakig the proposed test ca hope to replace the other four expoetiality tests discussed throughout this study while maitaiig a very simple form for computatio ad easy to uderstad for those people who have limited kowledge of statistics. 68
MODIFIED LILLIEFORS TEST Refereces Acosta, P., & Rojas, G. M. (2009). A simple IM test for expoetial distributios. Applied Ecoomics Letters, 16(2), 109-112. doi:10.1080/13504850601018221 Bai, L. & Egelhardt, M. (1992). Itroductio to Probability ad Mathematical Statistics (2d ed.). MA: PWS-KENT Publishig Compay. Fikelstei, J. M. & Schafer, R. E. (1971). Improved goodess-of-fit tests. Biometrika, 58(3), 641-645. doi:10.1093/biomet/58.3.641 Kuehl, R. (2000). Desig of Experimets: Statistical Priciples of Research Desig ad Aalysis (2d ed.). CA: Duxbury. Lilliefors, H. W. (1969). O the Kolmogorov-Smirov test for the expoetial distributio with mea ukow. Joural of the America Statistical Associatio, 64(325), 387-389. doi:10.1080/01621459.1969.10500983 Motgomery, D. C., Peck, E. A. & Viig, G. G. (2006). Itroductio to Liear Regressio Aalysis (4th ed.). NJ: Joh Wiley ad Sos, Ic. Pugh, E. L. (1963). The best estimate of reliability i the expoetial case. Operatios Research, 11(1), 57-61.doi:10.1287/opre.11.1.57 Schafer, R. E., Fikelstei, J. M. & Collis, J. (1972). O a goodess-of-fit test for the expoetial distributio with mea ukow. Biometrika, 59(1), 222-224. doi:10.1093/biomet/59.1.222 Soest, J. v. (1969). Some goodess of fit tests for the expoetial distributio. Statistica Neerladica, 23(1), 41-51. doi:10.1111/j.1467-9574.1969.tb00072.x Sriivasa, R. (1970). A approach to testig the goodess of fit of icompletely specified distributios. Biometrika, 57(3), 605-611. doi:10.1093/biomet/57.3.605 69