The Gini coefficient

Wildon's Weblog 2018-04-11

We define the Gini coefficient of a probability measure p on [0,\infty) with mean \mu by

\displaystyle G = \frac{\mathbb{E}[|X-Y|]}{2 \mu}

where X and Y are independently distributed according to p. Thus G = \frac{1}{2\mu} \int_\Omega |X(\omega) - Y(\omega)| \mathrm{d}p_\omega. Dividing by \mu makes G a dimensionless quantity. The reason for normalizing by 2 will be seen shortly.

The Gini coefficient is a measure of inequality. For instance, if p_x is the probability that a citizen’s wealth is x, then we can sample G by picking two random citizens, and taking the (absolute value of) the difference of their wealths. In

  • Utopia, where everyone happily owns the same (ample) amount, the Gini coefficient is 0;
  • Dystopia, where the ruler has a modest fortune of N units, and the other N-1 `citizens’ have nothing at all, \mu = 1 and the Gini coefficient is \frac{1}{2} \frac{2(N-1)}{N^2} N = 1 - \frac{1}{N};
  • Subtopia, where each serf has 1 unit, and each land-owner has 2 units (plus two serfs to boss around), the mean income is 4/3 and the Gini coefficient is \frac{1}{2} \frac{3}{4} \frac{2. 2N . N}{9N^2} = \frac{1}{6}.

A striking interpretation of G uses the Lorenz curve. Staying with the wealth interpretation, define L(\theta) to be the proportion of all wealth owned by the poorest \theta of the population. Thus L(0) = 0, L(1) = 1 and, since the poorest third (for example) cannot have more than third of the wealth, L(\theta) \le \theta for all \theta. When N is large we can approximate L by the following functions \ell: in

  • Utopia \ell(\theta) = \theta for all \theta;

  • Dystopia \ell(\theta) = 0 if \theta < 1 and \ell(1) = 1;
  • Subtopia \ell(\theta) = \frac{3\theta}{4} if 0 \le  \theta < 2/3 and \ell(\theta) = -\frac{1}{2} + \frac{3\theta}{2} if 2/3 \le \theta \le 1.

Since the area below the curve is 1/6 + 1/6 + 1/12 = 5/12, the orange area is 1/12. This is half the Gini coefficient.

Theorem. G is the area between the Lorenz curve for X and the diagonal.

Proof. Let P be the cumulative density function for X, so \mathbb{P}[X \le x] = P(x). If you are person \omega, and your wealth is x, so X(\omega) = x, then P(X(\omega)) \le \theta if and only if you are in the poorest \theta of the population. Therefore the poorest \theta of the population form the event \{ P(X) \le \theta \}. Their proportion of the wealth is the expectation of X, taken over this event, scaled by \mu. That is

\displaystyle L(\theta) = \frac{\mathbb{E}[X 1_{P(X) \le \theta}]}{\mu}.

The area, I say, under the Lorenz curve is therefore

\begin{aligned} I &= \frac{1}{\mu} \int_0^1 L(\theta) \mathrm{d}\theta \\ &= \frac{1}{\mu} \int_0^\infty \mathbb{E}_X[X 1_{P(X) \le P(y)}] \mathrm{d}P(y)  \\ &= \frac{1}{\mu} \int_0^\infty \mathbb{E}_X[X 1_{X \le y}] \mathrm{d}Py \\ &= \frac{1}{\mu} \mathbb{E}_Y \mathbb{E}_X [X 1_{X \le Y}] \end{aligned}

Now since \mathrm{min}(X,Y) = X 1_{X \le Y} + Y1_{Y \le X} - X 1_{X = Y}, where the event X=Y is assumed to be negligible, it follows from linearity of expectation that \mathbb{E}[\mathrm{min}(X,Y)] = 2 \mathbb{E}[X 1_{X \le Y}]. (Here \mathbb{E} denotes the expectation taken over both random variables.) Substituting we obtain

\displaystyle I = \frac{1}{\mu} \frac{\mathbb{E}[\mathrm{min}(X,Y)]}{2}.

From the identity |X-Y| = X+Y - 2\mathrm{min}(X,Y) then another application of linearity of expectation, and finally the definition of G we get

\begin{aligned}I &= \frac{1}{2\mu} \frac{\mathbb{E}[X+Y - |X-Y|]}{2} \\ &= \frac{1}{2\mu} \frac{2\mu - \mathbb{E}[X-Y]}{2} \\ &= \frac{1}{2} - \frac{G}{2}. \end{aligned}

Therefore G = 2(I - \frac{1}{2}), as claimed.