Lably
Skip to content

Diversity index

How many different types are in a dataset

  • 10 min read
  • 6 chapters

Related on Lably

Through Species, Ecology and Demography

When diversity indices are used in ecology, the types of interest are usually species, but they can also be other categories, such as genera, families, functional types, or haplotypes. The entities of interest are usually individual organisms (e.g. plants or animals), and the measure of abundance can be, for example, number of individuals, biomass or coverage. In demography, the entities of interest can be people, and the types of interest various demographic groups. In information science, the entities can be characters and the types of the different letters of the alphabet. The most commonly used diversity indices are simple transformations of the effective number of types (also known as 'true diversity'), but each diversity index can also be interpreted in its own right as a measure corresponding to some real phenomenon (but a different one for each diversity index).

Many indices only account for categorical diversity between subjects or entities. Such indices, however do not account for the total variation (diversity) that can be held between subjects or entities which occurs only when both categorical and qualitative diversity are calculated.

Diversity indices described in this article include:

  • Richness, simply a count of the number of types in a dataset.
  • Shannon index, which also takes into account the proportional abundance of each class under a weighted geometric mean.
    • The Rényi entropy, which adds the ability to freely vary the kind of weighted mean used.
  • Simpson index, which too takes into account the proportional abundance of each class under a weighted arithmetic mean
  • Berger–Parker index, which gives the proportional abundance of the most abundant type.
  • Effective number of species (true diversity), which allows for freely varying the kind of weighted mean used, and has a intuitive meaning.

Some more sophisticated indices also account for the phylogenetic relatedness among the types. These are called phylo-divergence indices, and are not yet described in this article.

Effective number of species or Hill numbers

True diversity, or the effective number of types, refers to the number of equally abundant types needed for the average proportional abundance of the types to equal that observed in the dataset of interest (where all types may not be equally abundant). The true diversity in a dataset is calculated by first taking the weighted generalized mean Mq−1 of the proportional abundances of the types in the dataset, and then taking the reciprocal of this. The equation is:

qD=1Mq−1=1∑i=1Rpipiq−1q−1=(∑i=1Rpiq)1/(1−q)

The denominator Mq−1 equals the average proportional abundance of the types in the dataset as calculated with the weighted generalized mean with exponent q − 1. In the equation, R is richness (the total number of types in the dataset), and the proportional abundance of the ith type is pi. The proportional abundances themselves are used as the nominal weights. The numbers qD are called Hill numbers of order q or effective number of species.

When q = 1, the above equation is undefined. However, the mathematical limit as q approaches 1 is well defined and the corresponding diversity is calculated with the following equation:

1D=1∏i=1Rpipi=exp⁡(−∑i=1Rpiln⁡(pi))

which is the exponential of the Shannon entropy calculated with natural logarithms (see above). In other domains, this statistic is also known as the perplexity.

The general equation of diversity is often written in the form

qD=(∑i=1Rpiq)1/(1−q)

and the term inside the parentheses is called the basic sum. Some popular diversity indices correspond to the basic sum as calculated with different values of q.

Sign in to keep reading

5 more chapters are free with a Lably account.

More in Ecology