1 Introduction

Let \(X,X_1, X_2 \ldots \) be a sequence of independent and identically distributed (i.i.d) random variables with unkown distribution. To test the hypothesis \(H_0\) that the distribution of X is some unspecified normal distribution, there is a myriad of testing procedures, among which the tests of Shapiro–Wilk (SW) and Anderson–Darling (AD) deserve special mention, see, e.g., the monographs of D’Agostino and Stephens (1996) and Thode (2002). There is, however, a further test which was proposed by Epps and Pulley (1983). This test, which is based on the empirical characteristic function, comes as a serious competitor to SW and AD, as shown in simulation studies (see, e.g., Baringhaus et al. 1989; Betsch and Ebner 2020). Baringhaus and Henze (1988) extended the approach of Epps and Pulley to test for normality in any dimension. By now, the BHEP-test (an acronym coined by Csörgö (1989) after earlier developers of the idea) is known to be an affine-invariant and universally consistent test of normality in any dimension, and limit distributions of the test statistic have been obtained under \(H_0\) as well as under fixed and contiguous alternatives to normality (see the review article Ebner and Henze 2020). In this paper, we revisit the limit null distribution of the Epps–Pulley test statistic in the univariate case. The test statistic involves a positive tuning parameter \(\beta \), and, based on \(X_1,\ldots ,X_n\), is denoted by \(T_{n,\beta }\). It is given by

$$\begin{aligned} T_{n,\beta } = n \int _{-\infty }^\infty \Big | \psi _n(t) - \mathrm{e}^{-t^2/2}\Big |^{2} \, \varphi _\beta (t)\, {\mathrm{d}}t, \end{aligned}$$

where \(\psi _n(t) = n^{-1}\sum _{j=1}^n \exp \big (\mathrm{i}tY_{n,j}\big )\) is the empirical characteristic function of the scaled residuals \(Y_{n,1}, \ldots , Y_{n,n}\). Here, \(Y_{n,j} = S_n^{-1} (X_j - {\overline{X}}_n)\), \(j=1,\ldots ,n\), and \({\overline{X}}_n = n^{-1} \sum _{j=1}^n X_j\), \(S_n^2 = n^{-1}\sum _{j=1}^n (X_j- {\overline{X}}_n)^2\) denote the sample mean and the sample variance of \(X_1,\ldots ,X_n\), respectively. Moreover,

$$\begin{aligned} \varphi _\beta (t) = \frac{1}{\beta \sqrt{2\pi }} \exp \Big ( - \frac{t^2}{2\beta ^{2} } \Big ), \quad t \in {\mathbb {R}}, \end{aligned}$$

is the density of the centred normal distribution with variance \(\beta ^2\). A closed-form expression of \(T_{n,\beta }\) that is amenable to computational purposes is

$$\begin{aligned} T_{n,\beta }&= \frac{1}{n} \sum _{j,k=1}^n \exp \! \bigg ( \! \! - \frac{\beta ^2}{2}\big (Y_{n,j}\! - \! Y_{n,k}\big )^{2} \! \bigg ) \!\\&\quad - \frac{2}{\sqrt{1 \! + \! \beta ^{2}}} \sum _{j=1}^n \exp \! \bigg ( \! \! - \frac{\beta ^{2} Y_{n,j}^{2} }{2(1\! + \! \beta ^{2})} \! \bigg ) + \frac{n}{\sqrt{1\! + \! 2\beta ^2}}. \end{aligned}$$

The limit null distribution of \(T_{n,\beta }\), as \(n \rightarrow \infty \), is that of

$$\begin{aligned} T_\infty {:}{=} \int _{-\infty }^\infty Z^2(t) \, \varphi _\beta (t) \, \text {d}t. \end{aligned}$$

Here, \(Z(\cdot )\) is a centred Gaussian element of the Hilbert space \(\text {L}^2 = \text {L}^2({\mathbb {R}},\mathcal{B},\varphi _\beta (t)\text {d}t)\) (of equivalence classes) of Borel-measurable real-valued functions that are square-integrable with respect to \(\varphi _\beta (t)\text {d}t\), and the covariance function of \(Z(\cdot )\) is given by

$$\begin{aligned} K(s,t)=\exp \left( -\frac{(s-t)^{2}}{2}\right) -\left( 1+st+\frac{(st)^{2}}{2}\right) \exp \left( -\frac{s^{2}}{2}-\frac{t^{2}}{2}\right) ,\quad s,t\in {\mathbb {R}}\nonumber \\ \end{aligned}$$
(1.1)

