Software Implementation of the Epps-Pulley Criterion in Matlab Modeling Environment
Authors: Tipikin A. A. , Prusakov A. A. , Timoshenko N. A. 
Published: May 2024

Purpose. Modeling systems and programming platforms provide ample opportunities for the use of statistical tools in research activities. Since the normal distribution is one of the most common distribution laws, the criterion for checking the sample for normality is in high demand among statistical assessment tools, among which the Epps-Pulley test has the status as one of the most powerful tests to check the deviation of the distribution from the normal one. There are a number of implementations of this test in the R and Python languages. However, this test is not implemented in one of the most popular Matlab modeling software. Thus, the purpose of this study is to develop a software implementation of the Epps-Pulley criterion in the Matlab environment and verify the correctness of the performed calculations.

Materials and Methods. We implemented the calculation of Epps-Pulley statistics by two methods – classical, using cycles, and matrix-vector, using linear algebra operations. The classical method requires calculating the intermediate values necessary to obtain the criterion statistics using two independent cycles, the second cycle being a double one, in which one cycle is nested into the other. The matrix-vector method requires fewer code by performing calculations using linear algebra operations on matrices and vectors. We obtained critical statistical values for the sample size from 8 to 1000 observations with two-dimensional linear interpolation of tabular values. We used an approximation by a beta function of the third kind for a sample of over 1000 elements.

Results. An assessment of the computational efficiency of the methods showed that the cyclic approach is about three times higher than the matrix-vector approach in terms of consumed time, which is presumably due to the processing of insignificant elements in triangular matrices when performing component-by-component operations. The correctness of the software implementation of the Epps-Pulley criterion was tested on several examples, which confirmed the compliance of the calculated values of the criterion statistics, as well as the critical values of statistics, with known data. We carried out a criterion statistical evaluation based on the empirical values of the error of the first kind. We obtained the error values correspondence to the specified significance levels. We performed comparative estimates of the Epps-Pulley test with the Anders-Darling and Shapiro-Wilk tests in terms of the criterion empirical power and tabulated the evaluation results. We published the software implementation of the Epps-Pulley test on the MATLAB Central Internet resource and for free use.

Conclusion. We developed software implementation of the Epps-Pulley criterion as a new research tool that was previously unavailable in the Matlab modeling environment. We used the time spent on calculations to make a reasonable choice of the calculation algorithm for the criterion statistics. We confirmed correctness of the calculation algorithms by a set of selective checks and statistical estimates that showed the compliance with well-known theoretical provisions.