[Paper Review] Scaling property of the statistical Two-Sample Energy Test
This paper provides an analytic proof of the scaling property in the two-sample energy test, demonstrating that the distribution of the test statistic under the null hypothesis scales predictably with sample size. By showing that moments of the test statistic scale as $ \mu_k(sn, sm) = \mu_k(n,m)/s^k $, the method enables accurate p-value estimation for large samples using simulations on smaller samples, significantly reducing computational cost without binning or loss of information.
The energy test is a powerful binning-free, multi-dimensional and distribution-free tool that can be applied to compare a measurement to a given prediction (goodness-of-fit) or to check whether two data samples originate from the same population (two-sample test). In both cases the distribution of the test statistic under the null hypothesis H_0, (correct prediction, same population) has to be obtained by simulation. This poses computational problems if the data samples are large, but the difficulty can be overcome with the help of a scaling property which relates the distribution of small samples to the distribution of large samples. Scaling has been made plausible in Ref. W. Barter et al. JINST 13 P04011 by extensive simulations. In this article an analytic proof is presented which makes the calculation of p-values obtained by scaling more reliable.
Motivation & Objective
- To address the high computational cost of simulating the null distribution of the two-sample energy test for large samples.
- To establish a rigorous analytic foundation for the scaling hypothesis previously supported only by simulations.
- To enable accurate p-value estimation for large datasets by scaling results from smaller, computationally feasible simulations.
- To preserve the binning-free, distribution-free, and multi-dimensional advantages of the energy test while reducing computational burden.
Proposed method
- The paper re-expresses the energy test statistic $ \phi_{nm} $ as a sum of three components: within-sample energies for samples $ n $ and $ m $, and a cross-sample energy term.
- It models deviations from the expected energy using zero-mean error terms $ \varepsilon_{ij} $, with $ \langle \varepsilon_{ij} \rangle = 0 $, and derives the second moment $ \mu_2 $ explicitly.
- The derivation shows that the second moment scales as $ \mu_2(sn, sm) \propto \mu_2(n,m)/s^2 $, confirming the scaling hypothesis for variance.
- For higher moments, the paper argues that leading-order terms cancel due to symmetry and correlation structure, reducing the numerator order by one per independent index, yielding $ \mu_k \propto 1/s^k $.
- The analysis confirms that scaling is independent of the distance function $ R $, including $ 1/r $, logarithmic, and inverse power forms.
- The method allows simulation of the test statistic distribution at small sample sizes $ n/s $, $ m/s $, then scaling up to estimate the distribution for large $ n, m $.
Experimental results
Research questions
- RQ1Can the scaling property of the two-sample energy test be rigorously proven analytically rather than relying on simulations?
- RQ2Does the scaling behavior of the test statistic's moments hold for arbitrary monotonically decreasing distance functions?
- RQ3To what extent does the scaling property preserve the accuracy of p-value estimation for large samples when derived from small-sample simulations?
- RQ4How do correlations between distance terms affect the scaling of higher-order moments in the energy test?
Key findings
- The second moment $ \mu_2 $ of the energy test statistic scales as $ \mu_2(sn, sm) = \mu_2(n,m)/s^2 $, confirming the scaling hypothesis for variance.
- For $ n = m = 100 $, the scaling approximation underestimates the standard deviation by only 0.25%, indicating high accuracy even at moderate sample sizes.
- Higher-order moments $ \mu_k $ scale as $ \mu_k(sn, sm) = \mu_k(n,m)/s^k $, with the leading terms canceling due to symmetry and correlation, reducing the numerator order by one per independent index.
- The scaling property is independent of the distance function $ R $, including $ 1/r $, logarithmic, and inverse power forms, and holds in any dimension.
- The method enables accurate p-value estimation for large samples using simulations on smaller samples, reducing computational cost by up to $ 10^{10} $-fold in extreme cases.
- The analytic proof validates the use of scaling in both two-sample and goodness-of-fit energy tests, replacing unreliable asymptotic approximations like the extreme value distribution.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.