(see Henze and Wagner 1997). The kernel K is the starting point of this paper. Writing \(\sim \) for equality in distribution, it is well-known that

$$\begin{aligned} T_\infty \sim \sum _{j=0}^\infty \lambda _{j} N_{j}^{2}, \end{aligned}$$

where \(\lambda _0, \lambda _1, \ldots \) is the sequence of nonzero eigenvalues associated with the integral operator \({\mathbb {A}}: \text {L}^2 \rightarrow \text {L}^2\) defined by

$$\begin{aligned} ({\mathbb {A}}f)(s) {:}{=} \int _{-\infty }^\infty K(s,t) f(t) \varphi _\beta (t) \, \text {d} t, \end{aligned}$$

and \(N_0, N_1, \ldots \) is a sequence of i.i.d. standard normal random variables. In the next section, we obtain the eigenvalues of \({\mathbb {A}}\) by numerical methods. In Sect. 3 the sum of powers of the largest eigenvalues is compared to normalized cumulants. The difference should be close to 0 if the eigenvalues have been computed correctly. Section 4 demonstrates that the results can be applied to fit a Pearson system of distributions, and that the fit is reasonable to approximate critical values of the Epps-Pulley test. The article ends by some concluding remarks. Finally, Appendix A extends the results to the cases in which no parameters, only the mean and only the variance, are estimated.

2 Solution of a Fredholm integral equation

To obtain the values \(\lambda _0,\lambda _1, \lambda _2, \ldots \), that determine the distribution of \(T_\infty \), one has to solve the integral equation

$$\begin{aligned} \int _{-\infty }^\infty K(s,t)f(t) \varphi _\beta (t)\,\text {d}t=\lambda f(s),\quad s\in {\mathbb {R}}. \end{aligned}$$

In general, this task is considered a hard problem, and solutions for kernels associated with testing problems involving composite hypotheses are very sparse, see Stephens (1976, 1977) for the classical tests of normality and exponentiality that are based on the empirical distribution function. In what follows, we use a result of Zhu et al. (1997) to obtain the eigenvalues of \({\mathbb {A}}\) by a stable numerical method. To this end, let

$$\begin{aligned} K_{0}(s,t)=\exp \left( -\frac{(s-t)^{2}}{2}\right) ,\quad s,t\in {\mathbb {R}}, \end{aligned}$$

and

$$\begin{aligned} \phi _1(s)= & {} \frac{s^2}{\sqrt{2}}\exp \left( -\frac{s^2}{2}\right) ,\\ \phi _2(s)= & {} s\exp \left( -\frac{s^2}{2}\right) ,\\ \phi _3(s)= & {} \exp \left( -\frac{s^2}{2}\right) ,\quad s\in {\mathbb {R}}. \end{aligned}$$

Notice that

$$\begin{aligned} K(s,t)=K_{0}(s,t)-\sum _{j=1}^{3}\phi _{j}(s)\phi _{j}(t),\quad s,t\in {\mathbb {R}}. \end{aligned}$$
(2.1)

The first step is to solve the eigenvalue problem for the covariance kernel \(K_0\). The associated eigenvalue problem, which leads to the kernel \(K_0\), was solved in the context of machine learning in Chapter 4 of Zhu et al. (1997). Here, we use the formulation given in Rasmussen and Williams (2008), Sect. 4.3.1. The eigenvalues of \(K_0\) are given by

$$\begin{aligned} \lambda _{k}^{(0)}=\sqrt{\frac{2}{\sqrt{1+4\beta ^{2}}+2\beta ^{2}+1}}\left( \frac{2\beta ^{2}}{\sqrt{\sqrt{1+4\beta ^{2}}+2\beta ^{2}+1}}\right) ^{k},\quad k=0,1,2,\ldots , \end{aligned}$$

with corresponding normalized eigenfunctions

$$\begin{aligned}&\psi _{k}(x)= h_{k} \exp \left( -\left( \frac{\sqrt{\beta ^{-2}+4}}{4\beta }-(4\beta )^{-1}\right) x^{2}\right) H_{k}\left( \left( \beta ^{-4}+4\beta ^{-2}\right) ^{1/4}x/\sqrt{2}\right) ,\\&\quad k=0,1,2,\ldots \end{aligned}$$

(see also the errata to Rasmussen and Williams (2008) on the books homepage). Here, \(h_k^{-2} = (4\beta ^2+1)^{-1/4} 2^k k!\), and \(H_k(x)=(-1)^k\exp (x^2)\frac{\text{ d}^k}{\text{ d }x^k}\exp (-x^2)\) is the kth order Hermite polynomial.

