Shapley Decomposition of Inequality

Statistics
Introduced by
Anthony Shorrocks (working paper 1999; published 2013)
Year
2013
Type
Axiomatic decomposition procedure
Family
Distributional decomposition

What does it do?

The Shapley decomposition, formalized for distributional analysis by Anthony Shorrocks (Shorrocks, 2013), is a general procedure for attributing an inequality or poverty statistic to its contributing factors, such as income sources, population subgroups, or determinants.

It borrows the Shapley value from cooperative game theory: each factor's contribution is its average marginal effect on the indicator across all possible orders in which factors could be eliminated. The result is an exact, symmetric, residual-free decomposition. It can be applied to any indicator that can be written as a function of the chosen factors, given a defined reference state and elimination convention. This includes indicators such as the Gini coefficient that have no natural analytic decomposition of their own.

The intuition behind the method

Suppose total income inequality depends on several income sources — wages, capital, transfers — and you want to know how much each contributes. The obvious idea is to remove one source and see how much inequality falls, but the answer depends on which sources you have already removed, so the order matters and contributions do not add up. The Shapley value solves this fairness problem exactly as it does when splitting the value of a coalition among players: consider every possible order of eliminating the factors, compute each factor's marginal effect in each order, and average over all orders. By symmetry the order-dependence cancels, the contributions sum exactly to the total, and every factor is treated even-handedly.

History

The Shapley value comes from cooperative game theory, where it allocates a coalition's worth among its players. Its application to distributional analysis is developed by Anthony Shorrocks in Shorrocks (2013), published in the Journal of Economic Inequality (volume 11, issue 1). The bibliographic record also lists 2012, which may reflect an earlier online version. The paper presents a unified framework for distributional decomposition based on the Shapley value.

When to use it

Use the Shapley decomposition when you want to attribute a distributional statistic to several factors that interact, and especially when the indicator has no natural built-in decomposition. Typical uses are decomposing inequality by income source, attributing a poverty or inequality change to determinants (growth, redistribution, prices, demographics), and apportioning inequality to covariates via a regression-based first stage. It is a natural option for the Gini coefficient, which is not additively decomposable, and a way to place several ad hoc decompositions within one principled framework. The cost is computational: an exact Shapley decomposition requires evaluating the indicator over all 2^K factor subsets, so with many factors one uses sampling approximations. Define the reference state and elimination convention carefully, since they determine what the contributions mean.

Limitations and considerations

  • Computationally expensive: an exact decomposition evaluates the indicator over all 2^K factor subsets, so large K requires Monte Carlo approximation.
  • Results depend on the chosen reference state and on how a factor is 'eliminated' (zeroed, set to its mean, etc.), which is a modeling decision.
  • It is an accounting attribution, not a causal decomposition; contributions reflect correlations and the chosen functional form, not structural effects.
  • When factors are defined via a first-stage regression, the decomposition inherits any misspecification or omitted-variable bias of that model.
  • Estimates computed from survey data carry sampling error, which propagates to the factor contributions and should be quantified.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Applies to any distributional indicator that can be written as a function of the chosen factors, including ones like the Gini that have no natural analytic decomposition.
  • Exact and residual-free by the efficiency property, so factor contributions always sum to the total with no leftover interaction term.
  • Symmetric and order-independent: it resolves the path-dependence that plagues naive sequential decompositions.
  • Provides one framework within which several decompositions (by income source, by subgroup, growth versus redistribution) can be expressed.

Applications

  • Decomposing the Gini coefficient or other inequality indices by income source (labor, capital, transfers).
  • Attributing a change in poverty or inequality to growth, redistribution, prices, and demographic shifts within one framework.
  • Apportioning inequality to determinants estimated from a first-stage regression (regression-based Shapley decomposition).
  • Decomposing multidimensional poverty and well-being indices by dimension or indicator.
  • Unifying and benchmarking competing ad hoc decompositions of distributional change in applied studies.

How it works

How it works

1

Begin by writing the target indicator (a Gini coefficient, a Theil index, an FGT poverty measure, or a change in any of them) as a function of a set of factors x_1 through x_K. A factor might be an income source, a population characteristic, or a component such as growth versus redistribution. A reference state is fixed at which the indicator is zero, I(∅) = 0, so that contributions are measured relative to a well-defined baseline.

