Notation: Continuous distributions on $\mathbb{R}_+$

Let $f:\mathbb{R}+ \to \mathbb{R}+$ be a measureable function such that $\int_0^\infty f(x) \mathrm{d}x = 1$. Define its associated cumulative distribution function (cdf):

$$ F(x) = \int_0^x f(\xi) \mathrm{d}\xi $$

and define the quantile function $Q(p)$ to be the value satisfying either of the following implicit equations:

$$ p = \int_0^{Q(p)} f(x) \mathrm{d}x. \quad \text{or} \quad p = F(Q(p)). $$

Differentiating both sides of the second equation with respect to $p$, we have $1 = f(Q(p)) Q'(p)$, so

$$ Q'(p) = \frac{1}{f(Q(p))} $$

The mean of the distribution will be denoted $\mu = \int_0^\infty x f(x) \mathrm{d}x.$


Gini coefficient as “Departure from Equality”

While the original inspiration is different [develop], there is a compelling graphical interpretation of the Gini coefficient.

First, we need a function that summarizes the share of income earned at every percentile. If there are $N$ individuals and $\mu$ is the mean, the total population income is $N \mu$. If we wish to know the total income earned by those at or below the $p$th percentile, then we would look at the Lorenz curve, which is defined as follows:

$$ L(p) = \frac{1}{\mu} \int_0^{Q(p)} \!\!\! x f(x) \mathrm{d}x. $$

(To see this as the fraction of the total income earned by the $p$-percentile and below, multiply the numerator and denominator by $N$.) In terms of the graphical definition of the Gini seen above, note that the area $B$ is given by the integral

$$ B = \int_0^1 L(p) \mathrm{d}p $$

Borrowed temporarily from the Gini Coefficient Wikipedia page.

Borrowed temporarily from the Gini Coefficient Wikipedia page.

Therefore, $G = 1 - 2 \int_0^1 L(p) \mathrm{d} p.$


A formula for the Gini coefficient

Our working model for the evolution of income distributions is best expressed in terms of their CDFs. Therefore it’s nice to have a formula for the Gini written directly in terms of CDFs. The following formula is due to Dorfman (1979).

<aside> <img src="/icons/fleur-de-lis_purple.svg" alt="/icons/fleur-de-lis_purple.svg" width="40px" />

Let $0 < I_* \leq \infty$ be the maximum attainable income. Then,

$$ G = 1 - \frac{1}{\mu} \int_0^{I_*} (1 - F(x))^2 \mathrm{d} x $$

</aside>

Proof. We first introduce the function $M(x) = \int_0^x y f(y) \mathrm{d} y$ and note that $\lim_{x \to I_*} M(x) = \mu$. Under the substitution $x = Q(p)$, so that $\mathrm{d} x = Q'(p) \mathrm{d}p$, we have that $f(y) dy = dp$ and

$$ \begin{aligned} \int_0^1 L(p) \mathrm{d}p &= \frac{1}{\mu}\int_0^1 \left(\int_0^{Q(p)} \!\! \xi f(\xi) \mathrm{d}\xi\right) \mathrm{d}p \\ &= \frac{1}{\mu} \int_0^{I_} \Big(\int_0^x \xi f(\xi) \mathrm{d}\xi\Big) f(x) \mathrm{d}x \\ &= \frac{1}{\mu} \int_0^{I_} M(x) f(x) \mathrm{d} x \end{aligned} $$

Integrating by parts, we have

$$ \begin{aligned} \int_0^1 L(p) \mathrm{d} p &= \frac{1}{\mu} \Big( \lim_{x \to I_} M(x) F(x)\Big) - \frac{1}{\mu} \int_0^{I_} x f(x) F(x) \mathrm{d} x \\ &= 1 - \frac{1}{\mu} \left(\int_0^{I_} x \frac{\mathrm{d}}{\mathrm{d}x}\frac{1}{2}(1 - F(x))^2 \mathrm{d}x + \int_0^{I_} x f(x) \mathrm{d} x\right) \end{aligned} $$

Observing that $\frac{\mathrm{d}}{\mathrm{d} x} \frac{1}{2}(1 - F^2(x)) = -f(x)F(x) +f(x)$ we have that