1 Introduction

Consider the classical problem of testing the univariate symmetry with respect to zero. Let F be the distribution function (d.f.) of an i.i.d. sample \(X_1,\ldots ,X_n\), and suppose it is continuous. We are interested in testing the hypothesis

$$\begin{aligned} H_0: 1 - F(x) - F(-x) = 0, \quad \, \forall x \in {\mathbb {R}}, \end{aligned}$$
(1)

against the alternative \(H_1\) under which the equality in (1) is violated at least in one point.

Well-known and simple test statistics for this problem are the sign statistic and the Wilcoxon signed-rank statistic. Their properties are thoroughly explored and described in classical literature, as are some more sophisticated signed-rank statistics (see, e.g., [5, 11, 16, 27]).

Another class contains symmetry tests based on the empirical d.f.’s. Many examples, including the Kolmogorov–Smirnov- and \(\omega ^2\)-type tests, are described in [20]. This monograph offers an extensive review of various symmetry tests, together with the calculation of their efficiencies.

In recent times, introducing tests based on characterizations became a popular direction in goodness-of-fit testing. Such tests are attractive because they employ some intrinsic properties of the probability laws related to the characterization, and therefore they can exhibit high efficiency and power.

The first to introduce such symmetry tests were Baringhaus and Henze in [4]. They proposed suitable U-empirical Kolmogorov–Smirnov- and \(\omega ^2\)-type tests of symmetry based on their characterization. The calculation of Bahadur efficiencies, for the Kolmogorov-type test, was then performed in [21], see also [22]. An integral-type symmetry test, based on the same characterization, was proposed and analyzed by Litvinova [18].

Recently, Nikitin and Ahsanullah [23] built new tests of symmetry with respect to zero, based on the characterization by Ahsanullah [1]. This characterization was generalized and used for construction of similar symmetry tests by Milošević and Obradović [19]. The quality of all these tests was examined using the Bahadur efficiency, which is applicable to the case of non-normal limiting distributions.

Here we consider the characterization obtained independently by Wesolowski [28, Corollary 1], and Donati-Martin, Song and Yor [6, Lemma 1]. They proved the following proposition:

Let X and Y be i.i.d. random variables such that \((X-Y)^2\) and \((X+Y)^2\) are equidistributed. Then X and Y are symmetric with respect to zero.

Our aim is to build the integral- and the Kolmogorov-type U-empirical tests of symmetry based on this characterization; to explore their asymptotic properties; and to assess their quality via the approximate Bahadur efficiency and the simulated powers.

Our test statistics are based on U-statistics. This large class of statistics, which was first defined in the middle of last century in the problems of the unbiased estimation [8], and its theory established in the seminal paper of Hoeffding [10], are very important since numerous well-known statistics belong to this class. The most complete treatment of the theory can be found in [13, 15]. In our paper, unlike in many others in this domain of research, the emerging U-statistics and the families of U-statistics turn out to be degenerate. This feature highly complicates the problem and makes it new and attractive.

The limiting distribution of the underlying U-statistics is the second-order Gaussian chaos (see [14, Chapter 3]). Their tail behavior depends on the maximal eigenvalue of the corresponding integral operator. In the case of the uniform distribution, we obtain it theoretically. When studying the U-empirical Kolmogorov-type test, we are forced to work with the family of degenerate U-statistics depending on a real parameter t. Here a challenging problem lies in finding the supremum of the first eigenvalues (also depending on t) of the corresponding family of integral operators. This is mathematically the most interesting and original point. In the case of the uniform distribution, we solve it using a suitable decomposition of the family of operators to some simpler “triangular” operators (see “Appendix”). In the case of other distributions, we approximate the corresponding maximal eigenvalue using the appropriate sequences of discrete linear operators. The application of these mathematical means, for the first time in this field, is the most innovative and important feature of the paper.

The rest of the paper is organized as follows. In Sect. 2, we propose the test statistics and study their limiting distributions. Section 3 is devoted to the calculation of the approximate Bahadur efficiencies of our tests. In Sect. 4, we assess the powers of our tests through a simulation study. For convenience, some proofs are given in “Appendix”.

2 Test Statistics

Let \(F_n^{*}\) be the empirical d.f. of \(|X_1|,\ldots ,|X_n|\), and let \(F^{*}(t) = P\{ |X_1| < t \}\) be its theoretical counterpart. In view of the characterization, we consider the following two test statistics:

$$\begin{aligned} {\bar{J}}_n&=\int _{-\infty }^{\infty }(G_n(t)-H_n(t))\text {d}F_n^{*}(t), \end{aligned}$$
(2)
$$\begin{aligned} K_n&=\sup _{t} |G_n(t)-H_n(t)| \end{aligned}$$
(3)

where