Formula
I = F(x_1, x_2, \dots, x_K), \qquad I(\varnothing) = 0 \text{ (reference state)}
2

Write F(S) for the value of the indicator when only the factors in S are switched on and all other factors are held at the reference state. For each subset S of factors already present, the marginal contribution of adding factor k is the change F(S ∪ {k}) − F(S). Equivalently, in the elimination formulation, it is how much the indicator falls when factor k is removed from a given configuration. Because this marginal effect generally depends on which other factors are present (the factors interact), a single removal cannot give an order-free attribution.

Formula
\Delta_k(S) = F(S \cup \{k\}) - F(S), \qquad S \subseteq \{1,\dots,K\}\setminus\{k\}
3

The Shapley value assigns to factor k the weighted average of its marginal contributions over all subsets S, with weights equal to the probability that S is exactly the set of factors preceding k when all K! orderings are equally likely. The Shapley value is characterized axiomatically by properties including efficiency (contributions sum to the total), symmetry (factors with identical marginal effects receive equal shares), the null-factor property, and additivity. These properties are why the value is a principled solution to the order-dependence problem in this setting. For two factors, the formula gives C_1 = ½[F({1}) − F(∅)] + ½[F({1,2}) − F({2})] and C_2 = ½[F({2}) − F(∅)] + ½[F({1,2}) − F({1})]. Since F(∅) = 0, the two contributions sum to F({1,2}), which is the full indicator.

Formula
C_k = \sum_{S \subseteq N\setminus\{k\}} \frac{|S|!\,(K-|S|-1)!}{K!}\,\bigl[F(S\cup\{k\}) - F(S)\bigr]
4

By the efficiency property of the Shapley value, the factor contributions sum exactly to the value of the full indicator: the decomposition has no residual and no interaction term left over. This holds for any indicator that fits the framework above, regardless of whether it possesses a natural closed-form decomposition, which is what makes the Shapley approach a general decomposition tool. It can be applied to the Gini, to multidimensional indices, and to changes over time that resist analytic splitting.

Formula
\sum_{k=1}^{K} C_k = F(\{1,\dots,K\}) = I

Common pitfalls

  • Treating Shapley contributions as causal effects of the factors rather than as an order-free accounting attribution.
  • Failing to state the reference and elimination convention, which changes the magnitude of the contributions.
  • Reading contributions as absolute levels rather than as changes relative to the reference state.
  • Using a sampling approximation with too few permutations and reporting point estimates without acknowledging the approximation error.
  • Decomposing by income source while ignoring that the same exercise on a different indicator (Gini vs. Theil) can apportion shares quite differently.

Frequently asked questions

How does the Shapley decomposition differ from the Theil within/between decomposition?

The Theil within/between decomposition splits the index by population subgroups. It is an exact analytic split that exists because the generalized-entropy class is additively decomposable; it works for Theil and the mean log deviation but not for the Gini. The Shapley decomposition is a general procedure that attributes an indicator to factors, such as income sources, by averaging marginal contributions over all elimination orders. It applies to any indicator that can be written as a function of those factors. The two answer different questions: a within/between split is by subgroup, while a Shapley attribution is by factor. Their results should not be compared factor-for-subgroup unless the mapping between them is stated. The main advantage of the Shapley approach is that it extends to indices that have no natural split.

Why is the order of eliminating factors a problem, and how does Shapley solve it?

Because factors interact, the marginal effect of removing one factor depends on which others have already been removed, so different elimination orders give different contributions and a leftover interaction term. The Shapley value removes this arbitrariness by averaging each factor's marginal contribution over all possible orders, weighting each order equally. The averaging makes the result symmetric across factors and, by the efficiency axiom, guarantees the contributions sum exactly to the total with no residual.

Is the Shapley decomposition computationally feasible for many factors?

An exact decomposition requires evaluating the indicator over all 2^K subsets of factors, which is manageable for a handful of factors but grows combinatorially. With many factors, practitioners use Monte Carlo sampling of random permutations to approximate the Shapley contributions, trading exactness for tractability. The approximation error shrinks as the number of sampled permutations grows, so the number of permutations should be reported and checked.

Related methods

Sources

  1. Shorrocks, A. F. (2013). Decomposition procedures for distributional analysis: a unified framework based on the Shapley value. Journal of Economic Inequality, 11(1), 99–126.

    Open DOI reference