Tutorials › Multivariate Statistics (Graduate) › Characteristic-Function Distance for Independence

Multivariate Dependence Testing · Tutorial 435 of 975

Characteristic-Function Distance for Independence

Learn how a weighted characteristic-function discrepancy is defined, why its being zero is equivalent to independence, and how it detects both linear and nonlinear dependence.

Advanced 12 min read

What You'll Learn

  • Define joint and marginal characteristic functions for random vectors.
  • Formulate a finite weighted integrated squared discrepancy.
  • Prove that a positive weight makes zero discrepancy equivalent to independence.
  • Calculate the discrepancy for a correlated bivariate normal distribution.
  • Detect dependence in a nonlinear example even when covariance is zero.
  • Recognize how the choice of integration weight affects the distance.

From Independence to a Characteristic-Function Distance

Correlation describes a particular kind of association, but dependence need not appear as nonzero correlation. A more general way to express independence is to compare the joint distribution with the product of its marginal distributions. Characteristic functions make this comparison precise: independence holds exactly when the joint characteristic function factors into the two marginal characteristic functions at every pair of arguments.

This tutorial turns that factorization condition into a nonnegative numerical discrepancy by integrating its squared magnitude over all arguments. The integration weight matters: it must give a finite integral, and to detect every failure of independence it must assign positive weight throughout the argument space.

Definition: For a random vector \(X\) in \(\mathbb{R}^p\), its characteristic function is \(\varphi_X(t)=E[\exp(i t^\mathsf{T}X)]\), for \(t\in\mathbb{R}^p\), where \(i^2=-1\). For random vectors \(X\in\mathbb{R}^p\) and \(Y\in\mathbb{R}^q\), define the joint characteristic function by \(\varphi_{X,Y}(t,s)=E[\exp(i t^\mathsf{T}X+i s^\mathsf{T}Y)]\), for \(t\in\mathbb{R}^p\) and \(s\in\mathbb{R}^q\). The factorization discrepancy is \(\Delta(t,s)=\varphi_{X,Y}(t,s)-\varphi_X(t)\varphi_Y(s)\).

Characteristic functions are complex-valued, so the size of the discrepancy is measured by its complex modulus. The product \(\varphi_X(t)\varphi_Y(s)\) is the characteristic function of the product distribution \(F_X\otimes F_Y\), the distribution that makes \(X\) and \(Y\) independent while retaining their actual marginal distributions.

Definition: Let \(w:\mathbb{R}^{p+q}\to[0,\infty)\) be measurable, integrable with respect to Lebesgue measure, and positive almost everywhere. The weighted characteristic-function distance is $$ D_w(X,Y)=\int_{\mathbb{R}^p}\int_{\mathbb{R}^q}|\Delta(t,s)|^2w(t,s)\,ds\,dt. $$ A simple choice, available in every dimension, is the normalized Gaussian weight \(w(t,s)=(2\pi)^{-(p+q)/2}\exp\{-(\|t\|^2+\|s\|^2)/2\}\).

This is a family of distances, one for each admissible weight, rather than a single weight-independent number. The Gaussian choice is convenient because it is strictly positive everywhere and integrates to one. Since every characteristic function has modulus at most one, \(|\Delta(t,s)|\leq 2\), so \(D_w(X,Y)\leq 4\int w(t,s)\,ds\,dt<\infty\). No moment assumption on \(X\) or \(Y\) is needed for this definition or bound.

Why Factorization Characterizes Independence

The key fact is that a probability distribution is uniquely determined by its characteristic function. In particular, if two probability distributions on the same Euclidean space have equal characteristic functions at every argument, then they are the same distribution. We use this standard uniqueness theorem to connect factorization with independence.

Theorem: For random vectors \(X\in\mathbb{R}^p\) and \(Y\in\mathbb{R}^q\), \(X\) and \(Y\) are independent if and only if \(\Delta(t,s)=0\) for every \(t\in\mathbb{R}^p\) and \(s\in\mathbb{R}^q\). For any measurable, integrable weight \(w\) that is positive almost everywhere, \(D_w(X,Y)=0\) if and only if \(X\) and \(Y\) are independent.