$$\begin{aligned} G_n(t)&=\left( {\begin{array}{c}n\\ 2\end{array}}\right) ^{-1}\sum _{i<j}\mathrm{I}\{|X_i-X_j|<t\},\\ H_n(t)&=\left( {\begin{array}{c}n\\ 2\end{array}}\right) ^{-1}\sum _{i<j}\mathrm{I}\{|X_i+X_j|<t\} \end{aligned}$$

are U-empirical d.f.’s. After the integration, we obtain

$$\begin{aligned} {\bar{J}}_n=n^{-1}\left( {\begin{array}{c}n\\ 2\end{array}}\right) ^{-1}\sum _{i<j}\sum _{k} \mathrm{I}\{|X_i-X_j|<|X_k|\}-\mathrm{I}\{|X_i+X_j|<|X_k|\}. \end{aligned}$$

The statistic \({\bar{J}}_n\) is a hybrid of a U- and a V-statistics. Instead of it, we propose the corresponding U-statistic

$$\begin{aligned} J_n = \left( {\begin{array}{c}n\\ 3\end{array}}\right) ^{-1}\sum _{1\le i<j <k \le n} \Phi (X_i,X_j,X_k), \end{aligned}$$

with symmetrized kernel

$$\begin{aligned} \begin{aligned} \Phi (X_1,X_2,X_3)=&\,\frac{1}{3!}\sum _{\pi \in \Pi (3)}\mathrm{I}\{|X_{\pi (1)}-X_{\pi (2)}|< |X_{\pi (3)}|\}\\&-\mathrm{I}\{|X_{\pi (1)}+X_{\pi (2)}|<|X_{\pi (3)}|\}, \end{aligned} \end{aligned}$$
(4)

where \(\Pi (m)\) is the set of all permutations of the set \(\{1,2,\ldots ,m\}\).

This statistic is more natural, and, moreover, an unbiased estimator of

$$\begin{aligned} \int _{-\infty }^{\infty }\big (P\{|X-Y|<t\}-P\{|X+Y|<t\}\big ) \text {d}F^{*}(t). \end{aligned}$$

Magnified by the factor n, \(J_n\) and \({\bar{J}}_n\) have somewhat different limiting distributions. However, in terms of the logarithmic tail behavior they are equivalent, and both statistics lead to consistent tests for our hypothesis.

We consider large values of \(|J_n|\) and \(K_n\) to be significant.

2.1 Statistic \(J_n\)

The statistic \(J_n\) is a U-statistic with symmetric kernel \(\Phi \) given in (4). Its first projection on \(X_1\) under \(H_0\) is equal to zero, while the second projection on \((X_1,X_2)\), at the point (st), is

$$\begin{aligned} \varphi _F(s,t)=2/3\Big (F\big (|s+t|\big )-F\big (|s-t|\big )\Big ), \end{aligned}$$
(5)

where F is the d.f. of a null symmetric distribution.

Theorem 2.1

Under \(H_0\), the following convergence in distribution holds

$$\begin{aligned} nJ_n\overset{d}{\rightarrow }\left( {\begin{array}{c}3\\ 2\end{array}}\right) \sum _{i=1}^{\infty }\nu _{i}(F)\Big (W^2_i-1\Big ), \end{aligned}$$
(6)

where \(\{W_i\}\) is the sequence of i.i.d. standard normal random variables, and \(\{\nu _i(F)\}\) is the non-increasing sequence of eigenvalues of the integral operator \({\mathcal {J}}_F\) with kernel \(\varphi _F\).

Proof

Since the kernel \(\Phi \) is bounded and degenerates, the result follows from the theorem for the asymptotic distribution of U-statistics with degenerate kernels [13, Corollary 4.4.2]. \(\square \)

Since our test statistic is not distribution free, the eigenvalues need to be derived for each null distribution. In the following theorem we consider the case of the uniform distribution.

Theorem 2.2

Let F be the d.f. of the uniform \(U[-\vartheta ,\vartheta ]\) distribution. Then the sequence of eigenvalues \({\nu _i}\) from (6) is the solution of the following equation

$$\begin{aligned} \frac{\tan \big (\frac{1}{2\sqrt{\nu }}\big )}{6\sqrt{\nu }}-\frac{\cot \big (\frac{1}{2\sqrt{3\nu }}\big )}{2\sqrt{3\nu }}=0. \end{aligned}$$
(7)

Proof

It is easy to see that our statistic is scale free. Therefore, we may suppose that F is the d.f. of the uniform \(U[-1,1]\) distribution.

From (5), it is obvious that the function \(\varphi \) is odd, as a function of s as well as a function of t. Hence, it suffices to present the kernel for \(s>0\) and \(t>0\).