Remark 2.1

Note that for the special case \(\beta =1\) the eigenvalues \(\lambda _k^{(0)}\) coincides with the formula given in (6) of Baringhaus (1996). In that article, the limit distribution of a modified statistic \(T_{n,\beta }^{(0)}\), which originates from \(T_{n,\beta }\) by replacing \(\psi _n(t)\) with \(\psi _n^{(0)}(t) = n^{-1}\sum _{j=1}^n \exp \big (\mathrm{i}tX_j\big )\), i.e., the problem is to test for standard normality and thus no estimation of parameters is involved, is analyzed, cf. Appendix A. The corresponding covariance kernel is \(K_1(s,t)= K_0(s,t)-\phi _3(s)\phi _3(t)\), \(s,t\in {\mathbb {R}}\), and explicit formulae for the eigenvalues and eigenfunctions are given, see Baringhaus (1996), p. 3878.

To solve the eigenvalue problem of \({\mathbb {A}}\) figuring in (1.1), we adapt the methodology in Stephens (1976). Define

$$\begin{aligned} a_{j,k}= & {} \int _{-\infty }^\infty \psi _j(x)\phi _k(x)\varphi _\beta (x)\;\text{ d }x,\\ S_{k}(\lambda )= & {} 1+\sum _{j=0}^\infty \frac{a_{j,k}^2}{1/\lambda - \lambda _j^{(0)}},\\ S_{k,\ell }(\lambda )= & {} \sum _{j=0}^\infty \frac{a_{j,k}a_{j,\ell }}{1/\lambda -\lambda _j^{(0)}},\quad \lambda >0. \end{aligned}$$

With this notation, we can formulate our main result.

Theorem 2.2

The eigenvalues of \({\mathbb {A}}\) are the reciprocals of the solutions \(\lambda >0\) of the equation

$$\begin{aligned} D(\lambda )=d(\lambda )S_{2}(\lambda )\left( S_{1}(\lambda )S_{3}(\lambda )-S_{1,3}^{2}(\lambda )\right) =0, \end{aligned}$$
(2.2)

where \(d(\lambda )=\prod _{k=0}^\infty \left( 1/\lambda -\lambda _k^{(0)}\right) \) is the Fredholm determinant connected to the eigenvalue problem of \(K_0\). Moreover, none of the reciprocals of the eigenvalues \(\lambda _k^{(0)}\) of \(K_0\) solve equation (2.2).

Proof

Since \(a_{j,1}a_{j,2}=a_{j,2}a_{j,3}=0\) holds for all \(j=0,1,2,\ldots \), we use Theorem 2.2 of Sukhatme (1972) to see that the Fredholm determinant for the eigenvalue problem takes the form

$$\begin{aligned} D(\lambda )=d(\lambda )\det \left( \begin{array}{ccc} S_{1}(\lambda ) &{} 0 &{} S_{1,3}(\lambda ) \\ 0 &{} S_2(\lambda ) &{} 0 \\ S_{1,3}(\lambda ) &{} 0 &{} S_3(\lambda )\end{array}\right) =d(\lambda )S_2(\lambda )\left( S_{1}(\lambda )S_3(\lambda )-S_{1,3}^2(\lambda )\right) . \end{aligned}$$

Hence, the reciprocals of the roots of \(D(\lambda )\) are the eigenvalues of \({\mathbb {A}}\). By direct calculation, it follows that \(a_{j,2}=0\) if j is even, and we have \(a_{j,1}=a_{j,3}=0\) if j is odd. Consequently, none of the reciprocals of the eigenvalues \(\lambda _k^{(0)}\) is a root of \(D(\lambda )\) and thus a solution of the eigenvalue problem associated with the kernel K. \(\square \)

According to Theorem 2.2, the eigenvalues of \({\mathbb {A}}\) are the roots of \(S_2(\lambda )\) and of \(S_{1}(\lambda )S_3(\lambda )-S_{1,3}^2(\lambda )\). The reciprocals of the roots have been obtained numerically, and the largest twenty eigenvalues are displayed in Table 1 for different values of \(\beta \). Note that, since these values tend to be very small, the reciprocal approach used here leads to numerically stable procedures to find the roots of the Fredholm determinant.

Table 1 Eigenvalues of \({\mathbb {A}}\) for different tuning parameters \(\beta \), here E–j stands for \(10^{-j}\)

3 Accuracy of the numerical solutions