Proof. If \(X\) and \(Y\) are independent, then the expectation of the product of the two bounded complex-valued functions factors: $$ \varphi_{X,Y}(t,s) =E[\exp(i t^\mathsf{T}X)\exp(i s^\mathsf{T}Y)] =E[\exp(i t^\mathsf{T}X)]E[\exp(i s^\mathsf{T}Y)] =\varphi_X(t)\varphi_Y(s). $$ Thus \(\Delta(t,s)=0\) everywhere.

Conversely, suppose \(\Delta(t,s)=0\) for every \((t,s)\). The joint distribution of \((X,Y)\) then has characteristic function \(\varphi_X(t)\varphi_Y(s)\). The product distribution \(F_X\otimes F_Y\) has that same characteristic function, by the definition of a product distribution. Uniqueness of characteristic functions implies that the joint distribution equals \(F_X\otimes F_Y\). This equality is precisely independence.

It remains to connect the integral to pointwise factorization. If \(\Delta\) vanishes everywhere, then its squared modulus is zero everywhere, so \(D_w(X,Y)=0\). In the other direction, suppose \(D_w(X,Y)=0\). The integrand is nonnegative, so \(|\Delta(t,s)|^2w(t,s)=0\) almost everywhere. Characteristic functions are continuous, hence \(\Delta\) is continuous. If \(\Delta\) were nonzero at some point, continuity would give an open ball around that point on which \(|\Delta|\) is bounded below by some positive number. Since \(w>0\) almost everywhere, its integral over this ball is positive; consequently the integral defining \(D_w\) would be positive, a contradiction. Therefore \(\Delta=0\) everywhere, and the first part of the proof gives independence. \(\square\)

Worked Calculations

Worked Example: Independent Standard Normal Variables

Let \(X\) and \(Y\) be independent \(N(0,1)\) random variables. Their characteristic functions are \(\varphi_X(t)=\exp(-t^2/2)\) and \(\varphi_Y(s)=\exp(-s^2/2)\). Independence gives $$ \varphi_{X,Y}(t,s)=\exp\{-(t^2+s^2)/2\} =\varphi_X(t)\varphi_Y(s). $$

Thus \(\Delta(t,s)=0\) for every \((t,s)\), and \(D_w(X,Y)=0\) for every admissible weight \(w\). This conclusion does not depend on which positive integration weight is selected.

Worked Example: A Correlated Bivariate Normal Pair

Let \((X,Y)\) have a bivariate normal distribution with mean zero, unit marginal variances, and correlation \(\rho=1/2\). Its joint characteristic function and the product of its marginal characteristic functions are $$ \varphi_{X,Y}(t,s)=\exp\{-(t^2+s^2+2\rho ts)/2\},\qquad \varphi_X(t)\varphi_Y(s)=\exp\{-(t^2+s^2)/2\}. $$

Use the two-dimensional normalized Gaussian weight \(w(t,s)=(2\pi)^{-1}\exp\{-(t^2+s^2)/2\}\). The difference is $$ \Delta(t,s)=\exp\{-(t^2+s^2)/2\}\{\exp(-\rho ts)-1\}. $$ Squaring its modulus and multiplying by the weight gives $$ |\Delta(t,s)|^2w(t,s) =(2\pi)^{-1}\exp\{-3(t^2+s^2)/2\}\{\exp(-2\rho ts)-2\exp(-\rho ts)+1\}. $$

