---
title: Affinely Invariant Distance Correlation
url: https://www.emergentmind.com/topics/affinely-invariant-distance-correlation
type: topic
---

# Affinely Invariant Distance Correlation

Affinely invariant distance correlation is a statistical measure that quantifies the dependence between two sets of random variables, ensuring invariance under affine transformations. It generalizes the standard distance correlation by incorporating whitening, achieving full affine invariance. This enables the robust assessment of dependence structures in multivariate data irrespective of the choice of scale, orientation, or location. The development of the affinely invariant distance correlation addresses limitations of the original formulation by Székely, Rizzo, and Bakirov, facilitating its application to high-dimensional, multivariate scenarios with arbitrary affine structure [1210.2482].

## 1. Formal Definition

Let $X\in\mathbb R^p$ and $Y\in\mathbb R^q$ denote random vectors with finite second moments and nonsingular covariance matrices $\Sigma_X$ and $\Sigma_Y$. The (standard) distance covariance is defined as
\[
V^2(X,Y) = \frac{1}{c_p\,c_q} \int_{\mathbb R^{p+q}} \frac{|f_{X,Y}(s,t)-f_X(s)\,f_Y(t)|^2}{|s|_p^{p+1}|t|_q^{q+1}}\,ds\,dt,
\]
where $f_{X,Y}$ is the joint characteristic function of $(X,Y)$, $f_X$, $f_Y$ are the marginals, and $c_p = \frac{\pi^{(p+1)/2}}{\Gamma((p+1)/2)}$.

The corresponding distance correlation is
\[
\mathcal R(X,Y) = \frac{V(X,Y)}{\sqrt{V(X,X)\,V(Y,Y)}},\quad 0\le\mathcal R\le1,\quad \mathcal R=0 \iff X\perp Y.
\]

The affinely invariant distance covariance standardizes $X$ and $Y$ via whitening transformations, leading to
\[
\widetilde V^2(X,Y) = V^2(\Sigma_X^{-1/2}X,\,\Sigma_Y^{-1/2}Y),
\]
and the affinely invariant distance correlation is then
\[
\widetilde{\mathcal R}(X,Y) = \frac{\widetilde V(X,Y)}{\sqrt{\widetilde V(X,X)\,\widetilde V(Y,Y)}},
\]
with the convention $\widetilde{\mathcal R}=0$ if the denominator is zero.

## 2. Key Properties

- **Affine invariance**: For any invertible affine maps $X\mapsto A\,X+a$, $Y\mapsto B\,Y+b$, the affinely invariant distance correlation satisfies
  \[
  \widetilde{\mathcal R}(X,Y) = \widetilde{\mathcal R}(A\,X+a,\,B\,Y+b).
  \]

- **Bounds and independence**: The measure satisfies $0\le\widetilde{\mathcal R}(X,Y)\le1$. For random vectors with finite second moments, $\widetilde{\mathcal R}(X,Y) = 0$ if and only if $X$ and $Y$ are independent.

These properties ensure that affinely invariant distance correlation is a consistent, robust dependency measure across arbitrary affine structures [1210.2482].

## 3. Empirical Estimation and Consistency

Given samples $\{(X_i,Y_i)\}_{i=1}^n$, the empirical version proceeds by constructing the centered distance matrices:
\[
a_{ij} = |X_i - X_j|_p, \quad A_{ij} = a_{ij} - \bar a_{i\bullet} - \bar a_{\bullet j} + \bar a_{\bullet\bullet},
\]
and analogously for $b_{ij}, B_{ij}$ for the $Y$ margin. The squared sample distance covariance is
\[
V_n^2(X,Y) = \frac{1}{n^2}\sum_{i,j=1}^n A_{ij}B_{ij},
\]
with sample distance correlation $\mathcal R_n = V_n/\sqrt{V_n(X,X)V_n(Y,Y)}$.

For the affinely invariant case, data are whitened via $X_i\leftarrow S_X^{-1/2}X_i$, $Y_i\leftarrow S_Y^{-1/2}Y_i$, with $S_X, S_Y$ the sample covariance matrices, yielding $\widetilde V_n$ and $\widetilde{\mathcal R}_n$.

**Consistency**: If the sample covariance matrices $S_X, S_Y$ are consistent estimators, then
\[
\widetilde{\mathcal R}_n(X,Y) \xrightarrow{\text{a.s.}} \widetilde{\mathcal R}(X,Y)
\]
as $n\to\infty$. Proof techniques rely on the almost sure convergence of whitening transforms and uniform norm bounds [1210.2482].

## 4. Exact Formulas—Multivariate Normal Case