The accuracy of the values presented in Table 1 may be judged by a comparison with results of Henze (1990). That paper gives the first four cumulants of the distribution of \(T_\infty \) in the special case \(\beta =1\). The m-th cumulant of \(T_\infty \) is

$$\begin{aligned} \kappa _m(\beta ) = 2^{m-1} (m-1)! \sum _{j=1}^\infty \lambda _j^m = 2^{m-1} (m-1)! \int _{-\infty }^\infty K_{m}(x,x) \varphi _\beta (x) \, \text {d} x, \quad m \ge 1, \end{aligned}$$

where \(K_1(x,y) {:}{=} K(x,y)\) and

$$\begin{aligned} K_{m}(x,y) = \int _{-\infty }^\infty K_{m-1}(x,z)K(z,y) \varphi _\beta (z) \, \text {d} z \end{aligned}$$

for \(m \ge 2\) (see e.g., Chapter 5 of Shorack and Wellner (1986)). We have

$$\begin{aligned} \kappa _{1}(1)= & {} {\mathbb {E}}(T_\infty ) = \sum _{j=1}^\infty \lambda _{j} = 1 - \frac{\sqrt{3}}{2} = 0.133974596\ldots ,\\ \nonumber \kappa _{2}(1)= & {} {\mathbb {V}}(T_\infty ) = 2 \sum _{j=1}^\infty \lambda _{j}^{2} = \frac{2\sqrt{5}}{5} + \frac{5}{6} - \frac{155 \sqrt{2}}{128} = 0.015236301\ldots \end{aligned}$$
(3.1)

and thus

$$\begin{aligned} \sum _{j=1}^\infty \lambda _{j}^{2} = \frac{1}{\sqrt{5}} + \frac{5}{12} - \frac{155}{128\sqrt{2}} = 0.0076181509 \ldots \end{aligned}$$

Furthermore,

$$\begin{aligned} \kappa _{3}(1)= & {} {\mathbb {E}}(T_\infty -\kappa _{1}(1))^{3} = 8 \sum _{j=1}^\infty \lambda _j^3 = 0.00400343\ldots ,\\ \nonumber \kappa _4(1)= & {} {\mathbb {E}}(T_\infty -\kappa _1(1))^4 = 48 \sum _{j=1}^\infty \lambda _j^4 = 0.001654655\ldots \end{aligned}$$
(3.2)

and thus

$$\begin{aligned} \sum _{j=1}^\infty \lambda _{j}^{3} = 0.0005004285291\ldots \quad \text{ and }\quad \sum _{j=1}^\infty \lambda _j^4 = 0.00003447197917\ldots \end{aligned}$$

From Table 2, we see that the corresponding sums of the first 20 numerical values of the eigenvalues (as well of their squares and cubes) agree approximately with the values figuring in (3.1) and (3.2), respectively, in most cases up to five significant digits.

The results of Henze (1990) have been partially generalized in Henze and Wagner (1997), Theorem 2.3, for the first three cumulants and a fixed tuning parameter \(\beta \), and they thus lead to general formulae in the univariate case. For the sake of completeness, we restate the formulae of the first two cumulants here. For the first cumulant, we have

$$\begin{aligned} \kappa _1(\beta ) = 1-(2\beta ^{2}+1)^{-1/2}\left[ 1+\frac{\beta ^{2}}{2\beta ^{2}+1}+\frac{3\beta ^{4}}{(2\beta ^2+1)^{2}}\right] , \end{aligned}$$

and the second cumulant is

$$\begin{aligned} \kappa _{2}(\beta )= & {} \frac{2}{\sqrt{1+4\beta ^{2}}}+\frac{2}{1+2\beta ^{2}}\left[ 1+\frac{2\beta ^{4}}{(1+2\beta ^{2})^{2}}+\frac{9\beta ^{8}}{4(1+2\beta ^{2})^{4}}\right] \\&-\frac{4}{\sqrt{1+4\beta ^{2}+3\beta ^{4}}}\left[ 1+\frac{3\beta ^{4}}{2(1+4\beta ^{2}+3\beta ^{4})}+\frac{3\beta ^{8}}{2(1+4\beta ^{2}+3\beta ^{4})^{2}}\right] . \end{aligned}$$

The formula for the third cumulant is found in Henze and Wagner (1997), Theorem 2.3, for the case \(d=1\). Table 2 exhibits the normalized cumulants, together with the corresponding sums of the first 20 eigenvalues taken from Table 1. We stress that by now no formula for the fourth cumulant is known in the literature for general tuning parameter \(\beta \).

Table 2 Sums over different powers of the first 20 eigenvalues and corresponding theoretical cumulants for different values of \(\beta \). The entry denoted by \(*\) could not be computed due to numerical instabilities

