Skip to content

Energy distance

A metric between probability distributions built from expected pairwise Euclidean distances within and across independent samples.

Version
v2 · 2026-09-19 · History
Domain-specific #
4372
Domain group
Formal Sciences
Origin domain
Experimental Design & Statistics
Subdomain
Mathematical Statistics → Experimental Design & Statistics

Core Idea

Finite first moments are required; sample estimators connect to distance covariance, kernel maximum mean discrepancy and multivariate goodness-of-fit tests. Between-distribution distance is doubled, within-distribution dispersions are subtracted and negative-type geometry guarantees a nonnegative value that vanishes exactly for equal laws. The abstraction is therefore identified by a declared carrier, a transformation or constraint over that carrier, and an invariant that tells an analyst whether the named structure is genuinely present.

The load-bearing residual is not the broad topic of mathematical statistics. It is the domain-specific identity determined by the probability laws and Euclidean or negative-type metric space, independent copies, finite-moment conditions, population formula and square-root convention, sample estimator, zero-equivalence and inference use are explicit.

How would you explain it like I'm…

The Two Bags Test

You have two bags of marbles and want to know if they hold the same mix. You pick one marble from each bag and see how different they are. Then you also check how different marbles from the same bag are. If the bags have exactly the same mix, these balance out to zero; if not, you get a number bigger than zero.

Between Minus Within Distance

Energy distance is a way to tell whether two groups of numbers, or points, come from the same pattern. You measure how far apart things are when you pick one from each group, and count that twice. Then you subtract how spread out each group is on its own. The answer is never negative. It equals zero only when the two patterns are exactly the same. Scientists use it to test whether two samples really differ.

Distribution-Equality Distance

Energy distance measures how different two probability distributions are. Take independent random draws X and X′ from the first distribution and Y and Y′ from the second. Energy distance is 2·E|X−Y| − E|X−X′| − E|Y−Y′|: twice the average between-group distance minus each group's average within-group distance. This only works if the average size of the draws is finite, which is the finite first moment condition. Thanks to a special property of ordinary distance, called negative type, the result is always at least zero, and it is exactly zero only when the two distributions are identical. With real data you estimate it from samples. That makes it the basis of tests for whether two datasets come from the same distribution.

 

For probability laws P and Q on Euclidean space, or more generally a metric space of negative type, with finite first moments, the energy distance is D(P,Q) = 2E‖X−Y‖ − E‖X−X′‖ − E‖Y−Y′‖. Here X and X′ are independent draws from P, and Y and Y′ are independent draws from Q. The between-distribution term is doubled and the two within-distribution dispersions are subtracted. Negative-type geometry guarantees D ≥ 0, with equality if and only if P = Q, so it characterizes equality of distributions. Some authors use the square root of D as the distance, so the convention must be stated. Sample estimators replace expectations with averages over pairwise distances. They support two-sample tests and multivariate goodness-of-fit tests. Energy distance is closely connected to distance covariance and to kernel maximum mean discrepancy.

Scope of Application

Energy distance belongs to mathematical statistics and is useful where the analyst can specify the typed mathematical statistics carrier, defining objects and relations, parameters, conventions, evidence, boundary cases, and comparison targets, then evaluate the probability laws and Euclidean or negative-type metric space, independent copies, finite-moment conditions, population formula and square-root convention, sample estimator, zero-equivalence and inference use are explicit. The scope is broad within that domain but bounded by the need for the probability laws and Euclidean or negative-type metric space, independent copies, finite-moment conditions, population formula and square-root convention, sample estimator, zero-equivalence and inference use are explicit. The entry records a descriptive analytical identity; practical use requires the governing domain's evidence, standards, and safety obligations.

Clarity

The abstraction clarifies a crowded vocabulary by making the probability laws and Euclidean or negative-type metric space, independent copies, finite-moment conditions, population formula and square-root convention, sample estimator, zero-equivalence and inference use are explicit the center of the account. A claim should name the carrier, the governing operation or relation, the applicable assumptions, and the recognition test. A bare label is insufficient because the name Energy distance can be used for a formal identity, an implementation, or a neighboring result unless carrier and convention are stated.

Manages Complexity

Without the abstraction, an analyst must reason directly over many local details: the carrier roles, admissibility assumptions, competing conventions, derived invariants, boundary cases, and proof or validation obligations specific to Energy distance. Energy distance compresses them into the roles in the structural signature. That compression permits comparison across instances without erasing the variables that determine validity. It also exposes which details may be varied safely and which are constitutive.

Abstract Reasoning

  1. Identify the carrier. State what the elements, states, objects, or observations are: the typed mathematical statistics carrier, defining objects and relations, parameters, conventions, evidence, boundary cases, and comparison targets. Reject examples whose alleged carrier belongs to a different problem.
  2. Lock the constitutive rule. Express the probability laws and Euclidean or negative-type metric space, independent copies, finite-moment conditions, population formula and square-root convention, sample estimator, zero-equivalence and inference use are explicit independently of one notation or implementation.

Knowledge Transfer

Knowledge transfers strongly among subfields of mathematical statistics because they reuse the typed mathematical statistics carrier, defining objects and relations, parameters, conventions, evidence, boundary cases, and comparison targets, Between-distribution distance is doubled, within-distribution dispersions are subtracted and negative-type geometry guarantees a nonnegative value that vanishes exactly for equal laws., and type the carrier, state every parameter and convention in the definition, test that the probability laws and Euclidean or negative-type metric space, independent copies, finite-moment conditions, population formula and square-root convention, sample estimator, zero-equivalence and inference use are explicit, compare the nearest accepted identity, and report counterexamples, uncertainty, and limiting cases.

Relationships to Other Abstractions

Local relationship map for Energy distanceParents appear above the current abstraction, mutual partners to the right, and children below. Node labels state whether each abstraction is prime or domain-specific; colors identify relation types.Energy distanceDOMAINPrime abstraction: Similarity Measure — is a kind ofSimilarityMeasurePRIME

Current abstraction Energy distance Domain-specific

Parents (1) — outgoing typed relations

  • Energy distance is a kind of Similarity Measure Prime

    It remains its own entry because its identity is fixed by the probability laws and Euclidean or negative-type metric space, independent copies, finite-moment conditions, population formula and square-root convention, sample estimator, zero-equivalence and inference use.

Hierarchy paths (2) — routes to 2 parentless roots

Neighborhood in Abstraction Space

Energy distance sits in a crowded region of the domain-specific corpus (12th percentile for distinctiveness): several abstractions share nearly its structure, so a description that fits it tends to fit its neighbors too.

Family — Probability Distributions & Second-Moment Structures (32 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-10-25