What is Ouroboros ?
Ouroboros is a function which measures the uniformity of a list of frequencies, independently of the size of the list.
- an array of frequencies (counts or proportions values)
- Index: quantifies the uniformity of a list in an unitless scale (0 for min. uniformity, 1 for max. uniformity)
- Indice (option): the minimal number of groups that includes at least 50% of the individuals (between 0 and N/2)
- Index: twice the minimum percentage of values to include in order to reach 50% of individuals
- Index/2: the minimal proportion of groups which includes 50% of individuals
Individuals are evenly distributed among groups: Index = 1, Indice = 3
Individuals are distributed in 1 group: Index = 0, Indice=1
How does Ouroboros work ?
A technical implementation of the function is provided in ouroboros.py.
- sort the list of frequencies in descending order
- accumulate values from the head until 50% individuals are included
- smooth values depending on the final percentage of individuals accumulated
- return the Index (and optionally the Indice) of the list
Why is Ouroboros different ?
Compared to the median, Ouroboros does not cut a list of values in two lists of equal sizes. Instead, the function finds the minimal number of values to sum in order to reach 50% of the distribution.
Compared to a Pearson's chi-squared test, Ouroboros is not a statistic test value. Thus, Ouroboros is simpler to compute and to interpret.
Compared to Diversity indexes, Ouroboros returns percentage values instead of squared values (Gini-Simpson index) or logarithmic values (Shannon index). This choice makes the function easier to interpret since the scale is linear. In addition, Ouroboros will always returns an index of 0 or 1 for the two most extremes cases.
Why the name of the function is Ouroboros ?
Heads and tails of statistic distributions are characteristic elements that can be used to measure equalities.
Ouroboros is the "tail-devouring snake", which describes where "the head bites the tail of a distribution".