Lably
Skip to content

Energy distance

Distance between probability distributions

  • 4 min read
  • 3 chapters

Related on Lably

Through Probability distribution, Square root and Expected value

D2(F,G)=2E⁡‖X−Y‖−E⁡‖X−X′‖−E⁡‖Y−Y′‖≥0,

where (X, X', Y, Y') are independent, the cdf of X and X' is F, the cdf of Y and Y' is G, E is the 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 D2(F,G) is exactly twice the Cramér distance:

∫−∞∞(F(x)−G(x))2dx.

For a simple proof of this equivalence, see Székely (2002).

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 Cramér–von Mises criterion.)

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 B(M). Let P(M) denote the collection of all probability measures on the measurable space (M,B(M)). If μ and ν are probability measures in P(M), then the energy-distance D of μ and ν can be defined as the square root of

D2(μ,ν)=2E⁡[d(X,Y)]−E⁡[d(X,X′)]−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. Equivalence of distance based and kernel methods for hypothesis testing is covered by several authors.

Sign in to keep reading

2 more chapters are free with a Lably account.

More in Statistics