Birth-death models

How lineages multiply and vanish

Last time

We used a tree to learn about how sequences evolve

But where does the tree come from?

Today: What process grows a tree, and what can a tree of living species tell us about that process?

Lineages that split

Birth-death (BD) models

Every branch of a tree of species is a lineage

  • Each lineage splits in two (speciation, or “birth”) at rate \(\lambda\)
  • Each lineage dies out (extinction, or “death”) at rate \(\mu\)
  • Rates are per lineage, per unit of time (e.g., per million years)
  • When \(\mu = 0\), it’s the pure-birth (or Yule) model1

The same models describe anything that multiplies and dies

  • Cells in a tumor, individuals in a population, infections in an epidemic

One lineage is like one site

In the substitution models exercise, a site waited an exponential time before its next change

A lineage waits an exponential time, with rate \(\lambda\), before it splits

With \(n\) lineages, each with speciation rate \(\lambda\) and extinction rate \(\mu\):

\[ \text{total rate} = n\lambda + n\mu = n(\lambda + \mu) \]

The more lineages there are, the faster new ones appear!

The Gillespie algorithm1

Simulate one event at a time:

  1. Calculate the total rate: \(n(\lambda + \mu)\)
  2. Draw an exponential waiting time using the total rate, and move the clock forward
  3. Choose which event happened:
    • A split, with probability \(\frac{\lambda}{\lambda + \mu}\) (\(n\) goes up by 1)
    • An extinction otherwise (\(n\) goes down by 1)
  4. Repeat until the clock passes the present, or \(n = 0\)

Growing a tree, event by event

Pure-birth simulations and expectations

  • The number of lineages grows exponentially with rate \(\lambda\)
    • When \(\mu > 0\), the exponential growth rate is \(r = \lambda - \mu\)
  • Questions: Why are the curves straight on a log axis? Why do they differ the most near the start?

Adding extinction

How often does a clade die out?

Death rate, \(\mu\) (\(\lambda = 1\)) Extinct by time 5 (simulated) Eventually extinct
0.00 0.00 0.00
0.25 0.23 0.25
0.50 0.49 0.50
0.75 0.70 0.75
1.00 0.82 1.00

A clade that starts with one lineage eventually dies out with probability \(\mu / \lambda\) (when \(\mu < \lambda\))1

Even when splits are twice as common as extinctions, about half of all clades die out

Every clade we study is a survivor

\(\lambda = 1\), \(\mu = 0.5\): 48% of clades are extinct; survivors average 37 lineages

  • That’s about twice the expectation of the BD process (\(e^{rt} \approx 20\))
  • Question: How might studying only the “winners” bias what we learn?
  • This is why phylogenetic BD methods condition on survival

What do we observe?

Complete vs. reconstructed trees

The reconstructed tree1 is what we estimate from data: Sans unsampled extant species and most extinct lineages

Lineages through time

2 lineages at the root, and every split adds one, so all we need are the branching times: the times of the internal nodes

The pull of the present

Both BD models have the same net diversification rate, \(r = \lambda - \mu = 0.5\)

Question: Why does extinction make the LTT plot bend up near the present?

Bent-toed geckos

Cyrtodactylus

Cyrtodactylus

A time-calibrated tree1 of 345 of the 406 described species2; the root is about 52 million years old

Estimating the birth rate

Under pure birth, the maximum likelihood estimate of \(\lambda\) is:

\[ \hat{\lambda} = \frac{n - 2}{L} \]

  • \(n - 2\): the number of splits after the root
  • \(L\): the sum of all branch lengths, the total time lineages had to split
  • So \(\hat{\lambda}\) is splits per lineage per unit of time

We can simulate trees under the model, and ask: Does the gecko tree look like them?

Unsampled species

Every unsampled species removes a split, mostly recent ones, so the LTT plot flattens near the present

The gecko tree is missing at least 61 described species. Question: How many species would a pure-birth model need to explain the gecko tree?

Summary

  • In a birth-death model, each lineage splits at rate \(\lambda\) and dies out at rate \(\mu\)
  • The Gillespie algorithm simulates it one event at a time: total rate → waiting time → which event
  • Lineages grow exponentially, but many clades go extinct, so living clades are a biased sample of “winners”
  • We usually see only the reconstructed tree; extinction leaves a subtle signature in it, the pull of the present
  • An LTT plot summarizes a tree, so we can compare real trees to the model
  • Unsampled species remove recent splits, which flattens an LTT plot near the present

In the exercise

  1. simulate_pure_birth and simulate_birth_death: The Gillespie algorithm
  2. How often do clades go extinct?
  3. plot_final_counts: Your first plot!
  4. get_branching_times: LTT plots and the pull of the present
  5. estimate_birth_rate and simulate_sampled_tree: Lineages of bent-toed geckos through time

Watch for

Under a pure-birth model, how many gecko species are still undescribed?

Exercise

  1. Log into molab
  2. Open the exercise in molab
  3. Click “Fork” button

References

Gillespie, Daniel T. 1977. “Exact Stochastic Simulation of Coupled Chemical Reactions.” The Journal of Physical Chemistry 81 (25): 2340–61. https://doi.org/10.1021/j100540a008.
Grismer, L. Lee, Nikolay A. Poyarkov, Evan S. H. Quah, Jesse L. Grismer, and Perry L. Wood, Jr. 2022. “The Biogeography of Bent-Toed Geckos, Cyrtodactylus (Squamata: Gekkonidae).” PeerJ 10: e13153. https://doi.org/10.7717/peerj.13153.
Kendall, David G. 1948. “On the Generalized ‘Birth-and-Death’ Process.” Annals of Mathematical Statistics 19 (1): 1–15. https://doi.org/10.1214/aoms/1177730285.
Nee, Sean, Robert M. May, and Paul H. Harvey. 1994. “The Reconstructed Evolutionary Process.” Philosphical Transactions of the Royal Society B 344: 305–11. https://doi.org/10.1098/rstb.1994.0068.
Uetz, P., P. Freed, R. Aguilar, F. Reyes, J. Kudera, and J. Hošek. 2026. “The Reptile Database.” https://www.reptile-database.org/.
Yule, George Udny. 1925. “A Mathematical Theory of Evolution, Based on the Conclusions of Dr. J. C. Willis, F.R.S.” Philosphical Transactions of the Royal Society B 213: 21–87. https://doi.org/10.1098/rstb.1925.0002.

Acknowledgements

I drafted and iterated on these slides in collaboration with Anthropic’s Claude (Opus 5.5 model).