Given $(X,Y)\sim N_{p+q}(0,\Sigma)$ with
\[
\Sigma = \begin{pmatrix}
\Sigma_X & \Sigma_{XY} \\
\Sigma_{YX} & \Sigma_Y
\end{pmatrix},
\]
the matrix of squared canonical correlations is
\[
\Lambda = \Sigma_Y^{-1/2}\Sigma_{YX}\Sigma_X^{-1}\Sigma_{XY}\Sigma_Y^{-1/2},
\]
with eigenvalues $\lambda_1,\dots,\lambda_r$ ($r=\min(p,q)$). The affinely invariant distance covariance is given by a series involving zonal polynomials $C_{(k)}$ and, equivalently, by hypergeometric functions:
\[
\widetilde V^2(X,Y) = 4\,\frac{c_{p-1}c_p\,c_{q-1}c_q}{c_p^2 c_q^2} 
\sum_{k=1}^{\infty}
\frac{2^{2k}-2}{k!2^{2k}}
\frac{C_{(k)}(\Lambda)}{(\tfrac12p)_k(\tfrac12q)_k(\tfrac12)_k},
\]
or, in hypergeometric notation (Corollary 3.2):
\[
\widetilde V^2(X,Y) = 4\,\frac{c_{p-1}c_p\,c_{q-1}c_q}{}
\left\{{}_3F_2\left(\tfrac12, -\tfrac12, -\tfrac12; \tfrac12p, \tfrac12q; \Lambda\right)
-2\,{}_3F_2\left(\tfrac12, -\tfrac12, -\tfrac12; \tfrac12p, \tfrac12q; \tfrac14\Lambda\right)
+1\right\}.
\]

For the bivariate case ($p=q=1$),
\[
\widetilde{\mathcal R}(X,Y) =
\frac{
\sqrt{4(\rho\arcsin\rho + \sqrt{1-\rho^2} - 1)}
}
{
\sqrt{\frac{4}{3}(1-\frac{\sqrt3-1}{2})}
}
,
\]
recovering the Székely–Rizzo–Bakirov formula in terms of the Pearson correlation $\rho$.

**Asymptotic regimes**: When $\Lambda\to0$ (vanishing cross-covariance),
\[
\widetilde{\mathcal R}^2(X,Y) \sim \frac{\operatorname{tr}(\Lambda)}{4pq\sqrt{A(p)A(q)}},
\]
and at high dimension,
\[
\widetilde V^2(X_p,Y_p)\sim \tfrac12 \operatorname{tr}(\Lambda_p)/p,
\]
with growth rates determined by $p, q$ [1210.2482].

## 5. Relationship to Classical Canonical Correlations

The matrix $\Lambda$ composed of squared canonical correlations appears directly in the series expansion for $\widetilde V^2$. Thus,
\[
\widetilde{\mathcal R}(X,Y) = g(\lambda_1,\dots,\lambda_r),
\]
for an explicit $g$ derived from the hypergeometric representation. The maximum-likelihood estimates $\hat\lambda_i$ for the canonical correlations can be substituted into $g$ to yield the MLE of $\widetilde{\mathcal R}$ under Gaussianity.

This explicit relationship to canonical correlation allows the affinely invariant distance correlation to serve as a generalization that captures all canonical forms of linear dependence and extends naturally to nonlinear associations.

## 6. Applications to Time Series of Wind Vectors

For a stationary vector time series $(X_t)$, the affinely invariant auto-distance correlation at lag $k$ is defined as
\[
\widetilde{\mathcal R}_X(k) = \frac{\widetilde V(X_t, X_{t+k})}{\widetilde V(X_t, X_t)},
\]
and for two jointly stationary vector series $(X_t)$ and $(Y_t)$, the cross-distance correlation at lag $k$ is
\[
\widetilde{\mathcal R}_{X,Y}(k) = \frac{
\widetilde V(X_t, Y_{t+k})
}
{\sqrt{
\widetilde V(X_t, X_t)\widetilde V(Y_t, Y_t)
}
}.
\]

Empirical analysis of bivariate wind-vector series at the Stateline wind energy center (Vansycle and Goodnoe Hills stations) demonstrates the following findings:
- A clear diurnal cycle in auto-distance correlations,
- Pronounced asymmetry and positive-lag peaks in cross-correlation functions, consistent with prevailing westerly wind flows,
- Deviations of empirical affinely invariant distance correlations from Gaussian-based theoretical conversions, providing evidence against strict normality in the wind-vector distribution [1210.2482].

## 7. Significance and Connections

The affinely invariant distance correlation exhibits key advantages over classical dependency measures by combining nonlinear sensitivity with full affine invariance, robust empirical consistency, and direct connections to canonical correlation. These properties make it particularly suitable for modeling complex dependencies in high-dimensional and structured multivariate data, including applications in multivariate time series, as illustrated by the wind-vector study. The explicit analytic formulas and asymptotic results established for the multivariate normal case enable rigorous further study of its theoretical properties and its practical deployment in scientific fields requiring robust dependence measurement [1210.2482].

Source: https://www.emergentmind.com/topics/affinely-invariant-distance-correlation