Diversity index


A diversity index is a method of measuring how many different types there are in a dataset. Diversity indices are statistical representations of different aspects of biodiversity, which are useful simplifications for comparing different communities or sites.
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, 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, but each diversity index can also be interpreted in its own right as a measure corresponding to some real phenomenon.
Many indices only account for categorical diversity between subjects or entities. Such indices, however do not account for the total variation 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, 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. The true diversity in a dataset is calculated by first taking the weighted generalized mean of the proportional abundances of the types in the dataset, and then taking the reciprocal of this. The equation is:
The denominator equals the average proportional abundance of the types in the dataset as calculated with the weighted generalized mean with exponent. In the equation, is richness, and the proportional abundance of the th type is. The proportional abundances themselves are used as the nominal weights. The numbers are called Hill numbers of order q or effective number of species.
When, the above equation is undefined. However, the mathematical limit as approaches 1 is well defined and the corresponding diversity is calculated with the following equation:
which is the exponential of the Shannon entropy calculated with natural logarithms. In other domains, this statistic is also known as the perplexity.
The general equation of diversity is often written in the form
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.

Sensitivity of the diversity value to rare vs. abundant species

The value of is often referred to as the order of the diversity. It defines the sensitivity of the true diversity to rare vs. abundant species by modifying how the weighted mean of the species' proportional abundances is calculated. With some values of the parameter, the value of the generalized mean assumes familiar kinds of weighted means as special cases. In particular,
Generally, increasing the value of increases the effective weight given to the most abundant species. This leads to obtaining a larger value and a smaller true diversity value with increasing.
When, the weighted geometric mean of the values is used, and each species is exactly weighted by its proportional abundance. When, the weight given to abundant species is exaggerated, and when, the weight given to rare species is. At, the species weights exactly cancel out the species proportional abundances, such that the weighted mean of the values equals even when all species are not equally abundant. At, the effective number of species,, hence equals the actual number of species. In the context of diversity, is generally limited to non-negative values. This is because negative values of would give rare species so much more weight than abundant ones that would exceed.

Richness

Richness simply quantifies how many different types the dataset of interest contains. For example, species richness is simply the number of species, e.g. at a particular site. Richness is a simple measure, so it has been a popular diversity index in ecology, where abundance data are often not available. If true diversity is calculated with, the effective number of types equals the actual number of types, which is identical to Richness.

Shannon index

The Shannon index has been a popular diversity index in the ecological literature, where it is also known as Shannon's diversity index, Shannon–Wiener index, and Shannon–Weaver index. The measure was originally proposed by Claude Shannon in 1948 to quantify the entropy in strings of text. The idea is that the more letters there are, and the closer their proportional abundances in the string of interest, the more difficult it is to correctly predict which letter will be the next one in the string. The Shannon entropy quantifies the uncertainty associated with this prediction. It is most often calculated as follows:
where is the proportion of characters belonging to the th type of letter in the string of interest. In ecology, is often the proportion of individuals belonging to the th species in the dataset of interest. Then the Shannon entropy quantifies the uncertainty in predicting the species identity of an individual that is taken at random from the dataset.
Although the equation is here written with natural logarithms, the base of the logarithm used when calculating the Shannon entropy can be chosen freely. Shannon himself discussed logarithm bases 2, 10 and, and these have since become the most popular bases in applications that use the Shannon entropy. Each log base corresponds to a different measurement unit, which has been called binary digits, decimal digits, and natural digits for the bases 2, 10 and, respectively. Comparing Shannon entropy values that were originally calculated with different log bases requires converting them to the same log base: change from the base to base is obtained with multiplication by.
The Shannon index is related to the weighted geometric mean of the proportional abundances of the types. Specifically, it equals the logarithm of true diversity as calculated with :
This can also be written
which equals
Since the sum of the values equals 1 by definition, the denominator equals the weighted geometric mean of the values, with the values themselves being used as the weights. The term within the parentheses hence equals true diversity, and equals.
When all types in the dataset of interest are equally common, all values equal, and the Shannon index hence takes the value. The more unequal the abundances of the types, the larger the weighted geometric mean of the values, and the smaller the corresponding Shannon entropy. If practically all abundance is concentrated to one type, and the other types are very rare, Shannon entropy approaches zero. When there is only one type in the dataset, Shannon entropy exactly equals zero.
In machine learning the Shannon index is also called as Information gain.

Rényi entropy

The Rényi entropy is a generalization of the Shannon entropy to other values of than 1. It can be expressed:
which equals
This means that taking the logarithm of true diversity based on any value of gives the Rényi entropy corresponding to the same value of.

Simpson index

The Simpson index was introduced in 1949 by Edward H. Simpson to measure the degree of concentration when individuals are classified into types. The same index was rediscovered by Orris C. Herfindahl in 1950. The square root of the index had already been introduced in 1945 by the economist Albert O. Hirschman. As a result, the same measure is usually known as the Simpson index in ecology, and as the Herfindahl index or the Herfindahl–Hirschman index in economics.
The measure equals the probability that two entities taken at random from the dataset of interest represent the same type. It equals:
where is richness. This equation is also equal to the weighted arithmetic mean of the proportional abundances of the types of interest, with the proportional abundances themselves being used as the weights. Proportional abundances are by definition constrained to values between zero and one, but it is a weighted arithmetic mean, hence, which is reached when all types are equally abundant.
By comparing the equation used to calculate λ with the equations used to calculate true diversity, it can be seen that equals, i.e., true diversity as calculated with. The original Simpson's index hence equals the corresponding basic sum.
The interpretation of λ as the probability that two entities taken at random from the dataset of interest represent the same type assumes that the entities are sampled with replacement. If the dataset is very large, sampling without replacement gives approximately the same result, but in small datasets, the difference can be substantial. If the dataset is small, and sampling without replacement is assumed, the probability of obtaining the same type with both random draws is:
where is the number of entities belonging to the th type and is the total number of entities in the dataset. This form of the Simpson index is also known as the Hunter–Gaston index in microbiology.
Since the mean proportional abundance of the types increases with decreasing number of types and increasing abundance of the most abundant type, λ obtains small values in datasets of high diversity and large values in datasets of low diversity. This is counterintuitive behavior for a diversity index, so often, such transformations of λ that increase with increasing diversity have been used instead. The most popular of such indices have been the inverse Simpson index and the Gini–Simpson index. Both of these have also been called the Simpson index in the ecological literature, so care is needed to avoid accidentally comparing the different indices as if they were the same.