 #jsDisabledContent { display:none; } My Account |  Register |  Help Flag as Inappropriate This article will be permanently flagged as inappropriate and made unaccessible to everyone. Are you certain this article is inappropriate?          Excessive Violence          Sexual Content          Political / Social Email this Article Email Address:

# Energy distance

Article Id: WHEBN0030316300
Reproduction Date:

 Title: Energy distance Author: World Heritage Encyclopedia Language: English Subject: Collection: Publisher: World Heritage Encyclopedia Publication Date:

### Energy distance

Energy distance is a statistical distance between probability distributions. If X and Y are independent random vectors in Rd with cumulative distribution functions F and G respectively, then the energy distance between the distributions F and G is defined to be the square root of

D^2(F, G) = 2\mathbb E\|X - Y\| - \mathbb E\|X - X'\| - \mathbb E\|Y - Y'\| \geq 0,

where X, X' are independent and identically distributed (iid), Y, Y' are iid, \mathbb E is expected value, and || . || denotes the length of a vector. Energy distance satisfies all axioms of a metric thus energy distance characterizes the equality of distributions: D(F,G) = 0 if and only if F = G. Energy distance for statistical applications was introduced in 1985 by Gábor J. Székely, who proved that for real-valued random variables this distance is exactly twice Harald Cramér's distance:

\int_{-\infty}^\infty (F(x) - G(x))^2 \, dx .

For a simple proof of this equivalence, see Székely and Rizzo (2005). In higher dimensions, however, the two distances are different because the energy distance is rotation invariant while Cramér's distance is not. (Notice that Cramér's distance is not the same as the distribution-free Cramer-von-Mises criterion.)

## Contents

• Generalization to metric spaces 1
• Energy statistics 2
• Testing for equal distributions 2.1
• Goodness-of-fit 2.2
• Applications 3
• References 4

## Generalization to metric spaces

One can generalize the notion of energy distance to probability distributions on metric spaces. Let (M, d) be a metric space with its Borel sigma algebra \mathcal{B} (M). Let \mathcal{P} (M) denote the collection of all probability measures on the measurable space (M, \mathcal{B} (M)). If μ and ν are probability measures in \mathcal{P} (M), then the energy-distance D of μ and ν can be defined as the square root of

D^2(\mu, \nu)= 2 \mathbb E[d(X,Y)] - \mathbb E[d(X,X')] - \mathbb E[d(Y,Y')] .

This is not necessarily non-negative, however. If (M, d) is a strongly negative definite kernel, then D is a metric, and conversely. This condition is expressed by saying that (M, d) has negative type. Negative type is not sufficient for D to be a metric; the latter condition is expressed by saying that (M, d) has strong negative type. In this situation, the energy distance is zero if and only if X and Y are identically distributed. An example of a metric of negative type but not of strong negative type is the plane with the taxicab metric. All Euclidean spaces and even separable Hilbert spaces have strong negative type.

In the literature on kernel methods for machine learning, these generalized notions of energy distance are studied under the name of maximum mean discrepancy.

## Energy statistics

A related statistical concept, the notion of E-statistic or energy-statistic was introduced by Gábor J. Székely in the 1980s when he was giving colloquium lectures in Budapest, Hungary and at MIT, Yale, and Columbia. This concept is based on the notion of Newton’s potential energy. The idea is to consider statistical observations as heavenly bodies governed by a statistical potential energy which is zero only when an underlying statistical null hypothesis is true. Energy statistics are functions of distances between statistical observations.

Energy distance and E-statistic were considered as N-distances and N-statistic in Zinger A.A., Kakosyan A.V., Klebanov L.B. Characterization of distributions by means of mean values of some statistics in connection with some probability metrics, Stability Problems for Stochastic Models. Moscow, VNIISI, 1989,47-55. (in Russian), English Translation: A characterization of distributions by mean values of statistics and certain probabilistic metrics A. A. Zinger, A. V. Kakosyan, L. B. Klebanov in Journal of Soviet Mathematics (1992). In the same paper there was given a definition of strongly negative definite kernel, and provided a generalization on metric spaces, discussed above. The book  gives these results and their applications to statistical testing as well. The book contains also some applications to recovering the measure from its potential.

### Testing for equal distributions

Consider the null hypothesis that two random variables, X and Y, have the same probability distributions: μ = v . For statistical samples from X and Y:

x1,…,xn and y1,…,ym,

the following arithmetic averages of distances are computed between the X and the Y samples:

A:= (1/nm)∑|xi – yj|, B:= (1/n2)∑|xi – xj|, C:= (1/m2)∑|yi – yj|.

The E-statistic of the underlying null hypothesis is defined as follows:

Εn,m(X,Y):= 2A – B – C.

One can prove  that Εn,m(X,Y) ≥ 0 and that the corresponding population value, E(X,Y):= D(μ,ν), is zero if and only if X and Y have the same distribution (μ=ν). Under this null hypothesis the test statistic

T = \frac{nm}{n+m} E_{n,m}(X,Y)

converges in distribution to a quadratic form of independent standard normal random variables. Under the alternative hypothesis T tends to infinity. This makes it possible to construct a consistent statistical test, the energy test for equal distributions.

The E-coefficient of inhomogeneity can also be introduced. This is always between 0 and 1 and is defined as

H = \frac{D^2(F_X,F_Y)}{ 2 \operatorname{\mathbb E}\|X-Y\|} = \frac{2\mathbb E\|X - Y\| - \mathbb E\|X - X'\| - \mathbb E\|Y - Y'\|} {2 \operatorname{\mathbb E}\|X-Y\|},

where \mathbb E denotes the expected value. H = 0 exactly when X and Y have the same distribution.

### Goodness-of-fit

A multivariate goodness-of-fit measure is defined for distributions in arbitrary dimension (not restricted by sample size). The energy goodness-of-fit statistic is

Q_n = n \left( \frac{2}{n} \sum_{i=1}^n \mathbb E \|x_i - X\|^\alpha - \mathbb E\|X - X'\|^\alpha - \frac{1}{n^2} \sum_{i=1}^n \sum_{j=1}^n \|x_i - x_j\|^\alpha \right),

where X and X' are independent and identically distributed according to the hypothesized distribution, and \alpha \in (0,2). The only required condition is that X has finite \alpha moment under the null hypothesis. Under the null hypothesis \mathbb EQ_n=\mathbb E\|X-X'\|^\alpha, and the asymptotic distribution of Qn is a quadratic form of centered Gaussian random variables. Under an alternative hypothesis, Qn tends to infinity stochastically, and thus determines a statistically consistent test. For most applications the exponent 1 (Euclidean distance) can be applied. The important special case of testing multivariate normality is implemented in the energy package for R. Tests are also developed for heavy tailed distributions such as Pareto (power law), or stable distributions by application of exponents in (0,1).

## Applications

Applications include

Gneiting and Raftery apply energy distance to develop a new and very general type of proper scoring rule for probabilistic predictions, the energy score.
• Robust statistics 
• Gene selection 
• Microarray data analysis
• Material structure analysis

Applications of energy statistics are implemented in the open source energy package for R.