  We introduce a new statistical quantity the energy to test whether two
samples originate from the same distributions. The energy is a simple
logarithmic function of the distances of the observations in the variate space.
The distribution of the test statistic is determined by a resampling method.
The power of the energy test in one dimension was studied for a variety of
different test samples and compared to several nonparametric tests. In two and
four dimensions a comparison was performed with the Friedman-Rafsky and nearest
neighbor tests. The two-sample energy test was shown to be especially powerful
in multidimensional applications.