For \(a>0\) and \(a^2>c^2/4\), a two-dimensional Gaussian integral is $$ \int_{\mathbb{R}^2}\exp\{-a(t^2+s^2)+cts\}\,dt\,ds =\frac{\pi}{\sqrt{a^2-c^2/4}}. $$ Here \(a=3/2\). Applying the formula to the three terms, with cross-term coefficients \(-2\rho\), \(-\rho\), and \(0\), respectively, yields $$ D_w(X,Y)=\frac{1}{2\sqrt{9/4-\rho^2}}-\frac{1}{\sqrt{9/4-\rho^2/4}}+\frac{1}{3}. $$ At \(\rho=1/2\), this is $$ D_w(X,Y)=\frac{1}{2\sqrt{2}}-\frac{4}{\sqrt{35}}+\frac{1}{3} \approx 0.01076>0. $$ The positive value confirms that the joint characteristic function does not factor.

Worked Example: Dependence With Zero Covariance

Let \(X\sim N(0,1)\) and set \(Y=X^2\). These variables are dependent because \(Y\) is determined by \(X\). Yet their covariance is zero: $$ \operatorname{Cov}(X,Y)=E[X^3]-E[X]E[X^2]=0-0\cdot 1=0. $$ This makes the example useful for seeing what the full characteristic-function comparison detects beyond covariance.

A Gaussian integral gives $$ \varphi_{X,Y}(t,s)=E[\exp(i tX+i sX^2)] =(1-2is)^{-1/2}\exp\left\{-\frac{t^2}{2(1-2is)}\right\}, $$ where the square root is the continuous branch equal to \(1\) at \(s=0\). Meanwhile, $$ \varphi_X(t)\varphi_Y(s)=\exp(-t^2/2)(1-2is)^{-1/2}. $$ At \(t=s=1\), \(1/(1-2i)=(1+2i)/5\). The exponential factors in the joint and factored expressions are therefore \(\exp\{-(1+2i)/10\}\) and \(\exp(-1/2)\). Their moduli are \(e^{-1/10}\) and \(e^{-1/2}\), which differ. The common factor \((1-2i)^{-1/2}\) is nonzero, so \(\Delta(1,1)\ne 0\). By continuity and positivity of the Gaussian weight, \(D_w(X,Y)>0\).

Interpreting the Distance and Avoiding Pitfalls

The distance summarizes discrepancies across all frequencies \((t,s)\), rather than checking only a local feature such as covariance. The theorem shows that with an integrable weight positive almost everywhere, no nonzero factorization discrepancy can be hidden from the integral. A weight that is zero on a region of positive measure may lose this guarantee: it could ignore discrepancies confined to that region.

The numerical size of \(D_w\) is not an intrinsic scale of dependence. Changing the weight changes which arguments receive emphasis and can change the value, even though the zero-versus-positive characterization remains the same for every admissible weight. In particular, interpreting two distances computed with different weights as directly comparable requires care. The Gaussian weight provides a simple bounded construction; other weights can be chosen for particular analytical purposes, provided their integrability and positivity properties are checked.

A common mistake is to reason that zero covariance proves independence. The \(Y=X^2\) example disproves that inference: covariance is zero, but the joint characteristic function fails to factor. Another mistake is to conclude that a single nonzero value of \(\Delta(t,s)\) directly gives the value of the integrated distance. It proves that the distance is positive when the weight is positive almost everywhere, but evaluating its numerical value still requires integrating the squared discrepancy over the full argument space.

Key takeaway: Independence is equivalent to joint-characteristic-function factorization at every argument. Integrating the squared factorization discrepancy against any integrable weight positive almost everywhere gives a finite nonnegative quantity that is zero exactly under independence.

Check Your Understanding

Use the definitions and results above to answer these questions.

  1. Why does integrability of \(w\), together with \(|\Delta(t,s)|\leq 2\), guarantee that \(D_w(X,Y)\) is finite?
  2. Which characteristic-function uniqueness result is used to turn factorization everywhere into independence?
  3. Why does continuity of \(\Delta\) matter when showing that zero integrated distance implies factorization everywhere?
  4. For \(Y=X^2\) with \(X\sim N(0,1)\), what does zero covariance fail to establish?
  5. What condition on the weight is needed for the distance's zero value to characterize independence?
Clinical Biostats