Madagascar Workshop on Conservation Genetics and Landscape Sustainability
6 October 2026
Foundational scientists to modern thinking on selection versus stochastic processes in molecular evolution
\[\theta = 4N_e\mu\]
Where \(\theta\) is the expected number of differences (per site) between two sequences sampled from the population. \(N_e\) is the effective population size, and \(\mu\) is the mutation rate per site per generation. The 4 sneaks in because we are considering diploid organisms. If we had a haploid population, the equation would be \(\theta = 2N_e\mu\).
\(\pi\) is an estimator of \(\theta\) based on pairwise differences.
\(\theta_W\) is an estimator of \(\theta\) based on the number of segregating sites.
We often try to distinguish mutations from substitutions. A mutation is a change in the DNA sequence that occurs in an individual, while a substitution is a mutation that has become fixed in a population.
The neutral theory predicts that the substitution rate \(\rho\) is equal to the mutation rate \(\mu\) and is independent of population size.
Let \(\mu\) be the mutation rate per site per generation, then the average number of new mutations per generation is \(2N\mu\) in a diploid population.
The probability that a new mutation fixes is \(1/(2N)\) - we are ignoring selection and assuming all mutations have and equally likely chance of not drifting to extinction.
So the substitution rate is:
\[\rho = 2N\mu \times \frac{1}{2N} = \mu\]
A sample of 10 individuals in the present, \(t_0\).
Time runs left to right, into the past.
Each individual draws a parent uniformly at random from the previous generation, independently of every other individual.
This generational sampling assumption is the Wright-Fisher model. It would be appropriate for a monoecious annual plant population.
\[P(\text{share an ancestor 1 generation ago}) = \frac{1}{2N}\]
The first allele picks some parent; the second picks the same one with probability \(1/2N\).
\[P(\text{do not share an ancestor}) = 1 - \frac{1}{2N}\]
\(P(\text{two alleles coalesce in generation } i \mid N)\)
\[P(t=i) = \left( 1 - \frac{1}{2N} \right)^{i-1}\left( \frac{1}{2N} \right)\]
Geometric with \(p = 1/2N\):
\[P(t \mid N) = \left( 1 - \frac{1}{2N} \right)^{i-1}\left( \frac{1}{2N} \right)\]
\[\boxed{\;\mathbb{E}[t] = \frac{1}{p} = 2N\;}\]
\(P(\text{two alleles do not coalesce in } i \text{ generations})\)
\[P(t > i) = \left( 1 - \frac{1}{2N} \right)^{i}\]
\[P(t > i) = \left( 1 - \frac{1}{2N} \right)^{i}\]
Since \(\left( 1 - \frac{1}{2N} \right) \approx e^{-\frac{1}{2N}}\), \(\qquad P(t > i) \approx e^{-\frac{i}{2N}}\)
\[P(t > i) \approx e^{-\frac{i}{2N}} \approx e^{-T}\]
Measuring time in units of \(2N\) generations removes \(N\) from the expression entirely.
\[P(t > i) \approx e^{-T}\]
\[T = \frac{\text{number of generations}}{2N}\]
One coalescent unit \(=2N\) generations.
Everything so far followed a pair. A real sample has \(n\) lineages, and any pair of them can coalesce.
\(P(\text{3 alleles do not coalesce in 1 generation})\)
\[= \left( 1 - \frac{1}{2N} \right) \times \left( 1 - \frac{2}{2N} \right)\]
The second lineage must miss the first; the third must miss both.
\(P(\text{2 alleles do not coalesce in 1 generation})\)
\[= 1 - \frac{1}{2N}\]
\(P(\text{3 alleles do not coalesce in 1 generation})\)
\[= \left( 1 - \frac{1}{2N} \right) \times \left( 1 - \frac{2}{2N} \right)\]
\(P(n \text{ alleles do not coalesce in 1 generation})\)
\[= \left( 1 - \frac{1}{2N} \right) \times \left( 1 - \frac{2}{2N} \right) \times \cdots \times \left( 1 - \frac{n-1}{2N} \right)\]
\[1 - \sum_{i=1}^{n-1}\frac{i}{2N} + \sum_{i<j}\frac{i}{2N}\cdot\frac{j}{2N} - \cdots\]
\[\approx 1 - \frac{1 + 2 + \cdots + (n-1)}{2N}\]
\[P(n \text{ alleles do}) = 1 - P(n \text{ alleles do not})\]
\[= \frac{1 + 2 + \cdots + (n-1)}{2N}\]
Given: \[ 1 + 2 + \cdots + (n-1) = \frac{n(n-1)}{2}, \] \[P(n \text{ alleles do}) = \frac{n(n-1)}{4N}\]
We can now develop an expression for the probability that \(n\) alleles coalesce in an arbitrary generation:
\[ P(n \text{ alleles coalesce in the } i\text{th generation}) \]
\[= \left[ 1 - \frac{n(n-1)}{4N} \right]^{i-1} \frac{n(n-1)}{4N}\]
This fits nicely into the expectation of a geometric distribution again. So, the expected waiting time is the reciprocal of the success probability:
\[\boxed{\;\mathbb{E}[t] = \frac{4N}{n(n-1)}\;}\]
\(\frac{n(n-1)}{2}\) is the number of pairs, so the same result can be written as:
\[= \left[ 1 - \binom{n}{2}\left( \frac{1}{2N} \right) \right]^{i-1} \binom{n}{2}\frac{1}{2N}\]
Each of the \(\binom{n}{2}\) pairs coalesces at rate \(1/2N\).
\[\mathbb{E}[t] = \frac{2N}{\binom{n}{2}}\]
Identical to \(4N/n(n-1)\) — the pair-counting view just makes the mechanism explicit.
As before, the geometric waiting time is well approximated by an exponential once \(N\) is large.
A single pair coalesces at rate
\[T = \frac{1}{2N}\]
per generation.
There are \(n-1\) coalescent events to get from \(n\) lineages to one, and \(\binom{n}{2}\) ways for the next one to happen.
With \(\binom{j}{2} = \frac{j(j-1)}{2}\) pairs available when \(j\) lineages remain:
\[f(T_j) = \frac{j(j-1)}{2}\exp\left\{ -\frac{j(j-1)}{2}T_j \right\}\]
The intervals are independent, so the density of the whole set of waiting times is a product:
\[f(T \mid G) = \prod_{j=2}^{n} \frac{j(j-1)}{2}\exp\left\{ -\frac{j(j-1)}{2}T_j \right\}\]
Each interval is exponential, so its expectation is the reciprocal of its rate:
\[\mathbb{E}[T_j] = \frac{2}{j(j-1)}\]
and the time to the most recent common ancestor is the sum of the intervals:
\[\mathbb{E}[T_{MRCA}] = \mathbb{E}(T_n + T_{n-1} + \cdots + T_2)\]
\[\mathbb{E}[T_{MRCA}] = \sum_{j=2}^{n} \frac{2}{j(j-1)} = 2\sum_{j=2}^{n}\left( \frac{1}{j-1} - \frac{1}{j} \right)\]
The sum telescopes:
\[\mathbb{E}[T_{MRCA}] = 2\left( 1 - \frac{1}{n} \right) \approx 2 \;\text{ coalescent units } = 4N \text{ generations}\]
\(\mathbb{E}[T_{MRCA}] converges to 2\) coalescent units as \(n\) grows
This means that adding more samples does not add much information about deeper coalescent events. Ten lineages should already capture \(2(1-1/10)=1.8\) of the maximum 2.
So far we have the depth of the tree. That can be useful for estimating split times for speciation later on, but for now we only care about counting segregating sites. They occur on branches, so what we need is total branch length.
While \(j\) lineages remain, there are \(j\) branches accumulating length, each for a duration \(T_j\). So
\[\mathbb{E}[L] = \sum_{j=2}^{n} j \; \mathbb{E}[T_j]\]
This takes the form of the nth coalescent before.
Substituting \(\mathbb{E}[T_j] = \dfrac{4N}{j(j-1)}\) generations:
\[\mathbb{E}[L] = \sum_{j=2}^{n} j \times \frac{4N}{j(j-1)} = 4N\sum_{j=2}^{n} \frac{1}{j-1} = 4N\sum_{i=1}^{n-1} \frac{1}{i}\]
\[\boxed{\;\mathbb{E}[L] = 4N a_n, \qquad a_n = \sum_{i=1}^{n-1}\frac{1}{i}\;}\]
The \(j\) in the numerator cancels the \(j\) in \(j(j-1)\) — more lineages means more branches, but proportionally shorter intervals.
Thus, we do not emphasize sampling many individuals within a population.
Under the infinite-sites model, mutations arrive along branches at rate \(\mu\) per generation, independently of the genealogy.
So the number of segregating sites is just a thinned version of the total branch length:
\[\mathbb{E}[S] = \mu\,\mathbb{E}[L] = 4N\mu\,a_n\]
Writing \(\theta = 4N\mu\), the population mutation parameter:
\[\boxed{\;\mathbb{E}[S] = \theta\,a_n\;}\]
\(\theta\) compounds mutation and population size. A large population mutating slowly and a small population mutating fast produce the same spectrum of variation. Your organismal expertise is needed to separate the two.
Rearranging \(\mathbb{E}[S] = \theta a_n\) gives an estimator you can compute from a sequence alignment (Watterson 1975):
\[\boxed{\;\hat\theta_W = \frac{S}{a_n}\;}\]
The SFS counts segregating sites by the number of copies \(i\) of the derived allele in a sample of \(n\). Under the neutral, constant-size coalescent:
\[ \boxed{\;\mathbb E[\xi_i] = \frac{\theta}{i}, \qquad i = 1, \dots, n-1\;} \]
Simulated: \(n=50\), 2 Mb, constant \(N_e=10^4\)
A complication of the unfolded SFS is that errors in polarization can create a heavy tail, which looks like a historical bottleneck or a completed selective sweep.
Both \(\pi\) and \(\theta_W\) estimate \(\theta\), so their difference reflects when evolution deviates from neutrality. Tajima (Tajima 1989) derived the standardization constant that allows the difference to be interpreted as a Z-score, where anything less than about \(-2\) or greater than about \(+2\) is a significant departure from neutrality:
\[ D = \frac{\pi - \theta_W}{\sqrt{\widehat{\mathrm{Var}}(\pi - \theta_W)}} . \]
| \(D\) | SFS shape | Demographic cause (genome-wide) | Selective cause (local) |
|---|---|---|---|
| \(< 0\) | excess rare variants | expansion — or a bottleneck it has recovered from | recent sweep, purifying selection |
| \(\approx 0\) | neutral | constant size | neutral |
| \(> 0\) | excess intermediate | a contraction you are still inside, structure | balancing selection |
20 replicates each; \(n=50\), 2 Mb.
30 replicates, 50 kb windows, \(s=0.05\). Both lines are the same demography — only the sweep differs.
The sweep signature is an SFS skewed to rare variants. Compute \(D\) directly from a folded/unfolded spectrum:
TajimaD <- function(sfs) { # sfs = c(#singletons, #doubletons, ...)
n <- length(sfs) + 1 # number of sampled chromosomes
ss <- sum(sfs) # segregating sites
a1 <- sum(1 / seq_len(n - 1)); a2 <- sum(1 / seq_len(n - 1)^2)
b1 <- (n + 1) / (3 * (n - 1)); b2 <- 2 * (n^2 + n + 3) / (9 * n * (n - 1))
c1 <- b1 - 1/a1; c2 <- b2 - (n + 2)/(a1 * n) + a2/a1^2
e1 <- c1 / a1; e2 <- c2 / (a1^2 + a2)
theta_pi <- sum(sapply(seq_along(sfs), function(i) i*(n-i)*sfs[i])) / choose(n, 2)
theta_w <- ss / a1
(theta_pi - theta_w) / sqrt(e1*ss + e2*ss*(ss-1))
}The SFS counts sites by the number of copies of an allele in one sample. The joint SFS counts them in two samples at once:
\[\xi_{i,j} = \text{number of sites with } i \text{ copies in population A and } j \text{ copies in B}\]
Simulated with msprime: 10 diploids per population, \(N_e = 10^4\), 20 Mb. The recent split is 0.1 coalescent units ago; the old split is 2.
Simulated with msprime (Baumdicker et al. 2022) on the mouse lemur north-vs-south tree. Top: no gene flow. Bottom: gene flow between Ambavala and the ancestor of the two southern populations.
\[\ln L(\Theta) = \sum_{k} m_k \ln p_k(\Theta)\]
Observed folded joint spectra and Hudson’s \(F_{ST}\) for each pair.
Blue arrows: gene flow. Dashed line: gene flow stops (models 8 and 10) or resumes (model 9). Red line: a recent size change in all three populations. Grey: the best model.
.tpl file (the history, written backward in time) plus an .est file (free parameters and search ranges).The Akaike information criterion (Akaike 1974) penalizes each free parameter; Akaike weights turn AIC differences into model probabilities:
\[\text{AIC} = 2k - 2\ln\hat L \qquad\qquad w_i = \frac{e^{-\Delta_i/2}}{\sum_j e^{-\Delta_j/2}}\]
Model 10 estimates and 95% CIs from Tiley et al. (2022) (Table S15), at 3.5 years per generation.
Simulate the best model at its estimates and compare it with the data:
| pair | SNPs observed | SNPs model 10 | \(F_{ST}\) observed | \(F_{ST}\) model 10 |
|---|---|---|---|---|
| Ambatovy × Tsinjoarivo | 635,232 | 650,040 | 0.088 | 0.083 |
| Ambavala × Tsinjoarivo | 601,392 | 604,415 | 0.143 | 0.133 |
| Ambavala × Ambatovy | 708,356 | 708,383 | 0.082 | 0.085 |
fastsimcoal2 reports what the data pin down, given the \(\mu\) fixed in the .tpl file:
| fastsimcoal2 reports | convert with | absolute units |
|---|---|---|
| size \(N\) (gene copies) | \(N_e = N/2\) | diploid individuals |
| time \(T\) (generations) | \(t = T \times g\) | years |
| size and \(\mu\) | \(\theta = 2N\mu = 4N_e\mu\) | expected diversity per site |
| migration \(m\) (per lineage, per generation) | \(N \times m\) | migrants per generation |
The SFS fixes \(N\mu\), \(T\mu\) and \(Nm\), not \(N\), \(T\) and \(m\) separately:
\[\mu \to c\,\mu \quad\Longrightarrow\quad N \to N/c, \qquad T \to T/c, \qquad m \to c\,m \qquad \text{(same likelihood)}\]
Event dates from our model-10 refit across illustrative mutation rates (lines) and generation times.
# our best model-10 replicate, exactly as fastsimcoal2 wrote it
est <- read.table("data/model10_best_fit/10.bestlhoods", header = TRUE)
mu <- 1.52e-8; g <- 3.5
est$Tau_Crash * g # years since the size change ~1,160
est$Theta_NodeS / 2 # diploid Ne of the southern ancestor ~73,500
2 * est$Theta_NodeS * mu # theta per site = 4 Ne mu ~0.0045
est$Tau_Crash / est$Theta_TsinCurr # drift since the crash (coalescent units) ~0.10--foldedSFS).PB 495/595 · Plant Evolutionary Biology · Population Genomics