Biodiversity

Ecology and Ecosystems Fundamentals

Course 1 · Chapter 10 · Biodiversity

Chapter 9 ended with a patchwork of young, middle-aged and old patches, and the idea that a mix of ages gives a place more variety. This chapter asks how to put a number on that variety. Biodiversity, short for biological diversity, is the variety of life at every level: the genes within a species, the species within a community, and the ecosystems within a landscape. You will meet the simple measures ecologists use, see why a plain species count can mislead, find out why bigger areas hold more species, and learn how the theory of island biogeography links a place's size and isolation to its number of species. As before, the maths is light and the ideas are tested in short Python simulations.

What to trust in this chapter
The Python snippets here and in the three exercise solutions were run, and the output in the comments is what Python printed. The counts, rates and areas are invented round figures chosen for practice, not measurements. No random numbers are used, so you should see exactly the same output. The ecological background is written from general knowledge, not fetched from a source for this chapter, so check any real-world example you want to rely on, such as the hotspot, island and nature-reserve examples below, against a current textbook or a national agency.

Three Levels of Variety

When people say “biodiversity”, they usually mean species, but ecologists count variety at three levels.

  • Genetic diversity: the variety of genes within one species. A population with many gene variants is more likely to contain some individuals that cope with a new disease or a hotter summer. Crop varieties, such as the many kinds of apple or potato, are a familiar example.
  • Species diversity: the number and balance of species in a community, which is what most of this chapter measures.
  • Ecosystem diversity: the variety of habitats in a region, such as bog, heath, ancient woodland, estuary and sea cliff within a single stretch of Scottish coast.

Biodiversity is also unevenly spread. It tends to rise towards the tropics, and some areas, often called biodiversity hotspots, hold very large numbers of species found nowhere else. Chapter 5 showed how climate shapes the biomes (see Ecology and Ecosystems Fundamentals 5), and that is a large part of the reason: warm, wet, stable climates generally support more species than cold, dry or highly seasonal ones.

Measuring Species Diversity

The simplest measure is species richness: the number of species found. It is easy to understand, but it treats a species with one individual the same as a species with a thousand. Two sites can have the same richness and very different character. In one, the individuals are spread fairly evenly across the species. In the other, one species makes up nearly everything and the rest are rare. The spread is called evenness.

Indices that combine richness and evenness include two you will meet constantly. Let s be the share of all individuals that belong to one species.

  • Shannon index: H = −∑ s × ln(s). It is 0 when there is one species and rises as species are added or become more even. For S equally common species it equals ln(S), the maximum possible.
  • Simpson index: 1 − ∑ s². It is the chance that two individuals picked at random belong to different species. It is 0 for one species and approaches 1 for many even ones.
  • Evenness: H / ln(S), which runs from near 0 (one species dominates) to 1 (perfectly even).

The snippet below compares two invented meadow samples of 100 plants each. Both hold four species, so richness cannot tell them apart.

import math communities = { "Meadow A": [25, 25, 25, 25], "Meadow B": [85, 5, 5, 5], } print("community richness Shannon H Simpson 1-D evenness") for name, counts in communities.items(): total = sum(counts) shares = [c / total for c in counts] h = -sum(s * math.log(s) for s in shares) simpson = 1 - sum(s * s for s in shares) print(f"{name:10} {len(counts):8} {h:9.2f} {simpson:11.2f} {h / math.log(len(counts)):8.2f}") # Output: # community richness Shannon H Simpson 1-D evenness # Meadow A 4 1.39 0.75 1.00 # Meadow B 4 0.59 0.27 0.42

Both meadows have a richness of 4, but Meadow A has four species equally common (evenness exactly 1.00) while in Meadow B one species supplies 85 of the 100 plants. The Shannon index falls from 1.39 to 0.59 and the Simpson index from 0.75 to 0.27. If you walked across Meadow B you would see mostly one plant. The lesson is that richness alone hides how the individuals are shared out, so good surveys report richness and at least one index. Exercise 1 shows a case where the two disagree about which site is best.

Species richnessShannon indexSimpson index
CountsNumber of speciesSpecies and their balanceSpecies and their balance
Most sensitive toRare speciesRare and common species alikeThe commonest species
Range1 upwards0 upwards (maximum ln S)0 to just under 1
Plain meaningHow many kinds?How uncertain is the next individual?Chance two picks differ

Measurement has a practical snag: you almost never count every individual, so the number of species you find depends on how hard you look. A bigger sample finds more species, especially rare ones. Ecologists therefore compare sites using the same effort, such as the same number of traps, the same plot size or the same minutes of birdsong survey, and they treat counts of rare species with care.