4 Pearson system fit for approximation of critical values

The first four cumulants can directly be used in packages that implement the Pearson system of distributions (see Sect. 4.1 of Johnson et al. (1994)). In the statistical computing language R (see R Core Team 2021), we use the package PearsonDS (see Becker and Klößner 2017) to approximate critical values of the Epps–Pulley test statistic. The Epps–Pulley test is implemented in the R-Package mnt (see Butsch and Ebner 2020) by using the function BHEP. Table 3 shows simulated empirical critical values of the Epps–Pulley statistic for sample sizes \(n\in \{10,25,50,100,200\}\) and levels of significance \(\alpha \in \{0.1,0.05,0.01\}\). For each combination of n and \(\beta \), the entries corresponding to different values of \(\alpha \) are based on \(10^6\) replications under the null hypothesis. Each entry in a row named ’\(\infty \)’ is the calculated (\(1-\alpha \))-quantile of the fitted Pearson system using the cumulants given in Table 2. We conclude that, for larger sample sizes, the simulated critical values are close to the approximated counterparts of the Pearson system. Moreover, we have corroborated the results of Henze (1990) for the special case \(\beta =1\), and we have extended these results for general \(\beta >0\).

Table 3 Empirical critical values (simulated with \(10^6\) replications) and approximated critical values by the Pearson system (denoted by ’\(\infty \)’) for different levels of significance \(\alpha \)

5 Conclusions

We have solved the eigenvalue problem of the integral operator associated with the covariance kernel K of the limiting Gaussian process that occurs in the limit null distribution of the Epps–Pulley test statistic. In view of a comparison with the first three known cumulants from the literature, Table 2 shows that the eigenvalues obtained by numerical methods are very close to the corresponding theoretical values. In Sect. 5 of Ebner and Henze (2021), the authors present a Monte Carlo based approximation method to find stochastic approximations of the eigenvalues. A comparison of Table 1 and Table 1 of Ebner and Henze (2021) reveals that there are some significant differences for some values of \(\beta \), which can be explained by the approximation of the eigenvalues by a Monte Carlo method in Ebner and Henze (2021). This observation is of particular interest, since the largest eigenvalue is used in the derivations of approximate Bahadur efficiencies. Recent results concerning this topic for the Epps–Pulley test are presented in Ebner and Henze (2021) and, for other normality tests based on the empirical distribution function, in Milošević et al. (2021).

We point out the difficulties encountered if one tries to generalize our findings to the multivariate case, i.e. to obtain the eigenvalues associated with the limit null distribution of the BHEP test of multivariate normality, see (Baringhaus and Henze 1988; Henze and Wagner 1997; Henze and Zirkler 1990). The d-variate analog to the covariance kernel K in (1.1) is given in Theorem 2.1 of Henze and Wagner (1997), namely, writing \(\Vert \cdot \Vert \) for the Euclidean norm and \(^\top \) for the transpose of vectors, we have

$$\begin{aligned}&K(s,t)=\exp \left( -\frac{\Vert s-t\Vert ^{2}}{2}\right) -\left\{ 1+s^\top t+\frac{(s^\top t)^{2}}{2}\right\} \exp \left( -\frac{\Vert s\Vert ^{2}+\Vert t\Vert ^{2}}{2}\right) ,\nonumber \\&\quad s,t\in {\mathbb {R}}^{d}. \end{aligned}$$
(5.1)

The first step is to derive explicit expressions for eigenvalues w.r.t. the kernel

$$\begin{aligned} K_{0}(s,t)=\exp \left( -\Vert s-t\Vert ^{2}/2\right) , \quad s,t\in {\mathbb {R}}^{d} \end{aligned}$$

(for a starting point, see Baringhaus 1996). The second step is to find the corresponding multivariate representation of (2.1), which seems to be non-standard, since the quadratic summand \((s^\top t)^2\) in (5.1) does not factorize easily. Both problems have to be solved in order to successfully apply the method presented in Sect. 2.

Finally, it is an interesting question whether the results may be extended to other recent tests of normality associated with the empirical characteristic function, such as Ebner (2020), or to other empirical integral transformations, such as the moment generating function, see Henze and Koch (2020), or for multivariate versions see Ebner et al. (2021) as well as Henze and Visagie (2020). In each of these papers an explicit formula of the covariance kernel under the null hypothesis is derived, but it is again unclear how to find explicit expressions for the eigenvalues of the reduced kernel formula. Hence we leave these problems open for future work.