ArticleslgStudy

mathematics

Energy distance

Energy distance is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Energy distance rather than just read about it. In short: Energy distance is a statistical distance between probability distributions. If X and Y are independent random vectors in Rd with cumulative distribution functions (cdf) F and G respectively, then the energy distance between the distributions F and G is defined to be the square root of 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…

Key takeaways

  • Energy distance belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Energy distance to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Energy distance from memory before moving on to harder problems.

Reference excerpt

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

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 ℬ(M). Let 𝒫(M) denote the collection of all probability measures on the measurable space (M,ℬ(M)). If μ and ν are probability measures in 𝒫(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.

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: μ=ν . 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:=1nm∑i=1n∑j=1m‖xi−yj‖,B:=1n2∑i=1n∑j=1n‖xi−xj‖,C:=1m2∑i=1m∑j=1m‖yi−yj‖. The E-statistic of the underlying null hypothesis is defined as follows:

En,m(X,Y):=2A−B−C One can prove that En,m(X,Y)≥0 and that the corresponding population value is zero if and only if X and Y have the same distribution (μ=ν). Under this null hypothesis the test statistic

T=nmn+mEn,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=D2(FX,FY)2E⁡‖X−Y‖=2E⁡‖X−Y‖−E⁡‖X−X′‖−E⁡‖Y−Y′‖2E⁡‖X−Y‖, where 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

Qn=n(2n∑i=1nE⁡‖xi−X‖α−E⁡‖X−X′‖α−1n2∑i=1n∑j=1n‖xi−xj‖α), where X and X' are independent and identically distributed according to the hypothesized distribution, and α∈(0,2). The only required condition is that X has finite α moment under the null hypothesis. Under the null hypothesis E⁡Qn=E⁡‖X−X′‖α, 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:

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Energy distance

Start with the simplest possible case. Write down what Energy distance claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Energy distance before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Energy distance ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Energy distance

In research
Energy distance appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Energy distance in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Energy distance is common in secondary-school and first-year university syllabi. It links to neighbouring topics Statistical distance, Statistical hypothesis testing, Theory of probability distributions, so understanding it makes those chapters shorter.
In everyday life
Look for Energy distance outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Energy distance” →

How to study Energy distance in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Energy distance means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Energy distance out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Energy distance in simple terms?

Energy distance is a statistical distance between probability distributions. If X and Y are independent random vectors in Rd with cumulative distribution functions (cdf) F and G respectively, then the energy distance between the distributions F and G is defined to be the square root of D2(F,G)=2E⁡‖…

Why does Energy distance matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Energy distance?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Energy distance.

Tags

  • Statistical distance
  • Statistical hypothesis testing
  • Theory of probability distributions

Keep exploring