Why Biodiversity Matters

There are practical reasons and ethical ones, and both are worth stating plainly.

  • Ecosystem services: pollination of crops, clean water, flood control from wetlands and floodplains, soil formation, and carbon storage in forests, peat and seas. The nutrient and water cycles of Ecology and Ecosystems Fundamentals 4 are carried out by living things.
  • Stability and resilience: a community with many species, several of which do similar jobs, is more likely to keep working if one is lost, just as a team with several people able to cover a task copes better when someone is off sick. This is often called the insurance effect. Experiments in grassland plots have often found that more diverse plots are more productive and steadier, though results depend on the system.
  • Resources and knowledge: foods, fibres, timber and medicines, and genes that plant and animal breeders draw on. Many medicines began as natural compounds.
  • Intrinsic value: many people feel that other species have a worth of their own, apart from any use to us. That is a values question, not one that data can settle, but it underlies much of conservation.

Bigger Areas, More Species

One of the oldest patterns in ecology is that larger areas hold more species. A square metre of grass holds a handful of plant species, a hectare holds many more, and a whole country holds thousands. The relationship usually follows a power law, the species-area relationship:

S = c × Az

Here S is the number of species, A the area, c a constant for the place and the group of organisms, and z the exponent. On a log-log graph this is a straight line with slope z. For islands, z values are often reported between about 0.2 and 0.35, and lower for samples taken from within one continuous habitat, though the number depends on the group and the region. The snippet uses invented values c = 10 and z = 0.25, and also asks what happens if area is cut to 10% of its size, for example by clearing or by building.

import math c, z = 10, 0.25 print("area (km2) species loss if area cut to 10%") for area in (1, 10, 100, 1000, 10000): species = c * area ** z left = c * (area * 0.1) ** z print(f"{area:10} {species:7.1f} {(1 - left / species) * 100:22.1f}%") a1, a2 = 10, 10000 s1, s2 = c * a1 ** z, c * a2 ** z print("fitted z from two points:", round(math.log(s2 / s1) / math.log(a2 / a1), 2)) # Output: # area (km2) species loss if area cut to 10% # 1 10.0 43.8% # 10 17.8 43.8% # 100 31.6 43.8% # 1000 56.2 43.8% # 10000 100.0 43.8% # fitted z from two points: 0.25

Every tenfold increase in area multiplies the species count by about 1.8 (100.25), so the same tenfold fall in area removes 43.8% of species at every size. This is why losing habitat hurts: a patch left after clearing eventually holds fewer species, even if the patch itself is untouched. The effect is not instant, since species can linger for years before dying out, a delay sometimes called extinction debt. A power law is a simplification, but it is a quick way to estimate the cost of shrinking a habitat. Exercise 2 fits z from data.

Island Biogeography

In the 1960s, the ecologists Robert MacArthur and Edward O. Wilson proposed a theory of island biogeography to explain why islands hold the numbers of species they do. It treats an island as a target for colonists from a mainland species pool, and says that the number of species on it settles at a balance between two opposing rates.

  • Immigration: new species arriving. The rate falls as the island fills, because fewer of the species in the pool are still missing. It is higher for islands near the mainland and lower for far ones.
  • Extinction: species on the island dying out. The rate rises as the island fills, because there are more species to lose and each has fewer individuals. It is higher on small islands and lower on large ones.

Where the two rates meet is the equilibrium number of species. Species keep coming and going, so the list changes over time (turnover) even though the total stays roughly steady. The theory predicts that large near islands hold the most species and small far islands the fewest, with the other two in between. It has been influential, and it also applies to habitat islands such as mountaintops, lakes, isolated woods and nature reserves surrounded by farmland. Real islands also differ in habitat variety, age and history, so the theory is a starting point, not a full explanation.

The model below is the simplest version. With a pool of 100 mainland species and S species present, the number gained each year is i × (100 − S) and the number lost is e × S. The numbers i and e are invented yearly rates: i is higher for a near island, and e is higher for a small one. Setting gains equal to losses gives the equilibrium S = 100 × i / (i + e), which the simulation should approach.

POOL = 100 islands = { "large, near": (0.04, 0.02), "large, far": (0.01, 0.02), "small, near": (0.04, 0.08), "small, far": (0.01, 0.08), } print("island year 10 year 50 year 200 formula") for name, (i, e) in islands.items(): s = 0.0 row = {} for year in range(1, 201): s += i * (POOL - s) - e * s row[year] = s eq = POOL * i / (i + e) print(f"{name:12} {row[10]:7.1f} {row[50]:7.1f} {row[200]:8.1f} {eq:7.1f}") # Output: # island year 10 year 50 year 200 formula # large, near 30.8 63.6 66.7 66.7 # large, far 8.8 26.1 33.3 33.3 # small, near 24.0 33.3 33.3 33.3 # small, far 6.8 11.0 11.1 11.1

