# Gini coefficient

I’m learning about inequality measures, there are several ways to calculate it and I understand all but one.

$$\kappa = \frac{E|X-X^\prime|}{2E(X)}$$

I’m not sure what the second x means in the case of random variables.

The numerator of the Gini index is the expected value of the difference, in absolute value, between the earnings (if $$x$$ denotes earnings) of two random individuals in the population.
In mathematical terms, the expectation here is taken over two random variables $$x$$ and $$x'$$, taken as independent and identically distributed. If I rewrite the Gini with $$x_1$$ and $$x_2$$ for convenience, and if $$F(.)$$ denotes the cdf of these random variables: $$G = \frac{1}{E(X)}\int \int |x_1 - x_2|\ dF(x_1)\ dF(x_2),$$ where: $$E(X) = \int x \ dF(x).$$
• See also, quite independently of income inequality and so forth, the ideas of $L$-moments. – Nick Cox Sep 24 '18 at 13:23