Species Diversity and Its Measurement

Walk through two forests, each with exactly 100 trees and 10 species. You might assume they are equally diverse. But suppose one forest has 91 trees of a single dominant species, plus nine rare species with one tree each. The other forest has close to 10 trees of every species. Most ecologists — and most organisms living there — would call the second forest "more diverse." Simple species counts (richness) miss this distinction entirely. That is why community ecology needed better tools. This article builds those tools from the ground up. Species diversity matters because it is the currency ecologists use to measure structure, stability, and health of biological communities. It underlies debates about which habitats deserve conservation priority. It also explains why some ecosystems recover quickly from disturbance while others collapse. And it shapes how energy and nutrients move through the food webs that diversity indices help characterize. A single number — a diversity index — lets ecologists compress an entire community's structure into something comparable. This holds across sites, across years, and across taxa. The big picture is that "diversity" is not one thing but at least two things. One is how many species are present (richness). The other is how evenly abundance is distributed among them (evenness). Combining these two axes properly requires indices such as Shannon's H′ and Simpson's D. Each has different sensitivities and different assumptions about what "diversity" should reward. Diversity also has a spatial structure. Robert Whittaker famously partitioned it into alpha (within-site), beta (between-site turnover), and gamma (regional) components. This framework connects directly to the Intermediate Disturbance Hypothesis. It also anticipates how diversity scales with area, the subject taken up in the Species-Area Relationship. This article delivers the mechanics of counting and comparing diversity. It offers precise definitions of richness and evenness. It covers the mathematics and intuition behind Shannon and Simpson indices. It reviews the classic empirical studies that shaped how ecologists think about diversity. And it includes worked numerical examples so the formulas become tools rather than trivia.

Key takeaways
  • Species richness (S) counts species present; evenness (E) describes how equally abundance is distributed among them — diversity depends on both.
  • Shannon's index (H′) is an information-entropy measure sensitive to rare species; Simpson's index (D) reflects the probability two random individuals are different species and is weighted toward common ones.
  • Higher H′ or lower Simpson's dominance index both signal higher diversity, but the two indices can rank the same communities differently.
  • Alpha diversity is local (within-site) diversity; gamma is regional (total) diversity; beta diversity is the turnover or dissimilarity between sites, linking local and regional scales.
  • Rarefaction and sample-size correction are essential because richness estimates rise with the number of individuals sampled, confounding raw comparisons between unequal samples.
  • These metrics quantitatively underpin patterns tied to disturbance regimes and habitat area, setting up richer models of community assembly.
The core insight

Diversity is a two-dimensional property — richness (how many species) crossed with evenness (how equally abundant they are) — and no single number captures a community fully unless you know which dimension it emphasizes.

The core idea

Species richness (S) is simply the count of distinct species in a defined sample or area — the most intuitive but least complete measure of diversity. It says nothing about how abundance is distributed: a community with 20 species where one species makes up 95% of individuals has the same richness as one where all 20 species are equally common, yet ecologically these communities behave very differently. Richness is also acutely sensitive to sample size and sampling effort, since rare species are easy to miss in small samples — a problem addressed later by rarefaction.

Species evenness (E) describes the equitability of the abundance distribution among the species present. A community is maximally even when every species has identical abundance; it is minimally even (maximally dominated) when nearly all individuals belong to one species and the rest are represented by only a few individuals. Evenness is usually expressed as a ratio of an observed diversity index to its maximum possible value given the observed richness, so that evenness itself becomes a normalized quantity between 0 and 1.