Each island climbs towards the value predicted by the formula and has settled there by year 200. The large near island holds 66.7 species and the small far island only 11.1. The small near island and the large far island both reach 33.3, which shows that nearness and size can offset each other. The path differs, though: after 10 years the small near island is well ahead of the large far one (24.0 against 8.8), because a near island is colonised quickly, yet in the end the two hold the same number. Exercise 3 asks how long each island takes to fill. Ideas like these inform conservation choices, such as whether to protect many small reserves or a few large ones, and whether to link reserves with corridors. That so-called SLOSS debate (“single large or several small”) has no single answer, since it depends on which species you most want to protect.

Large, nearLarge, farSmall, nearSmall, far
ImmigrationHighLowHighLow
ExtinctionLowLowHighHigh
Expected speciesMostMiddleMiddleFewest
Real-world stand-inA big wood near other woodsA big remote islandA small copse near a forestA tiny isolated rock or hill-top

Biodiversity and Disturbance

This chapter links back to Ecology and Ecosystems Fundamentals 9. A landscape with disturbance at a moderate rate holds patches of every age, so more kinds of habitat are available, which is one route to higher diversity. It also links to Ecology and Ecosystems Fundamentals 7: where competition is strong and nothing interrupts it, a few species can take over, and diversity falls. Biodiversity is therefore not a fixed property of a place. It is the outcome of area, isolation, climate, history, competition and disturbance acting together.

Common mistakes
Do not equate biodiversity with the number of species alone: it also covers genes and ecosystems, and evenness matters. Do not compare species counts from samples of different sizes or effort. Do not assume more species is always better in every habitat: an open bog or a mountain top is naturally species-poor and valuable for exactly what lives there, and an invasive species can raise a count while lowering its worth. Do not treat the species-area law or the island model as exact predictions: both are simplified, and the figures in the snippets are invented to show how the models behave.

Challenges

Exercise 1

Three invented survey sites have these counts per species: Old wood [30, 22, 18, 12, 10, 8], Hay meadow [20, 18, 15, 14, 12, 11, 10] and Barley field [200, 10, 5, 3, 2, 1, 1, 1]. For each, calculate richness, the Shannon index, the Simpson index and evenness, then print the ranking of the sites by richness, by Shannon and by Simpson. Which site changes position, and what does that say about using richness alone?

📄 View solution
Exercise 2

Six invented islands have areas of 2, 5, 20, 60, 250 and 900 km² and 9, 12, 20, 27, 41 and 59 species. Fit S = c × Az by taking logarithms of both columns and finding the least-squares line (no libraries needed). Print z and c, predict the species on islands of 5, 50 and 500 km², and say what percentage of species the fit predicts you would lose if an island's area were halved and if it were cut to a tenth.

📄 View solution
Exercise 3

Use the island model with a pool of 100 species and the four islands from the chapter (large near: i 0.04, e 0.02; large far: i 0.01, e 0.02; small near: i 0.04, e 0.08; small far: i 0.01, e 0.08). For each island, print the equilibrium and the number of years the island takes to reach 90% of it. Compare the result with the rough formula 2.3 / (i + e). Which island fills fastest, and does that surprise you given that it has the fewest species?

📄 View solution

Quick Reference

  • Biodiversity: variety of life at three levels: genes, species and ecosystems
  • Species richness: the number of species; evenness: how equally individuals are shared among them
  • Shannon index: H = −∑ s × ln(s), maximum ln(S); Simpson index: 1 − ∑ s², the chance two random individuals differ
  • Compare sites with equal sampling effort: bigger samples find more species
  • Ecosystem services: pollination, clean water, flood control, soil and carbon storage; insurance effect: many species protect against loss
  • Species-area relationship: S = c × Az; cutting area to 10% with z = 0.25 removes about 44% of species
  • Island biogeography: species number settles where immigration (higher when near) meets extinction (higher when small); equilibrium = pool × i / (i + e) in the simple model
  • Extinction debt: species loss that lags behind habitat loss
Coming next
Ecology and Ecosystems Fundamentals 11 turns to human impact: habitat loss, invasive species, pollution and climate change, and how the models in this chapter help us understand what is at stake.