# Distribution Score Function

Transparency around the distribution of Sponsor Tokens is critical for **DropShop** users.  Tokens highly concentrated in a few participants may signal to other Participants that the Sponsor is colluding with certain individuals, especially for a lottery which weights tokens heavily.  Then again, it could also mean they are highly rewarding just a few folks whom have truly created a lot value for the brand.  Either way, it gives the Participant a better understanding of the potential weights of theirs vs. other tickets.

There are many indices and coefficients to measure the distribution of numeric values. DropShop utilizes the simple and well-known Gini coefficient. It is often mentioned in world economic news articles and used in the context of how well a nation's wealth is distributed among its population.

The Gini coefficient is defined using the auxiliary curve, called Lorenz curve. In the context of Brand Tokens, the Lorenz curve is defined the following function:

for _x_ in \[0,1],

$$
f(x) =  \frac{ \sum_{\mathrm{R} (p) \leq x} \mathrm{BT} (p) }{\sum_{p} \mathrm{BT} (p)}
$$

where the function BT maps each token holder _p_ to his/her token amount and _R_ to his/her rank ratio from the bottom among all the token holders. Thus the function maps for each _x_ between 0 and 1 the proportion of the token holders who belong to the bottom _x_ of token holders in token amount.

Then, the Gini coefficient is defined:

$$
\textrm{Gini coefficient} = 1 - 2 \times \textrm{Area under the Lorenz curve}
$$

The Gini Coefficient can be also defined graphically. In the figure below, there are two curves, a linear curve and a Lorenz curve.&#x20;

![Linear vs. Lorentz Curve](https://3812897419-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlsfsmRXNlhJaO2JDT72o%2Fuploads%2F1mvPRUQcqy3MMEyB5zjO%2FLorenzCurve.png?alt=media\&token=0895f9fc-2cdc-40fb-91da-bb68b561ab6f)

A linear curve represents the population where the wealth or token is distributed equally. And a Lorenz curve is the curve defined by the function f(_x_) above.

Then the Gini coefficient is defined to be:

$$
\frac{A}{A+B}
$$

A population of perfect (equal) distribution has a Gini coefficient of '0' because the area of A is equal to 0. However, a population with one person having the entire distribution has a Gini coefficient of '1' because the area under the Lorenz curve is equal to 0.