Diversity indices combine richness and evenness into a single summary statistic, but different indices weight rare versus common species differently, so they are not interchangeable. The two dominant families in community ecology are entropy-based measures (Shannon's H′, derived from Claude Shannon's information theory) and probability-based measures (Simpson's D, derived from the probability that two randomly drawn individuals belong to different species). A third organizing concept, due largely to Robert H. Whittaker (1960, 1972), partitions diversity across spatial scales into alpha diversity (local, within-habitat diversity), gamma diversity (total diversity of a region encompassing many habitats), and beta diversity (the compositional turnover or dissimilarity between habitats that links alpha to gamma). Grasping these distinctions precisely — rather than treating "biodiversity" as a vague synonym for species-richness — is what separates rigorous community ecology from casual description.

Mechanism — how diversity indices are actually calculated

Step 1: Define the community and sample it. A community is bounded in space (a quadrat, a transect, a watershed) and sampled by counting individuals of each species — via quadrats for plants, mark-recapture or trapping for animals, or point counts for birds. The output is a table of species and their abundances nin_i (or relative abundances pi=ni/Np_i = n_i/N, where NN is the total number of individuals sampled across all SS species).

Step 2: Compute richness. SS is just the number of rows in that table — the count of species with ni≥1n_i \geq 1. Because rare species are undercounted in small samples, SS observed is always a downward-biased estimate of true regional richness unless sampling is exhaustive; this motivates species accumulation curves and rarefaction (discussed below).

Step 3: Compute Shannon's index.

H′=−∑i=1Spiln⁡(pi)H' = -\sum_{i=1}^{S} p_i \ln(p_i)

Each term −piln⁡(pi)-p_i \ln(p_i) is the "surprise" or information content contributed by species ii; summing over all species gives the average uncertainty in the identity of a randomly chosen individual. H′H' is zero when only one species is present (p1=1p_1=1, no uncertainty) and reaches its maximum, ln⁡(S)\ln(S), when all species are equally abundant (pi=1/Sp_i = 1/S for all ii). Shannon's index is disproportionately sensitive to rare species because the natural log term grows sharply (in magnitude) as pip_i shrinks toward zero, even though each rare species' overall contribution to the sum is small — the index effectively rewards richness contributed by species that are individually uncommon.

Step 4: Compute Simpson's index.

D=∑i=1Spi2D = \sum_{i=1}^{S} p_i^2

This DD is the probability that two individuals drawn at random (with replacement) from the community belong to the same species — it is a dominance index, so it decreases as diversity increases. Ecologists therefore typically report either Simpson's diversity index, 1−D1-D (the probability the two individuals are different species), or the Simpson reciprocal index, 1/D1/D. Because DD squares the proportions pip_i, it weights common species heavily — a single dominant species with p1=0.9p_1=0.9 contributes 0.810.81 to DD almost by itself, so Simpson's index is comparatively insensitive to the presence or absence of rare species compared to Shannon's H′.

Step 5: Standardize for evenness. Given an observed H′H' and the maximum possible value Hmax′=ln⁡(S)H'_{max} = \ln(S) for that richness, Shannon evenness is:

EH=H′ln⁡(S)E_H = \frac{H'}{\ln(S)}

EHE_H ranges from near 0 (one species dominates almost totally) to 1 (perfectly even community). Analogous evenness measures exist for Simpson's index. This step is what lets ecologists disentangle whether two communities differ in diversity because they differ in richness, in evenness, or both.

Step 6: Partition across spatial scales (Whittaker's framework). Alpha diversity (α\alpha) is computed exactly as above for one local sample/habitat. Gamma diversity (γ\gamma) is computed the same way but pooling all individuals across every habitat in the region. Beta diversity (β\beta) is then derived as the relationship between the two. Whittaker's original multiplicative formulation was:

γ=αˉ×β\gamma = \bar\alpha \times \beta

so that β=γ/αˉ\beta = \gamma / \bar\alpha — beta diversity is the factor by which regional richness exceeds the average local richness, interpretable as the "effective number of distinct communities" in the region. An additive formulation, γ=αˉ+β\gamma = \bar\alpha + \beta, is also widely used, especially when working with Shannon-type or Simpson-type effective-number diversities rather than raw species counts. High beta diversity signals strong compositional turnover — different sites share few species — while low beta diversity signals that most local communities are compositionally similar subsets of the same regional pool.

Figure
Richness vs. evenness: two communities, same S, different H′
Community A (uneven) Community B (even) Sp1 0.70 Sp2 0.10 Sp3 0.08 Sp4 0.06 Sp5 0.06 Sp1 0.20 Sp2 0.20 Sp3 0.20 Sp4 0.20 Sp5 0.20 S = 5, H′ ≈ 0.94, E ≈ 0.58 S = 5, H′ ≈ 1.61, E = 1.00
Figure
Alpha, beta, and gamma diversity across a landscape
Whittaker's diversity partition Habitat 1 (grassland) α₁: S = 2 Habitat 2 (forest edge) α₂: S = 3 Habitat 3 (wetland) α₃: S = 2 mean α ≈ (2+3+2)/3 = 2.33 γ (whole region, all species pooled) = 8 β = γ / mean α ≈ 8 / 2.33 ≈ 3.4 High β: little species overlap between habitats → strong turnover

The evidence — how ecologists established these measures and their behavior

The evidence for diversity indices is not a single dramatic experiment like Griffith's transformation assay; it is a convergence of theoretical derivation, field validation, and comparative studies showing that richness alone systematically misleads and that entropy/probability-based indices better track ecologically meaningful differences between communities.

Claude Shannon (1948) derived the entropy formula H=−∑pilog⁡piH = -\sum p_i \log p_i as a measure of information content or uncertainty in a communication signal, entirely outside biology. Ecologists — most notably in application by Robert MacArthur and others in the 1950s–60s — recognized a direct analogy: predicting the species identity of the next individual sampled from a community is formally identical to predicting the next symbol in a message. This borrowing was validated ecologically by demonstrating that H′H' behaves exactly as required: it increases monotonically with both richness and evenness, reaches a rigorously provable maximum (ln⁡S\ln S) at perfect evenness, and can be partitioned additively across hierarchical samples (a property essential for the alpha/beta/gamma framework). The mathematical proof that H′≤ln⁡(S)H' \leq \ln(S), with equality only when all pip_i are equal, follows from Jensen's inequality applied to the concave logarithm function — this is not an empirical finding but a provable property, and it is what guarantees Shannon's index behaves sensibly as an evenness-sensitive diversity measure.

Edward H. Simpson (1949), a British statistician, derived his index while studying measures of concentration/heterogeneity in categorical data (his paper, "Measurement of Diversity," published in Nature, was written for general classification problems, not specifically ecology, but was rapidly adopted by ecologists). The probabilistic derivation is exact and simple: for two individuals drawn without replacement from a finite community of size NN with nin_i individuals of species ii, the exact probability both are the same species is

D=∑ini(ni−1)N(N−1)D = \sum_i \frac{n_i(n_i-1)}{N(N-1)}

which converges to ∑pi2\sum p_i^2 as N→∞N \to \infty. This exact formulation is used when sample sizes are small, since the large-sample approximation slightly overestimates dominance for small NN.

Robert H. Whittaker's field studies of plant communities along elevational and moisture gradients in the Siskiyou Mountains and Great Smoky Mountains (1950s–1960s) provided the empirical foundation for the alpha–beta–gamma partition. Whittaker sampled vegetation along transects crossing multiple community types (from valley forests to exposed ridgetops) and found that no single local sample captured regional richness — different elevational bands and moisture regimes held largely non-overlapping sets of plant species. This turnover, which he termed beta diversity, was not noise; it was a systematic, gradient-structured pattern that scaled predictably with environmental distance. Whittaker showed that gamma diversity (the pooled richness across his whole transect) vastly exceeded any single alpha sample, and that the ratio between them (beta) was itself a reproducible, comparable quantity across mountain ranges — establishing that "how many species are in this one place" and "how many species exist across this whole region" are genuinely different, measurable properties requiring different sampling designs.

The rarefaction problem, formalized by Howard Sanders (1968) in marine benthic ecology and later corrected mathematically by Stuart Hurlbert (1971), demonstrated empirically that raw species counts from unequal sample sizes are not comparable: larger samples mechanically accumulate more species even from an identical underlying community, simply by chance of encountering rare individuals. Sanders' original rarefaction method had a subtle statistical bias (it used sampling without replacement incorrectly), which Hurlbert corrected with an unbiased estimator for the expected number of species in a random subsample of size nn drawn from a larger sample of NN individuals:

E(Sn)=∑i=1S[1−(N−nin)(Nn)]E(S_n) = \sum_{i=1}^{S} \left[1 - \frac{\binom{N-n_i}{n}}{\binom{N}{n}}\right]

This equation gives, for each species ii, the probability that at least one individual of that species appears in a random subsample of size nn, summed over all species to give expected richness at standardized sample size. Hurlbert's correction is now the standard method — it is the formal proof, not just a rule of thumb, that comparing raw SS values across differently sized samples is statistically invalid unless rarefied to a common sample size.

Worked examples

Example 1 — Comparing two bird communities with the same richness but different structure. Two forest plots are surveyed by point-count, each yielding exactly 5 species and 200 individuals total. Plot X (heavily dominated by one species):

Speciesnp
A1600.80
B200.10
C100.05
D60.03
E40.02

Plot Y (more even):

Speciesnp
A600.30
B500.25
C450.225
D300.15
E150.075

Shannon's H′ for Plot X:

HX′=−[0.80ln⁡0.80+0.10ln⁡0.10+0.05ln⁡0.05+0.03ln⁡0.03+0.02ln⁡0.02]H'_X = -[0.80\ln0.80 + 0.10\ln0.10 + 0.05\ln0.05 + 0.03\ln0.03 + 0.02\ln0.02]
=−[0.80(−0.223)+0.10(−2.303)+0.05(−2.996)+0.03(−3.507)+0.02(−3.912)]= -[0.80(-0.223) + 0.10(-2.303) + 0.05(-2.996) + 0.03(-3.507) + 0.02(-3.912)]
=−[−0.178−0.230−0.150−0.105−0.078]=0.742= -[-0.178 - 0.230 - 0.150 - 0.105 - 0.078] = 0.742

Shannon's H′ for Plot Y:

HY′=−[0.30ln⁡0.30+0.25ln⁡0.25+0.225ln⁡0.225+0.15ln⁡0.15+0.075ln⁡0.075]H'_Y = -[0.30\ln0.30 + 0.25\ln0.25 + 0.225\ln0.225 + 0.15\ln0.15 + 0.075\ln0.075]
=−[0.30(−1.204)+0.25(−1.386)+0.225(−1.492)+0.15(−1.897)+0.075(−2.590)]= -[0.30(-1.204)+0.25(-1.386)+0.225(-1.492)+0.15(-1.897)+0.075(-2.590)]
=−[−0.361−0.347−0.336−0.285−0.194]=1.522= -[-0.361-0.347-0.336-0.285-0.194] = 1.522

Maximum possible H′H' for S=5S=5 is ln⁡(5)=1.609\ln(5) = 1.609.

EX=0.742/1.609=0.46EY=1.522/1.609=0.95E_X = 0.742/1.609 = 0.46 \qquad E_Y = 1.522/1.609 = 0.95

Simpson's DD (dominance):

DX=0.802+0.102+0.052+0.032+0.022=0.64+0.01+0.0025+0.0009+0.0004=0.654D_X = 0.80^2+0.10^2+0.05^2+0.03^2+0.02^2 = 0.64+0.01+0.0025+0.0009+0.0004=0.654
DY=0.302+0.252+0.2252+0.152+0.0752=0.09+0.0625+0.0506+0.0225+0.0056=0.231D_Y = 0.30^2+0.25^2+0.225^2+0.15^2+0.075^2=0.09+0.0625+0.0506+0.0225+0.0056=0.231

Diversity (1−D): 1−DX=0.3461-D_X = 0.346; 1−DY=0.7691-D_Y = 0.769.

Interpretation: Both plots have identical richness (S=5S=5), yet Plot Y is clearly more diverse by every metric that accounts for evenness — nearly double the Shannon index, evenness close to 1 versus 0.46, and Simpson diversity more than double. This is the exact scenario that motivates using H′ or (1−D) rather than S alone: richness alone would have reported these communities as equally diverse, which is ecologically misleading. Note also that Simpson's D punishes Plot X's dominance more severely in relative terms (D nearly triples between Y and X) than Shannon's H′ does, illustrating Simpson's greater sensitivity to the single dominant species.

Example 2 — Alpha, beta, and gamma diversity across three wetland patches. Three isolated wetland patches are surveyed for macroinvertebrates:

SpeciesPatch 1Patch 2Patch 3
Mayfly4000
Caddisfly30150
Damselfly02510
Snail01035
Leech0020

Alpha diversity (richness per patch): α1=2\alpha_1 = 2, α2=3\alpha_2 = 3, α3=3\alpha_3 = 3. Mean alpha: αˉ=(2+3+3)/3=2.67\bar\alpha = (2+3+3)/3 = 2.67. Gamma diversity (pooled across all patches): species present anywhere = {Mayfly, Caddisfly, Damselfly, Snail, Leech} → γ=5\gamma = 5. Beta diversity (Whittaker's multiplicative form):

β=γ/αˉ=5/2.67=1.87\beta = \gamma/\bar\alpha = 5/2.67 = 1.87

Interpretation: A beta value of 1.87 means the region effectively contains almost twice as many distinct "community types" as the average single patch holds species — substantial turnover, driven here by each patch having a largely non-overlapping species set (only Caddisfly and Damselfly are shared between adjacent patches; Mayfly and Leech are each confined to a single patch). If instead all three patches had held the identical five species in identical proportions, αˉ\bar\alpha would equal γ=5\gamma = 5 and β\beta would equal 1 — the theoretical minimum, indicating zero turnover. This numerical exercise shows concretely why beta diversity is often interpreted as "the number of effectively distinct communities" in a landscape and why conservation planning that protects only one patch, however species-rich locally, can still fail to protect regional (gamma) diversity — a concern that becomes sharper once diversity is related explicitly to sampled area.

Common misconceptions & traps

MisconceptionWhy it's wrong
"More species = automatically more diverse"Diversity depends on evenness too; a species-rich but heavily dominated community can have lower H′/lower diversity than a less rich but more even one.
"Shannon and Simpson indices always agree on ranking"They weight rare vs. common species differently; a community can rank higher on H′ but lower on Simpson diversity than another, especially when rare-species counts differ.
"Raw richness counts from different-sized samples are directly comparable"Larger samples mechanically detect more species; comparisons require rarefaction to a common sample size (Hurlbert 1971).
"Beta diversity is just 'the number of extra species outside one site'"Beta is formally a ratio or difference relating gamma to mean alpha, quantifying compositional turnover, not merely a species tally.
"A diversity index of zero means the habitat is empty"H′ = 0 occurs whenever only one species is present, however abundant — it reflects total dominance, not absence of life.
"Diversity indices measure ecosystem health directly"They measure a statistical property of the abundance distribution; high diversity can also reflect degraded, homogenized, or invaded systems depending on which species are present.

The scientist behind it

Robert Harding Whittaker was an American plant ecologist whose gradient-based field surveys transformed how ecologists think about diversity across spatial scales. Trained at the University of Illinois and working for much of his career at Cornell University, Whittaker rejected the then-dominant idea that plant communities were discrete, sharply bounded units (the "community-unit" concept associated with Frederic Clements). Instead, through painstaking transect sampling across elevational and moisture gradients, he showed that species composition changes continuously — a view now called the individualistic or continuum concept, developed alongside Henry Gleason's earlier, largely dismissed proposals. It was this gradient-based, continuous view of community change that led Whittaker naturally to ask how much turnover occurs across a landscape, producing the alpha/beta/gamma framework as a direct, quantifiable consequence of his broader theoretical stance.

Origins · 1 minRobert Harding Whittaker and how this was discovered
RH
Robert Harding Whittaker
1920–1980 · American plant ecologist, Cornell University, pioneer of gradient analysis and the alpha/beta/gamma diversity framework

History
- 1948 — Claude Shannon publishes the mathematical theory of communication, introducing entropy H as a measure of information/uncertainty.
- 1949 — Edward H. Simpson publishes "Measurement of Diversity" in Nature, deriving the probability-of-identity index later named for him.
- 1956–1960 — Robert Whittaker conducts gradient transect surveys in the Great Smoky Mountains and Siskiyou Mountains, documenting systematic species turnover.
- 1960 — Whittaker formally proposes the alpha, beta, gamma diversity terminology in his review of vegetation classification.
- 1971 — Stuart Hurlbert publishes the corrected, statistically unbiased rarefaction estimator, resolving Sanders' 1968 method's bias.

Where this matters today

Diversity indices are now standard tools across applied ecology and biomedicine, not just academic community ecology. In conservation planning, agencies use rarefaction-corrected richness and Shannon/Simpson indices to compare candidate reserve sites fairly despite unequal survey effort, and beta-diversity calculations directly inform whether protecting several small, compositionally distinct patches captures more regional (gamma) diversity than one large uniform reserve — a question with direct funding and land-acquisition consequences. In agriculture and soil science, microbial community diversity (measured via Shannon/Simpson indices applied to sequencing read abundances) is used as a biomarker of soil health, with declining evenness often signaling degradation before richness loss becomes detectable. In human microbiome research, gut microbial alpha diversity (commonly Shannon's H′ or the Chao1 richness estimator) is routinely reported in clinical studies; reduced alpha diversity is associated with conditions including inflammatory bowel disease and Clostridioides difficile infection susceptibility, while beta diversity metrics (such as Bray-Curtis or UniFrac dissimilarity, conceptual descendants of Whittaker's beta) quantify how disease, diet, or antibiotic exposure shift community composition between individuals or across time. In fisheries and water-quality monitoring, Simpson's and Shannon's indices applied to benthic invertebrate or fish community samples serve as regulatory biomonitoring tools, since declining evenness (often before richness loss) can be an early warning of pollution stress. And in restoration ecology, tracking alpha diversity recovery over time after disturbance, alongside beta diversity relative to reference sites, gives quantitative success criteria for whether a restored habitat is converging on target community structure — extending naturally into questions of how diversity scales with the area restored.

Ask the tutor: How does beta diversity connect quantitatively to the species-area relationship when comparing nested versus disjunct habitat patches?

Why do Shannon's and Simpson's indices sometimes rank the same two communities differently?

Shannon's H′ uses a logarithmic weighting (−pᵢln pᵢ) that grows sharply for small pᵢ, making it disproportionately sensitive to the presence of rare species, even though each rare species contributes only a small amount to relative abundance. Simpson's D squares each pᵢ, so a single abundant species with a large pᵢ dominates the sum almost entirely; Simpson's index is comparatively insensitive to whether a handful of additional rare species are present or absent. Consequently, a community with a long tail of very rare species can score high on Shannon diversity but relatively unchanged on Simpson diversity compared to a community lacking those rare species — the indices are measuring genuinely different aspects of the abundance distribution, not just different scalings of the same underlying quantity.

Is higher diversity always ecologically "better"?

Not necessarily. Diversity indices are statistical descriptions of an abundance distribution, not direct measures of ecosystem function, stability, or conservation value. A disturbed or invaded habitat can sometimes show elevated diversity indices if invasive species add to richness without yet dominating abundance, while a pristine but naturally low-diversity habitat (an arctic tundra, a hot spring) can have very low H′ despite being ecologically intact and worth conserving. Diversity indices are best interpreted alongside information on species identity, function, rarity status, and disturbance history — not treated as a self-sufficient proxy for ecosystem health.

Why is rarefaction necessary before comparing richness between two sites?

Species accumulation is a function of sampling effort: the more individuals you sample, the more likely you are to encounter species that are rare or patchily distributed, so raw richness (S) rises with sample size N even from a single unchanging community. If site A is sampled with 500 individuals and site B with 5,000, B will typically show higher S simply due to greater sampling effort, not necessarily greater underlying diversity. Rarefaction resamples the larger dataset down to the smaller sample size (using Hurlbert's 1971 unbiased estimator) to generate an expected richness at equal effort, allowing a fair comparison. Modern extensions (e.g., Chao richness estimators) also extrapolate to estimate asymptotic total richness beyond the sampled individuals.

How does beta diversity relate to the Intermediate Disturbance Hypothesis?

The Intermediate Disturbance Hypothesis predicts that local (alpha) diversity peaks at intermediate disturbance frequency or intensity because it prevents both competitive exclusion by a few dominant species (at low disturbance) and the elimination of most species by extreme conditions (at high disturbance). Beta diversity adds a spatial dimension: if disturbance regimes vary in intensity or timing across a landscape's patches, each patch can settle into a different point along the intermediate-disturbance curve, producing distinct local species compositions and therefore elevated turnover (beta) across the region. Heterogeneous disturbance across a landscape can thus boost gamma diversity both by maximizing alpha in individual patches and by increasing beta diversity between them.

What is the difference between the multiplicative and additive partitioning of diversity?

Whittaker's original multiplicative model states γ = ᾱ × β, so beta is a dimensionless ratio interpretable as "the effective number of distinct communities" comprising the region — a beta of 3 means the region behaves like three non-overlapping alpha-diversity-equivalent communities. An alternative additive model states γ = ᾱ + β, more natural when working with Shannon or Simpson diversity expressed as "effective number of species" (Hill numbers), because it keeps beta on the same additive scale as alpha and gamma. Both are mathematically valid; the choice depends on whether the diversity measure being partitioned behaves multiplicatively (raw richness) or additively (certain transformed indices), and ecologists should state which convention they are using since the numerical value of beta differs between them.

Can a diversity index be calculated for something other than species, like genes or habitat types?

Yes — the mathematics of Shannon's H′ and Simpson's D are general information/probability measures and apply to any categorical abundance distribution, not only species counts. Ecologists and biologists routinely apply the same formulas to genetic diversity (allele frequencies within a population), functional trait diversity (proportions of species falling into different functional guilds), habitat diversity (proportions of land cover types in a landscape), and even microbiome sequencing data (relative abundances of operational taxonomic units or amplicon sequence variants). The underlying logic — reward both the number of categories and the evenness of their representation — transfers directly, which is why these formulas appear across genetics, landscape ecology, and molecular microbiology, not just classical community ecology.

Why does Simpson's index use pᵢ² rather than some other exponent?

The squared term arises directly from probability theory: if pᵢ is the probability of drawing a species-i individual on one draw, then pᵢ² is the probability of drawing species i on both of two independent draws (or, more precisely for finite populations, the exact combinatorial probability using nᵢ(nᵢ−1)/N(N−1)). Summing pᵢ² across all species gives the total probability that two random draws match in species identity — this is a rigorously derived probability, not an arbitrary choice of exponent, which is why D has a clean, exact statistical interpretation as a "probability of identity" measure, distinguishing it from the more purely information-theoretic derivation behind Shannon's H′.

Before this

Where this leads