Skip to main content
`Ctrl`+`K`

# skbio.diversity.alpha.dominance

skbio.diversity.alpha.dominance(counts, finite=False)

  Calculate Simpson’s dominance index.

  Simpson’s dominance index, a.k.a. Simpson’s \(D\), measures the degree of concentration of taxon composition of a sample. It is defined as:

  \[D = \sum_{i=1}^S{p_i^2}\]

  where \(S\) is the number of taxa and \(p_i\) is the proportion of the sample represented by taxon \(i\).

  Simpson’s \(D\) ranges from 0 (infinite diversity; no dominance) to 1 (complete dominance, no diversity).

  Simpson’s \(D\) can be interpreted as the probability that two randomly selected individuals belong to the same taxon.

  Simpson’s \(D\) may be corrected for finite samples to account for the effect of sampling without replacement. This more accurately represents the above probability when the sample is small. It is calculated as:

  \[D = \frac{\sum_{i=1}^s{n_i(n_i - 1))}}{N(N - 1)}\]

  where \(n_i\) is the number of individuals in the \(i^{\text{th}}\) taxon and \(N\) is the total number of individuals in the sample.

  Simpson’s \(D\) is sometimes referred to as “Simpson’s index”. It should be noted that \(D\) is not a measure of community diversity. It is also important to distinguish \(D\) from Simpson’s diversity index (\(1 - D\)) and inverse Simpson index (\(1 / D\)), both of which are measures of community diversity.

  Discrepancy exists among literature in using the term “Simpson index” and the denotion \(D\). It is therefore important to distinguish these metrics according to their mathematic definition.

  Parameters:
    counts 1-D array_like, int

      Vector of counts.

    finite bool, optional

      If True, correct for finite sampling.

  Returns:
    float

      Simpson’s dominance index.

  See also

  `simpson`

  Notes

  Simpson’s dominance index was originally described in [1].

  References

  [1]

  Simpson, E. H. (1949). Measurement of diversity. Nature, 163(4148), 688-688.