The mean and variance of phylogenetic diversity under rarefaction

David A. Nipperess, F. A. Matsen · DOI

Abstract

Phylogenetic diversity (PD) depends on sampling intensity, which complicates the comparison of PD between samples of different depth. One approach to dealing with differing sample depth for a given diversity statistic is to rarefy, which means to take a random subset of a given size of the original sample. Exact analytical formulae for the mean and variance of species richness under rarefaction have existed for some time but no such solution exists for PD. We have derived exact formulae for the mean and variance of PD under rarefaction. We show that these formulae are correct by comparing exact solution mean and variance to that calculated by repeated random (Monte Carlo) subsampling. We also demonstrate the application of the method using two examples: identifying hotspots of mammalian diversity in Australasian ecoregions, and characterising the human vaginal microbiome. The analytical formulae for the mean and variance of PD under rarefaction are both exact and more efficient than repeated subsampling.

Introduction

In biodiversity studies, "sampling effort" is a persistent bias: the more individuals counted or sequences analyzed, the more species are likely to be discovered. To compare sites fairly, ecologists use rarefaction, a technique that involves subsampling larger datasets down to a common size. While exact formulas for species richness have been available since the 1970s, calculating the mean and variance for Phylogenetic Diversity (PD)—the total branch length connecting species in a sample—has traditionally required computationally expensive Monte Carlo simulations. These simulations are not only slow but often fail to converge accurately on the true variance without a massive number of iterations.

Mathematical Framework: The Tree with Marks

To solve this, a generalized framework was developed using a "tree with marks." In this model, "marks" represent observations, such as individual organisms or DNA sequences, placed on the tips or internal edges of a phylogenetic tree.

The core of the derivation relies on the concept of "edge snips". An edge snip is a segment of the tree's branches defined by the locations of marks or nodes. By treating the presence of these snips in a subsample as random variables and applying hypergeometric distribution theory (sampling without replacement), closed-form equations were derived for both rooted and unrooted PD.

Conceptual diagram of a phylogenetic tree with 'marks' (stars) and an 'edge snip' used to derive exact PD formulas.

This approach demonstrates that species richness is a special case of PD where every branch has a unit length and all species connect to a single central point. This mathematical breakthrough allows ecologists to accurately compare the evolutionary history of different communities even when sample sizes vary.

Validation and Empirical Applications

The analytical formulas were validated against 2,000 Monte Carlo iterations using stem counts of woody shrubs from Toohey Forest, Australia. The results showed perfect correspondence, with the analytical solution providing the exact variance that simulations only slowly approached.

The practical utility of these formulas was demonstrated through two case studies:

  1. Australasian Mammals: Rarefaction revealed that raw data can be misleading. While New Guinea initially appeared most diverse, rarefying to a standard of 25 species showed that temperate regions like the Australian Alps actually possess higher phylogenetic diversity relative to their species count.
  2. Human Vaginal Microbiome: In a study of 220 women, the shape of the PD rarefaction curve—now easily calculable—was found to correlate with the Nugent score used to diagnose bacterial vaginosis. This suggests that the rate of evolutionary lineage discovery can serve as a clinical indicator.

Conclusion

The derivation of exact analytical formulas for the mean and variance of PD under rarefaction replaces slow simulations with precise, efficient equations. These tools, implemented in R, allow for rigorous comparison of evolutionary history across samples of varying depths, particularly in high-throughput genomic contexts where simulations are prohibitively slow. Future work will look toward extending these derivations to abundance-weighted metrics, which remain a significant mathematical challenge.

Summary updated

BibTeX
@inproceedings{nipperess2013mean,
  author = {David A. Nipperess and F. A. Matsen},
  title = {{The mean and variance of phylogenetic diversity under rarefaction}},
  booktitle = {Methods},
  year = {2013},
  doi = {10.1111/2041-210x.12042},
}
Figure