Measuring multidimensional inequality: a new proposal based on the Fourier transform (2401.14012v1)
Abstract: Inequality measures are quantitative measures that take values in the unit interval, with a zero value characterizing perfect equality. Although originally proposed to measure economic inequalities, they can be applied to several other situations, in which one is interested in the mutual variability between a set of observations, rather than in their deviations from the mean. While unidimensional measures of inequality, such as the Gini index, are widely known and employed, multidimensional measures, such as Lorenz Zonoids, are difficult to interpret and computationally expensive and, for these reasons, are not much well known. To overcome the problem, in this paper we propose a new scaling invariant multidimensional inequality index, based on the Fourier transform, which exhibits a number of interesting properties, and whose application to the multidimensional case is rather straightforward to calculate and interpret.
Summary
- The paper introduces a novel Fourier-transform index that generalizes one-dimensional inequality measures to multivariate data.
- It derives a scaling-invariant formulation using a covariance transformation, linking the index to the Mahalanobis distance.
- The method offers computational efficiency and clearer empirical insights compared to traditional multidimensional measures.
This paper introduces a new method for measuring inequality in multivariate data, addressing the limitations of existing multidimensional measures like Lorenz Zonoids, which are noted as computationally expensive and difficult to interpret [19]. The proposed approach is based on the Fourier transform of the multivariate probability distribution, generalizing a one-dimensional index previously developed by one of the authors [24].
The foundation of the new index lies in the observation that traditional one-dimensional inequality measures, such as the Gini and Pietra indices, can be expressed in terms of the Fourier transform of the probability distribution. For a one-dimensional probability measure F with mean m, the Gini index can be related to the L2 distance between the Fourier transform of F and the Fourier transform of a step function representing a uniform distribution up to a certain point (Equation 2.6). Building on this, a one-dimensional Fourier-based index T(F) was introduced, related to the supremum distance between the Fourier transform of F and the Fourier transform of a step function centered at the mean (Equation 2.9).
The core proposal is a multivariate extension of this Fourier-based index. For an n-dimensional probability measure F with mean vector m, the initial n-dimensional index Tn(F) is defined based on the gradient of the Fourier transform f(ξ) at ξ=0 (which equals −im) and the supremum of an expression involving f(ξ) and its gradient over Rn (Equation 2.10):
Tn(F)=2∣m∣1ξ∈Rnsup∣∇f(ξ=0)f(ξ)−∇f(ξ)∣
This index satisfies 0≤Tn(F)≤1 for measures supported on the non-negative orthant Ps+(Rn) and is zero if and only if F is a Dirac delta distribution (perfect equality). The paper shows that this index is bounded by multivariate versions of the Pietra Pn(F) and Gini Gn(F) indices (Equations 2.12 and 2.13), where the Euclidean distance ∣x−m∣ is used: 0≤Tn(F)≤Pn(F)≤Gn(F)≤1. A key advantage highlighted is that computing Tn(F) involves taking a supremum over Rn and potentially point evaluations of the Fourier transform and its gradient, which can be computationally simpler than the multiple integrations required for Pn(F) and Gn(F) in higher dimensions.
A critical challenge for multidimensional inequality measures is satisfying the scaling property, meaning the index should remain unchanged if the units of measurement for one or more components are changed. The initial Tn(F) index is invariant only under uniform scaling X→cX but not under component-wise scaling Xk→akXk. To address this, the paper modifies the argument of the Fourier transform. Instead of evaluating f(ξ), the index is computed using f∗(ξ)=f(ξ∗), where ξ∗ is a transformed version of ξ that incorporates the inverse square root of the covariance matrix Σ (Equations 2.19 and 2.24). Specifically, ξ∗=Σ−1/2ξ, where Σ−1/2 is derived from the eigendecomposition of Σ. The resulting scaling-invariant index is Tn(F∗)=2∣m∗∣1ξ∈Rnsup∣∇f∗(ξ=0)f∗(ξ)−∇f∗(ξ)∣ (Equation 2.25), where m∗=Σ−1/2m.
This transformation reveals an interesting connection to the Mahalanobis distance. The term ∣m∗∣=mTΣ−1m is the Mahalanobis distance of the mean vector from the origin. The paper demonstrates this connection explicitly. This link is significant because Mahalanobis distance is a scale-invariant measure of distance in multivariate space.
The paper provides concrete examples for calculating the index:
- Two-point distribution: For a distribution taking values a and b with probabilities $1-p$ and p, the scaling-invariant index Tn(F) (evaluated using f∗) is explicitly derived as mTΣ−1mp(1−p)(b−a)TΣ−1(b−a) (Equation 2.28). This formula involves the Mahalanobis distance between a and b, and the Mahalanobis distance of the mean m from the origin. This structure is analogous to the one-dimensional case.
- Multivariate Gaussian distribution: For a multivariate Gaussian distribution N with mean m and covariance Σ, the scaling-invariant index Tn(N) is found to be 2e1mTΣ−1m1 (Equation 2.32). This result is inversely proportional to the Mahalanobis distance of the mean from the origin and directly proportional to the reciprocal of the Voinov and Nikulin multivariate coefficient of variation, which is also scale-invariant [25].
The paper also discusses several properties of the index Tn. It shows convexity on the set of probability measures with the same mean and covariance matrix. It analyzes the behavior of the index for sums of independent random vectors. Notably, adding a constant positive vector to each observation decreases inequality (Equation 3.5), a property consistent with one-dimensional inequality measures. Adding independent copies of the same distribution also tends to decrease or maintain inequality (Equation 3.6).
Finally, the paper proposes alternative definitions for multivariate Pietra and Gini indices by replacing the Euclidean distance with the Mahalanobis distance in their definitions (Equations 4.1 and 4.2). These Mahalanobis-based versions, denoted Pn(X) and Gn(X), also satisfy the scaling property and provide values proportional to the Voinov-Nikulin coefficient of variation for Gaussian distributions.
Practical Implementation:
To implement the proposed scaling-invariant multidimensional Fourier-based inequality index Tn(F∗) for a dataset consisting of N observations {xi}i=1N, where each xi∈Rn:
- Estimate Mean and Covariance: Calculate the sample mean vector m^=N1∑i=1Nxi and the sample covariance matrix Σ^=N−11i=1∑N(xi−m^)(xi−m^)T. Ensure the data is in Ps+(Rn), meaning components are non-negative. If components can be negative, the bounds might not hold. The mean vector m^ must have ∣∣m^∣∣>0, and Σ^ must be positive definite for the inverse Σ^−1 to exist. Handle cases where Σ^ is singular (e.g., using pseudo-inverse or regularization).
- Compute Σ^−1/2: Perform an eigendecomposition of Σ^: Σ^=ZΛZT, where Λ is a diagonal matrix of eigenvalues λk>0, and Z is an orthogonal matrix of eigenvectors. Then Σ^−1/2=ZΛ−1/2ZT, where Λ−1/2 has diagonal elements 1/λk.
- Define the transformed Fourier argument: For any ξ∈Rn, define ξ∗=Σ^−1/2ξ.
- Compute the empirical Fourier Transform: For discrete empirical data, the empirical characteristic function (which is related to the Fourier transform) is given by f^(ξ)=N1j=1∑Ne−iξTxj. The transformed empirical characteristic function is f^∗(ξ)=f^(ξ∗)=N1j=1∑Ne−i(Σ^−1/2ξ)Txj.
- Compute Gradients: The gradient of f^∗(ξ) with respect to ξ is ∇f^∗(ξ)=N1j=1∑N(−iΣ^−1/2xj)e−i(Σ^−1/2ξ)Txj. At ξ=0, ∇f^∗(ξ=0)=N1j=1∑N(−iΣ^−1/2xj)=−iΣ^−1/2m^=−im^∗.
- Calculate ∣∣m^∗∣∣: Compute ∣∣m^∗∣∣=∣∣Σ^−1/2m^∣∣=m^T(Σ^−1/2)TΣ^−1/2m^=m^TΣ^−1m^.
- Evaluate the term to be maximized: Define G(ξ)=∣∇f^∗(ξ=0)f^∗(ξ)−∇f^∗(ξ)∣=∣(−im^∗)(N1j=1∑Ne−i(Σ^−1/2ξ)Txj)−(N1j=1∑N(−iΣ^−1/2xj)e−i(Σ^−1/2ξ)Txj)∣. This simplifies to G(ξ)=N1∣j=1∑Ni(Σ^−1/2xj−m^∗)e−i(Σ^−1/2ξ)Txj∣=N1∣j=1∑N(Σ^−1/2xj−m^∗)e−iξT(Σ^−1/2xj)∣.
- Find the Supremum: The index requires finding supξ∈RnG(ξ). For empirical data, this supremum might be challenging to find analytically. Numerical optimization techniques (e.g., gradient ascent on G(ξ)) or sampling over a suitable range of ξ values would be necessary. The optimization is over an n-dimensional space.
- Compute the Index: Once the supremum S=supξ∈RnG(ξ) is found, the empirical scaling-invariant Fourier-based index is Tn(F^∗)=2∣∣m^∗∣∣1S.
Pseudocode for Empirical Calculation:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
import numpy as np from scipy.linalg import sqrtm, inv def compute_multivariate_fourier_inequality_index(data): """ Computes the scaling-invariant multivariate Fourier-based inequality index. Args: data (np.ndarray): A numpy array of shape (N, n) where N is the number of observations and n is the number of dimensions. Assumes data components are non-negative. Returns: float: The calculated inequality index. Returns NaN if mean vector is zero or covariance matrix is singular. """ N, n = data.shape # 1. Estimate Mean and Covariance mean_vec = np.mean(data, axis=0) if np.linalg.norm(mean_vec) == 0: print("Mean vector is zero, index is undefined.") return np.nan cov_mat = np.cov(data.T) # Check for singularity try: cov_inv = inv(cov_mat) cov_inv_sqrt = inv(sqrtm(cov_mat)) except np.linalg.LinAlgError: print("Covariance matrix is singular, cannot compute index.") return np.nan # 2. and 3. Compute Sigma^-1/2 and transformed data points transformed_data = (cov_inv_sqrt @ data.T).T # Shape (N, n) # 6. Compute ||m*|| m_star = cov_inv_sqrt @ mean_vec norm_m_star = np.linalg.norm(m_star) if norm_m_star == 0: # Should not happen if mean_vec is non-zero and cov is non-singular print("Transformed mean vector is zero, index is undefined.") return np.nan # 7. Define the function to maximize: G(xi) = 1/N * | sum_{j=1}^N (x_j^* - m^*) exp(-i xi^T x_j^*) | # where x_j^* = Sigma^-1/2 * x_j def G(xi): xi_vec = np.asarray(xi) # Ensure xi is a numpy array exponents = -1j * (transformed_data @ xi_vec) # Shape (N,) complex_exp = np.exp(exponents) # Shape (N,) # (x_j^* - m^*) terms diff_terms = transformed_data - m_star # Shape (N, n) # Element-wise product and sum over observations sum_terms = np.sum(diff_terms * complex_exp[:, np.newaxis], axis=0) # Shape (n,) return np.linalg.norm(sum_terms) / N # Magnitude of the vector sum # 8. Find the Supremum of G(xi) # This is the most challenging part. A simple approach is to sample randomly. # A more robust approach would involve numerical optimization, e.g., using scipy.optimize.minimize # with a negative objective function, or sampling + local optimization. # For illustration, let's use a simple random sampling approach. num_samples = 1000 # Number of random xi vectors to sample max_G = 0.0 # Determine a reasonable range for xi values based on data scale # A simple heuristic is to scale by the inverse sqrt of variance in transformed space xi_scale = 1.0 / np.sqrt(np.mean(transformed_data**2)) if np.isnan(xi_scale) or np.isinf(xi_scale) or xi_scale == 0: xi_scale = 1.0 # Fallback for _ in range(num_samples): # Sample xi from a distribution, e.g., standard normal scaled by xi_scale random_xi = np.random.randn(n) * xi_scale g_val = G(random_xi) if g_val > max_G: max_G = g_val # Note: Random sampling is an approximation and may not find the true supremum. # For real applications, consider more sophisticated optimization methods. # 9. Compute the Index index = (1 / (2 * norm_m_star)) * max_G return index |
This pseudocode outlines the steps for calculating the empirical index. The main computational challenge lies in finding the supremum in step 8, which requires optimization over an n-dimensional space. The complexity of this optimization depends on the dimension n and the shape of the function G(ξ). For low dimensions, standard optimization algorithms might work. For higher dimensions, approximation techniques or alternative methods to estimate the supremum might be necessary. The paper mentions that for discrete probability measures, the use of the Fourier transform enables "very fast computational procedures" [2, 3], suggesting that Fast Fourier Transform (FFT) based methods might be applicable if the data can be represented on a grid, although this empirical formulation sums over observations directly.
The proposed index offers a theoretically grounded alternative to existing multidimensional inequality measures, explicitly addressing the critical scaling property via its connection to the Mahalanobis distance. Its tractability for distributions with known Fourier transforms (like Gaussian) and its potential for more efficient empirical estimation compared to methods like Lorenz Zonoids make it a promising tool for applications in economics, social sciences, and other fields dealing with multivariate heterogeneity.
Related Papers
- The Divergence Index: A Decomposable Measure of Segregation and Inequality (2015)
- Equivalence of inequality indices: Three dimensions of impact revisited (2023)
- Nested Inequalities Among Divergence Measures (2011)
- A Sequence of Inequalities among Difference of Symmetric Divergence Measures (2011)
- Quantifying redundancies and synergies with measures of inequality (2024)