Difference between revisions of "Gini Index"
From Open Risk Manual
Wiki admin (talk | contribs) |
Wiki admin (talk | contribs) (→Implementations) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== Definition == | == Definition == | ||
− | For the purpose of measuring | + | For the purpose of measuring concentration, the '''Gini Index''' (also Gini coefficient) is an index defined in terms of the Lorentz curve of distribution values. |
== Details == | == Details == | ||
− | More precisely, if we have n | + | More precisely, if we have n values <math>E_i</math> summing up to a total value of |
:<math> | :<math> | ||
E_T = \sum^{n}_{i=1} E_{i} | E_T = \sum^{n}_{i=1} E_{i} | ||
</math> | </math> | ||
− | and the fractional | + | and the fractional value <math>w_i</math> is defined as |
:<math> | :<math> | ||
w_{i} = \frac{E_i}{E_T} | w_{i} = \frac{E_i}{E_T} | ||
Line 14: | Line 14: | ||
:<math> | :<math> | ||
G = 1 + \frac{1}{n} \sum^{n}_{i=1} (1 - 2 i) w_{i} | G = 1 + \frac{1}{n} \sum^{n}_{i=1} (1 - 2 i) w_{i} | ||
+ | </math> | ||
+ | |||
+ | == Alternative Formula == | ||
+ | Gini's ''absolute mean difference'' is defined as | ||
+ | |||
+ | :<math> | ||
+ | \Delta = \frac{1}{n^2} \sum^{n}_{i=1} \sum^{n}_{j=1} | E_i - E_j | | ||
+ | </math> | ||
+ | |||
+ | The relative mean difference is defined as <math>\Delta / \mu</math> where <math>\mu = E_T / n</math> | ||
+ | |||
+ | The Gini index is equivalently given by | ||
+ | |||
+ | :<math> | ||
+ | G = \frac{\Delta}{2 \mu} | ||
</math> | </math> | ||
Line 25: | Line 40: | ||
'''NB: Sometimes the formula appears also with the opposite sign!''' | '''NB: Sometimes the formula appears also with the opposite sign!''' | ||
− | == | + | == Implementation == |
Open Source implementations of the Gini index are available in | Open Source implementations of the Gini index are available in | ||
Latest revision as of 11:26, 17 May 2024
Contents
Definition
For the purpose of measuring concentration, the Gini Index (also Gini coefficient) is an index defined in terms of the Lorentz curve of distribution values.
Details
More precisely, if we have n values summing up to a total value of
and the fractional value is defined as
Then the Gini index is defined as the area under the Lorenz curve which is geometrically reduced to
Alternative Formula
Gini's absolute mean difference is defined as
The relative mean difference is defined as where
The Gini index is equivalently given by
Usage
None
Variations
None
Issues and Challenges
NB: Sometimes the formula appears also with the opposite sign!
Implementation
Open Source implementations of the Gini index are available in
- the R package Ineq
- the Python library Concentration Library