$$\begin{aligned} \varphi (s,t)=\left\{ \begin{array}{ll} -\frac{2}{3}s, &{}\quad 0<s<t<1,s+t<1; \\ \frac{1}{3}(1+s-t), &{}\quad 0<s<t<1,s+t>1; \\ \frac{2}{3}t, &{} \quad 0<t<s<1,s+t<1; \\ \frac{1}{3}(1-s+t), &{}\quad 0<t<s<1,s+t>1. \\ \end{array} \right. \end{aligned}$$

By definition, the eigenvalues and their eigenfunctions e satisfy

$$\begin{aligned} \nu e(s)={\mathcal {J}}[e(t)]=\int _{-1}^{1}\frac{1}{2}e(t)\varphi (s,t)dt. \end{aligned}$$
(8)

Since the kernel is an odd function, the eigenfunctions must be odd, too. Therefore, they can be represented using their Fourier expansion

$$\begin{aligned} e(t)=\sum _{k=1}^{\infty }a_k u_k(t), \end{aligned}$$
(9)

where \(u_k(s)=\sin k\pi s\).

Applying the operator \({\mathcal {J}}\) to the function e given in (9), we have that (8) is equivalent to

$$\begin{aligned} {\mathcal {J}}\Big [\sum _{k=1}^{\infty }a_ku_k(t)\Big ]=\nu \sum _{l=1}^{\infty }u_l(s)a_l. \end{aligned}$$
(10)

The left-hand side is a function from \(L^2[-1,1]\), and its Fourier expansion is

$$\begin{aligned} {\mathcal {J}}\Big [\sum _{k=1}^{\infty }a_ku_k(t)\Big ]=\sum _{l=1}^{\infty }b_lu_l(s), \end{aligned}$$
(11)

where \(b_l=\sum _{k=1}^{\infty }a_k\langle {\mathcal {J}}[u_k(t)],u_{l}(t)\rangle /||u_{l}(t)||=2\sum _{k=1}^{\infty }\langle {\mathcal {J}}[u_k(t)],u_{l}(t)\rangle \), and \(\langle \cdot ,\cdot \rangle \) is the scalar product. After some calculations, we get

$$\begin{aligned} \langle {\mathcal {J}}[u_k],u_l\rangle =\left\{ \begin{array}{l@{\quad }l} \frac{(-1)^{k+l}}{3kl\pi ^2}, &{} k\ne l; \\ \frac{2}{3k^2\pi ^2}-\frac{(-1)^{k}}{6k^2\pi ^2}, &{} k=l. \end{array} \right. \end{aligned}$$
(12)

From (10) and (11), we obtain the system

$$\begin{aligned} 2\sum _{k=1}^{\infty }a_k\langle {\mathcal {J}}[u_k],u_l\rangle =\nu a_l, \end{aligned}$$
(13)

and substituting (12) in (13) we get

$$\begin{aligned} \nu a_l=2\sum _{k=1}^{\infty }a_k\frac{(-1)^{k+l}}{3\pi ^2kl}+\Big (\frac{2}{3\pi ^2l^2}-\frac{(-1)^l}{3l^2\pi ^2}\Big )a_l=\frac{2(-1)^l}{3\pi ^2l}C+\frac{2-(-1)^l}{3l^2\pi ^2}a_l, \end{aligned}$$
(14)

where

$$\begin{aligned} C=\sum _{k=1}^{\infty }\frac{(-1)^k}{k}a_k. \end{aligned}$$

Transforming (14), we obtain

$$\begin{aligned} \frac{(-1)^l}{l}a_l=\frac{2}{3\pi ^2l^2\nu -2+(-1)^l}C. \end{aligned}$$
(15)

Summing both sides of (15) for \(l=1,2\ldots \), we obtain

$$\begin{aligned} C=C\sum _{l=1}^{\infty }\frac{2}{3\pi ^2l^2\nu -2+(-1)^l}=C\Big (\frac{\tan \big (\frac{1}{2\sqrt{\nu }}\big )}{6\sqrt{\nu }}-\frac{\cot \big (\frac{1}{2\sqrt{3\nu }}\big )}{2\sqrt{3\nu }}+1\Big ), \end{aligned}$$

from where follows (7). \(\square \)

2.2 Statistic \(K_n\)

For a fixed \(t>0\), the expression \(K_n^*(t)=G_n(t)-H_n(t)\) is a U-statistic with the symmetric kernel

$$\begin{aligned} \Xi (X_1,X_2;t)=I\{|X_1-X_2|<t\}-I\{|X_1+X_2|<t\}. \end{aligned}$$

It is easy to see that the kernel is degenerated with the second projection

$$\begin{aligned} \xi (s_1,s_2;t)=I\{|s_1-s_2|<t\}-I\{|s_1+s_2|<t\}. \end{aligned}$$

For studying the asymptotics of the statistic \(K^{*}_n\), it is of interest to consider the integral operator with the same kernel.

For any function \(v\in L^2({\mathbb {R}})\), we define it as

$$\begin{aligned} {\mathcal {Q}}_F(t)[v(x)]=\int _{{\mathbb {R}}}\xi (x,y;t)v(y)\cdot \text {d}F(y). \end{aligned}$$
(16)

Let \(\{\nu _i(t;F)\}\) be the sequence of the eigenvalues of the integral operator \({\mathcal {Q}}_F(t)\). In the following theorem, we give the limiting process of \(nK^{*}(t)\). This process is called the second-order Gaussian chaos process (see, e.g., [14, Chapter 3]).

Theorem 2.3

Under \(H_0\), the limiting process of \(nK_n^{*}(t)\), \(n\rightarrow \infty \), is

$$\begin{aligned} \zeta _F(t)=\sum _{i}\langle {\mathcal {Q}}_F(t)[e_i(x)],e_i(x) \rangle (W_i^2-1) + \sum _{i\ne j}\langle {\mathcal {Q}}_F(t)[e_i(x)],e_j(x) \rangle W_iW_j, \end{aligned}$$
(17)

where \(\{e_i\}\) is an orthonormal basis of \(L^2({\mathbb {R}})\), and \(\{W_i\}\) are i.i.d. standard normal random variables.

Proof

Our class of kernels \(\xi (x,y;t)\) is Euclidean in the sense of [25], so the conditions of [26, Theorem 7] are satisfied, and (17) follows. \(\square \)

Hence, \(nK_n\) converges to the random variable \(\sup _{t\in [0,\infty ]}|\zeta _F(t)|\).

3 Approximate Bahadur Efficiency

Let \({\mathcal {G}}=\{G(x;\theta )\}\) be the family of d.f.’s with densities \(g(x;\theta )\), such that \(G(x,\theta )\) is symmetric only for \(\theta =0\). We assume that the d.f.’s from the class \({\mathcal {G}}\) satisfy the regularity conditions from [24, Assumptions WD]. Denote \(h(x)=g'_{\theta }(x;0)\).

Suppose that \(T_n=T_n(X_1,\ldots ,X_n)\) is a sequence of test statistics whose large values are significant, i.e., the null hypothesis \(H_0:\theta \in \Theta _0\) is rejected in favor of \(H_1:\theta \in \Theta _1\), whenever \(T_n>t_n\). Let the sequence of d.f.’s of the test statistic \(T_n\) converge in distribution to a non-degenerate d.f. F. Additionally, suppose that

$$\begin{aligned} \log (1-F(t))=-\frac{a_Tt^2}{2}(1+o(1)),\;\;t\rightarrow \infty , \end{aligned}$$

and the limit in probability under the alternative

$$\begin{aligned} \lim _{n\rightarrow \infty }T_n/\sqrt{n}=b_T(\theta )>0 \end{aligned}$$

exists for \(\theta \in \Theta _1\).

The approximate relative Bahadur efficiency with respect to another test statistic \(V_n=V_n(X_1,\ldots ,X_n)\) is defined as

$$\begin{aligned} e^{*}_{T,V}(\theta )=\frac{c^{*}_T (\theta )}{c^{*}_V (\theta )}, \end{aligned}$$

where

$$\begin{aligned} c^{*}_T(\theta )=a_Tb_T^2(\theta ) \end{aligned}$$
(18)

is called the Bahadur approximate slope of \(T_n\). This is a popular measure of the test efficiency suggested by Bahadur in [3].

3.1 Integral-Type Test

In the case of our integral-type test statistic, the role of \(T_n\) is played by the statistic \({\widetilde{J}}_n=\sqrt{n|J_n|}\). Its Bahadur approximate slope is obtained in the following lemma.

Lemma 3.1

For the statistic \({\widetilde{J}}_n\) and a given alternative density \(g(x;\theta )\) from \({\mathcal {G}}\), the Bahadur approximate slope satisfies the relation

$$\begin{aligned} c^{*}_{{\widetilde{J}}}(\theta ) \sim \frac{b_{J}(\theta )}{3\nu _1}, \end{aligned}$$

where \(b_J(\theta )\) is the limit in \({P_\theta }\) probability of \(J_n\), and \(\nu _1\) is the largest eigenvalue of the sequence \(\{\nu _i(F)\}\) in (6).

Proof

Using the result of Zolotarev [29], we have that the logarithmic tail behavior of \({\widetilde{J}}\) is

$$\begin{aligned} \log (1-F_{{\widetilde{J}}}(x))=-\frac{x^2}{6\nu _1}+o(x^2),\;\; x\rightarrow \infty , \end{aligned}$$

and hence, \({\widetilde{a}}_{{\widetilde{J}}}=\frac{1}{3\nu _1}\). The limit in probability of \({\widetilde{J}}_n/\sqrt{n}\) is

$$\begin{aligned} {\widetilde{b}}_{{\widetilde{J}}}(\theta )=|b_J(\theta )|^{\frac{1}{2}}. \end{aligned}$$

Inserting the expressions for \({\widetilde{a}}_{{\widetilde{J}}}\) and \({\widetilde{b}}_{{\widetilde{J}}}(\theta )\) into (18), we obtain the statement of the lemma. \(\square \)

The largest eigenvalue in the case of the uniform distribution is calculated from (7) and is equal to 0.1898. The equations for the eigenvalues of the operator

$$\begin{aligned} {\mathcal {J}}_F[v(x)]=\int _{R}\varphi _F(x,y)v(y)\cdot \text {d}F(y) \end{aligned}$$
(19)

for other distributions F are too complicated to derive. Thus, we calculate the largest eigenvalues using the following approximation. First, notice that the “symmetrized” operator

$$\begin{aligned} \begin{aligned} {\mathcal {S}}_F[v(x)]&=\sqrt{F'(x)}{\mathcal {J}}_F\Big (\frac{v(x)}{F'(x)}\Big )\\&=\int _{R}\varphi _F(x,y)v(y)\sqrt{F'(x)}\sqrt{F'(y)}\text {d}y. \end{aligned} \end{aligned}$$
(20)

has the same spectrum as the operator \({\mathcal {J}}_F\).

Consider the case where \(\inf _{x}\{x: F(x)=1\}=A<\infty \). The sequence of symmetric linear operators defined by \((2m+1)\times (2m+1)\) matrices \(M^{(m)}_F=||m_{i,j}^{(m)}||,\; |i|\le m,|j|\le m\), where

$$\begin{aligned} m_{i,j}^{(m)}=\varphi _F\Big (\frac{Ai}{m},\frac{Aj}{m}\Big ) \sqrt{\Big (F\Big (\frac{A(i+1)}{m}\Big )-F\Big (\frac{Ai}{m}\Big )\Big )} \sqrt{\Big (F\Big (\frac{A(j+1)}{m}\Big )-F\Big (\frac{Aj}{m}\Big )\Big )}, \end{aligned}$$

converges in norm to \({\mathcal {S}}_F\).

Indeed, for a function \(v\in L^2[-A,A]\), the operator \(M^{(m)}_F\), for \(x\in [Ai/m,A(i+1)/m)\), can be written as

$$\begin{aligned} M^{(m)}_F[v](x)=&\,\sum _{j=-m}^{m}\Bigg (\varphi _F\Big (\frac{Ai}{m},\frac{Aj}{m}\Big )\sqrt{\Big (F\Big (\frac{A(i+1)}{m}\Big )-F\Big (\frac{Ai}{m}\Big )\Big )} \\&\cdot \sqrt{\Big (F\Big (\frac{A(j+1)}{m}\Big )-F\Big (\frac{Aj}{m}\Big )\Big )}v\Big (\frac{Aj}{m}\Big )\Bigg ). \end{aligned}$$

This sum converges to the Lebesgue integral from (20). Since this is true for every function v, then

$$\begin{aligned} \Vert {\mathcal {S}}_F-M^{(m)}_F\Vert =\sup \limits _{\Vert v\Vert =1}\Vert {\mathcal {S}}[v]-M^{(m)}_F[v]\Vert \rightarrow 0, m\rightarrow \infty . \end{aligned}$$

The operators \({\mathcal {S}}\) and \(M^{(m)}_F\) are symmetric and self-adjoint, and the norm of their difference tends to zero as m tends to infinity. Using the perturbation theory, see [12, Theorem 4.10, page 291], we have that the spectra of these two operators are at the distance that tends to zero. Hence, \(\nu _1^{(m)}(F)\)—the sequence of the largest eigenvalues of \(M^{(m)}_F\)—must converge to \(\nu _1(F)\), the largest eigenvalue of \({\mathcal {S}}\).

In the case where \(\inf _{x}\{x: F(x)=1\}=\infty \), we consider its truncation to the interval \([-A,A]\), such that \(F(A)>1-\varepsilon \) for a desired value of \(\varepsilon >0\). The values for some common symmetric distributions are given in Table 1.

Table 1 Approximative values of the largest eigenvalues of the operator \({\mathcal {J}}_F\)

Concerning the limit in probability \(b_J(\theta )\), we give its formula in the following lemma. Its proof follows from [24].

Lemma 3.2

Under a close alternative \(g(x;\theta )\) from \({\mathcal {G}}\), such that \(G(x;0)=F(x)\), the limit in probability of \(J_n\) is

$$\begin{aligned} b_J(\theta )=3\int \limits _{{\mathbb {R}}^2}\varphi _F(x,y)h(x)h(y)\text {d}x\text {d}y\cdot \theta ^2+o(\theta ^2), \end{aligned}$$

as \(\theta \rightarrow 0\), where \(h(x)=g_\theta '(x;0)\).

We consider null d.f.’s to be uniform, normal, logistic and Laplace, and the following alternative distributions are close to a null d.f. F:

  • a Lehmann alternative with d.f.

    $$\begin{aligned} G_1(x;\theta )=F^{1+\theta }(x), \;\; \theta >0; \end{aligned}$$
    (21)
  • a first Ley–Paindaveine [17] alternative with d.f.

    $$\begin{aligned} G_2(x;\theta )=F(x)e^{-\theta (1-F(x))}, \;\; \theta >0; \end{aligned}$$
    (22)
  • a second Ley–Paindaveine alternative [17] with d.f.

    $$\begin{aligned} G_3(x;\theta )=F(x)-\theta \sin \big (\pi F(x)\big ), \;\; \theta \in [0,\pi ^{-1}]; \end{aligned}$$
    (23)
  • a contamination (with \(G_1\)) alternative with d.f.

    $$\begin{aligned} G_4(x;\theta ,\beta )=(1-\theta )F(x)+\theta F^{\beta }(x),\;\;\beta >1,\;\theta \in [0,1]; \end{aligned}$$
    (24)
  • a location alternative with d.f.

    $$\begin{aligned} G_5(x;\theta )=F(x-\theta ); \end{aligned}$$
    (25)
  • a contamination (with shift) alternative with d.f.

    $$\begin{aligned} G_6(x;\theta ,\beta )=(1-\theta )F(x)+\theta F(x-\beta ),\;\;\;\beta >0,\;\theta \in [0,1]; \end{aligned}$$
    (26)
  • a skew alternative in the sense of Azzalini [2] with density

    $$\begin{aligned} g_7(x;\theta )=2F(\theta x)f(x). \end{aligned}$$
    (27)

Example 3.3

Let the alternative distribution be \(G_1(x;\theta )\) when F is the d.f. of the uniform distribution. In this case, we have

$$\begin{aligned} h(x)=\frac{1}{2}+\frac{1}{2}\log \Big (\frac{x+1}{2}\Big ). \end{aligned}$$

By Lemma 3.2, after calculating the corresponding integral, we have that \(b_J(\theta )\sim 0.348\theta ^2\), \(\theta \rightarrow 0\). The largest solution of (7) is \(\nu _1\approx 0.1898\). Therefore, the Bahadur approximate slope is

$$\begin{aligned} c^{*}_{{\widetilde{J}}}(\theta )\sim \frac{0.348}{3\nu _1}\cdot \theta ^2\approx 0.611\cdot \theta ^2,\theta \rightarrow 0. \end{aligned}$$

The calculations are similar for the other alternatives. The Bahadur approximate indices (the leading coefficient in the Maclaurin expansion of the Bahadur approximate slope) are presented in Table 3 at the end of this section, together with the results for the Kolmogorov-type test.

3.2 Kolmogorov-Type Test

Similarly to the integral-type statistic, we study tail behavior of the limiting distribution of the statistic \({\widetilde{K}}_n=\sqrt{nK_n}\). Notice that \({\widetilde{K}}_n\) converges to \(\sup _{t}|\zeta _F(t)|^{1/2}\).

Theorem 3.4

For the limiting distribution of the test statistic \({\widetilde{K}}_n\), it holds true that

$$\begin{aligned} \log (1-F_{{\widetilde{K}}}(x)) \sim -\frac{x^2}{2\varkappa _0(F)},\;x\rightarrow \infty , \end{aligned}$$
(28)

where \(\varkappa _0(F)=\sup _{t}|\nu _1(t;F)|\), and \(\{\nu _1(t;F)\}\) is the set of eigenvalues of the family of operators \({\mathcal {Q}}_F(t),\;t>0\), with the largest absolute value.

Proof

The limiting process of \(nK_n^{*}\) is the second-order Gaussian chaos process \(|\zeta _F(t)|\). The tail behavior of its supremum \(nK_n\) is obtained in [14, Corollary 3.9]. The constant \(\sigma \) appearing there is equal to the supremum of the maximal eigenvalues of the corresponding linear operator. This is because

$$\begin{aligned} \sup _{||e||\le 1} \sup _{t}\langle {\mathcal {Q}}_F(t)[e(x)],e(x)\rangle =\sup _{t }\sup _{||e||\le 1}\langle {\mathcal {Q}}_F(t)[e(x)],e(x)\rangle = \sup _{t}\nu _1(t;F). \end{aligned}$$

Writing it in our notation, we obtain

$$\begin{aligned} \lim _{x\rightarrow \infty }\frac{1}{x}\log P\{\sup _{t}|\zeta _F(t)|>x\}=-\frac{1}{2\varkappa _0(F)}, \end{aligned}$$
(29)

and transforming the variable we get (28). \(\square \)

The following lemma gives us the limit in probability of the statistic \(K_n\).

Lemma 3.5

Under a close alternative \(g(x;\theta )\) from \({\mathcal {G}}\), such that \(G(x;0)=F(x)\), the limit in probability of \(K_n\) is

$$\begin{aligned} b(\theta )=\sup _{t>0}\bigg |\underset{{\mathbb {R}}^2}{\int \int }\xi (s_1,s_2;t)h(s_1)h(s_2)\text {d}s_1\text {d}s_2\bigg |\cdot \theta ^2+o(\theta ^2), \, \theta \rightarrow 0, \end{aligned}$$

Proof

Denote by \(a(t;\theta )\) the limit in probability of the statistic \(K_n^*(t)\) under the alternative \(g(x;\theta )\). Using the Glivenko–Cantelli theorem for U-statistics [9], we have that \(b(\theta )=\sup _{t>0}a(t;\theta )\), where

$$\begin{aligned} a(t;\theta )=\underset{{\mathbb {R}}^2}{\int \int }\Xi (x,y;t)g(x;\theta )g(y;\theta )\text {d}x\text {d}y. \end{aligned}$$

It is easy to show that \(a(t;0)=a'(t;0)=0\). The second derivative of \(a(t;\theta )\) along \(\theta \) at \(\theta =0\) is

$$\begin{aligned} a''(t;0)=2\underset{{\mathbb {R}}^2}{\int \int }\xi (x,y;t)h(x)h(y)\text {d}x\text {d}y. \end{aligned}$$

Expanding \(a(t;\theta )\) in the Maclaurin series completes the proof. \(\square \)

Finally, the Bahadur approximate slope is given in the following theorem.

Theorem 3.6

For the statistic \({\widetilde{K}}_n\) and a given alternative density \(g(x;\theta )\) from \({\mathcal {G}}\), the Bahadur approximate slope satisfies the relation

$$\begin{aligned} c^{*}_{{\widetilde{K}}}(\theta ) = \frac{1}{\varkappa _0} \sup _{t>0}\bigg |\underset{{\mathbb {R}}^2}{\int \int }\xi (s_1,s_2;t)h(s_1)h(s_2)\text {d}s_1\text {d}s_2\bigg |\cdot \theta ^2+o(\theta ^2), \, \theta \rightarrow 0, \end{aligned}$$

where \(\varkappa _0\) is given in (30).

Proof

Using Theorem 3.4 and Lemma 3.5, and the same arguments as in the case of the statistic \({\widetilde{J}}_n\), we get the statement of the theorem. \(\square \)

We apply the same approximation procedure used in the case of the operator \({\mathcal {J}}_F\). For the eigenvalues of the operator \({\mathcal {Q}}_F(t)\), for \(n=1000\), we get the functions \(\nu _1^{(1000)}(F;t)\) in the case of uniform, normal, logistic and Laplace distributions. Since in all the cases the functions have the same shape, we show only the function \(\nu _1^{(1000)}(F;t)\) for the uniform distribution case (Fig. 1).

Fig. 1
figure 1

Maximal eigenvalue function \(\nu _1^{(1000)}(t)\)

From Fig. 1, we can see that the function has a unique maximum \(\varkappa _0\approx 0.766\) for \(t\approx 2/3\). In this case, however, we are able to derive \(\varkappa _0\) theoretically in the following lemma.

Lemma 3.7

Let \(F(x)=(x+1)/2\), \(x\in [-1,1]\) and let \({\mathcal {Q}}(t)\) be the integral operator (16) corresponding to this F. Let \(\varkappa _0=\sup _{t\in [0,2]}|\nu _1(t)|\), where \(\{\nu _1(t), 0 \le t \le 2\} \) is the set of eigenvalues of the family of operators \({\mathcal {Q}}(t),\;t\in (0,2)\) with the largest absolute value. Then

$$\begin{aligned} \varkappa _0=\nu _1\Big (\frac{2}{3}\Big )=\frac{\sqrt{2}}{3}\Big (\arctan \frac{1}{\sqrt{2}}\Big )^{-1}. \end{aligned}$$
(30)

The proof is given in “Appendix”.

For the other distributions, we rely on the values obtained using the approximation. We present the obtained values in Table 2.

Table 2 Approximative values of the largest eigenvalues of the operator \({\mathcal {Q}}_F(t)\)

Example 3.8

Let the alternative distribution be \(G_3(x;\theta )\). In this case, we have

$$\begin{aligned} h(x)=\frac{\pi }{2}\sin \Big (\frac{\pi x}{2}\Big ). \end{aligned}$$

By Lemma 3.5, after calculating the corresponding integral, we have that

$$\begin{aligned} b_J(\theta )\sim \sup _{t>0}\Big |\pi (2-t)\sin \Big (\frac{\pi t}{2}\Big )\Big |\theta ^2,\;\;\theta \rightarrow 0. \end{aligned}$$

The supremum is attained at \(t=0.708\) and is approximately equal to 3.639. The Bahadur approximate slope is then

$$\begin{aligned} c^{*}_{{\widetilde{J}}}(\theta )\sim 4.752\cdot \theta ^2,\theta \rightarrow 0. \end{aligned}$$

The calculations are similar for the other alternatives. In Table 3, we give the values of the local approximate indices. Naturally, we confine ourselves to the cases where the alternatives (21)–(27) belong to the class \({\mathcal {G}}\), i.e., satisfy the regularity conditions.

For comparison purpose, we also include Bahadur indices of some competitor tests. We choose some recent characterization-based symmetry tests from [19, 23] (labeled, respectively, as \(c_{\mathrm {MOI}_k}\) and \(c_{\mathrm {NAI}_k}\) for integral-type tests, and \(c_{\mathrm {MOK}_k}\) and \(c_{\mathrm {NAK}_k}\) for Kolmogorov-type tests), as well as the classical sign test (\(c_S\)). The relative efficiency of any two tests can be calculated as the ratio of their Bahadur indices.

Table 3 Local approximate Bahadur indices of test statistics

We find that our tests, in all cases, are more efficient than the sign test. In comparison with the recent characterization-based tests, in some cases (e.g., \(g_3\) alternative for the uniform distribution) they outperform all the others, while in some other cases (e.g., \(g_1\) for normal distribution) new tests are the least efficient. Moreover, as it is often the case, no test is uniformly the most efficient.

When comparing two new tests to each other, we can notice that in the case of the uniform null distribution, the integral-type test is more efficient than the Kolmogorov-type test. This is a widespread situation in the comparison of tests, see [20]. However, for the other null distributions, it is mostly the other way around.

Table 4 Empirical sizes and powers at 0.05 level of significance, \(n=20\)
Table 5 Empirical sizes and powers at 0.05 level of significance, \(n=50\)

4 Power Study

In Tables 4 and 5, we present the empirical sizes and powers of our tests (\(J_n\) and \(K_n\)) against the alternatives \(g_5\), \(g_6(1)\), and \(g_7\), for some values of parameter \(\theta \).

The null distributions are normal, Laplace, logistic, and Cauchy. The simulated powers for \(J_n\) and \(K_n\), at the level of significance of 0.05, are obtained using a warp speed Monte Carlo bootstrap procedure [7] given below.

Warp speed Monte Carlo bootstrap algorithm

  1. (i)

    Generate the sequence \(x_1,\ldots ,x_n\) from an alternative distribution and compute the value of the test statistic \(T_n(x_1,\ldots ,x_n)\);

  2. (ii)

    Generate \(y^*_k=x_ku_k, \ k=1,\ldots ,n\), using i.i.d sequence of Rademacher random variables \(u_k\) taking values -1 and 1 with equal probabilities, to obtain the symmetrized sampling distribution;

  3. (iii)

    Calculate the value of the test statistic \(T^*_n=T_n(y_1^*,\ldots ,y^*_n)\);

  4. (iv)

    Repeat the steps (i)–(iii) N times, and obtain the empirical sampling distributions of \(T_n\) and \(T^*_n\) that correspond to the alternative and the null distribution of the test statistic, respectively;

  5. (v)

    Calculate the empirical power as the percentage of values of \(T^*_n\) greater than the 95th percentile of the empirical sampling distribution of \(T_n\).

The procedure is done for \(N=10{,}000\) replications, for the sample sizes of 20 and 50. For comparison purpose, we also include the same characterization-based tests as in Table 3, as well as the classical Kolmogorov–Smirnov symmetry test (KS) and the sign test (S), whose powers are calculated using the standard Monte Carlo procedure with 10,000 replications.

From Tables 4 and 5, one can see that the empirical sizes of our tests are satisfactory. Besides, \(J_n\) and \(K_n\) have almost equal empirical powers for all the alternatives.

We can observe that our tests have the highest powers in the case of the contamination alternative \(g_6(1)\), for all nulls, for smaller sample sizes (\(n=20\)), and for the logistic null for \(n=50\). Similar conclusion can be made for the location alternative \(g_5\) of the Cauchy null, for both sample sizes.

In other cases, while not being uniformly the best, the powers of our tests are comparable to all the competitors’.

5 Conclusion

In this paper, we presented two new tests of symmetry based on a characterization and examined their asymptotic properties. We calculated the local approximate Bahadur efficiencies of our tests, and performed a small-scale power study. We found out that our tests are comparable to some commonly used classical tests of symmetry.

When exploring the asymptotics of our tests, the most challenging problem was to obtain the maximal eigenvalue of some integral operators. In some cases, we were able to do it theoretically, using Fourier analysis and a decomposition of linear operators. For the rest of the cases, we suggested an approximation method based on a discretization of the corresponding integral operators. The described procedure could be useful in general for approximating the asymptotic distribution of degenerate U-statistics, which emerge often in the problems of goodness-of-fit testing.