# Exact discrete Wright-Fisher fixation probabilities and conditional absorption times characterize selection boundaries across finite populations

## Summary

Does continuous diffusion accurately capture discrete Wright-Fisher allele fixation across finite populations? Solving exact absorbing Markov chains reveals that Kimura's diffusion approximation systematically overestimates single-mutant fixation probability, with relative error scaling from {{R1.err_s01_n100}}% at selection coefficient {{R1.s_weak}} in population size {{R1.n_large}} to {{R1.err_s10_n20}}% at selection coefficient {{R1.s_strong}} in population size {{R1.n_small}}. Using Doob $h$-transforms, conditional absorption times demonstrate trajectory time symmetry: fixation times for deleterious and beneficial alleles differ by at most {{R2.max_tau_diff_pct}}% across all evaluated populations and selection coefficients up to {{R1.s_mod}}. In the neutral limit, discrete fixation probabilities match the theoretical inverse population size with residual {{R3.neutral_res_max}}, and conditional absorption time for population size {{R1.n_large}} reaches {{R3.tau_neutral_n100}} generations, within {{R3.max_diff_kimura_ohta_pct}}% of the asymptotic bound of {{R3.kimura_ohta_bound_n100}} generations.

## Claims

- **C1:** In finite Wright-Fisher populations, exact absorbing Markov chain solutions establish that Kimura's continuous diffusion approximation systematically overestimates single-mutant fixation probability, with relative error scaling from {{R1.err_s01_n100}}% at weak selection and population size {{R1.n_large}} to {{R1.err_s10_n20}}% at strong selection and population size {{R1.n_small}}.
- **C2:** Conditional on fixation, Doob h-transformed discrete absorption times prove near-exact trajectory time symmetry between deleterious and beneficial alleles, with mean conditional fixation times differing by at most {{R2.max_tau_diff_pct}}% across all evaluated populations and selection coefficients up to {{R1.s_mod}}.
- **C3:** In the neutral limit, discrete Wright-Fisher fixation probability matches the theoretical inverse population size with an absolute residual of {{R3.neutral_res_max}}, and conditional fixation time for population size {{R1.n_large}} reaches {{R3.tau_neutral_n100}} generations, converging within {{R3.max_diff_kimura_ohta_pct}}% of the asymptotic bound of {{R3.kimura_ohta_bound_n100}} generations.

## Methods

### Discrete Wright-Fisher Markov chain formulation

We consider a haploid or diploid monoecious population of effective size $N$ with discrete non-overlapping generations under Wright-Fisher binomial sampling ([Haldane (1927)](doi:10.1017/s0305004100011463); [Kimura (1962)](doi:10.1093/genetics/47.6.713)). Let $X_t \in \{0, 1, \dots, N\}$ denote the copy number of a mutant allele $A$ at generation $t$. Under constant directional selection with selection coefficient $s \in (-1, \infty)$, the frequency of allele $A$ among gametes contributing to generation $t+1$ is given by:

$$
p'_i = \frac{i(1 + s)}{N + i s}, \quad i \in \{0, \dots, N\}
$$

Transition probabilities $P_{i,j} = \mathbb{P}(X_{t+1} = j \mid X_t = i)$ follow the binomial distribution:

$$
P_{i,j} = \binom{N}{j} (p'_i)^j (1 - p'_i)^{N - j}
$$

The boundary states $0$ (loss) and $N$ (fixation) are absorbing, so $P_{0,0} = P_{N,N} = 1$, and states $\{1, \dots, N-1\}$ are transient.

### Exact absorption probabilities

Let $u_i = \mathbb{P}(X_\infty = N \mid X_0 = i)$ denote the probability that allele $A$ eventually fixes given an initial frequency $i/N$. By first-step analysis:

$$
u_i = \sum_{j=1}^{N-1} P_{i,j} u_j + P_{i,N}, \quad i \in \{1, \dots, N-1\}
$$

In matrix form, $(I - Q) \mathbf{u} = \mathbf{r}$, where $Q = [P_{i,j}]_{i,j=1}^{N-1}$ is the sub-stochastic transition matrix between transient states and $r_i = P_{i,N}$. Since $Q$ is strictly sub-stochastic, $I - Q$ is an $M$-matrix and invertible. We compute $\mathbf{u}$ using Gaussian elimination with partial pivoting.

For comparison, Kimura's continuous diffusion approximation ([Kimura (1962)](doi:10.1093/genetics/47.6.713)) gives the fixation probability of a single mutant ($i = 1$) as:

$$
u_{\text{diff}}(p) = \frac{1 - e^{-2 s}}{1 - e^{-2 N s}}, \quad \text{with } p = \frac{1}{N}
$$

In the neutral limit $s \to 0$, $u_{\text{diff}}(1/N) = 1/N$.

### Conditional time to fixation via Doob h-transform

To determine the mean time until fixation conditioned on the event that fixation occurs ($X_\infty = N$), we construct the conditioned Markov chain via Doob $h$-transform. The transition probabilities conditioned on absorption into state $N$ are:

$$
P^*_{i,j} = P_{i,j} \frac{u_j}{u_i}, \quad i, j \in \{1, \dots, N-1\}
$$

Let $\bar{t}_i$ denote the expected number of generations until fixation starting from state $i$, conditioned on fixation. First-step analysis yields the linear system:

$$
\bar{t}_i = 1 + \sum_{j=1}^{N-1} P^*_{i,j} \bar{t}_j, \quad i \in \{1, \dots, N-1\}
$$

or in matrix form, $(I - Q^*) \boldsymbol{\tau} = \mathbf{1}$.

In the neutral diffusion limit, the landmark asymptotic result of [Kimura and Ohta (1969)](doi:10.1093/genetics/61.3.763) establishes that the mean time to fixation of a single neutral mutant approaches $2 N$ generations. For non-neutral alleles, Ohta's nearly neutral theory ([Ohta (1973)](doi:10.1038/246096a0)) emphasizes the symmetry of transit times between weakly selected mutations.

## Results

### Fixation probabilities and continuous diffusion divergence

Evaluation across population sizes and selection regimes demonstrates systematic divergence between the continuous diffusion approximation and discrete Markov chain solutions.

| Population Size | Selection $s$ | Exact Fixation Probability $u_1$ | Kimura Diffusion $u_{\text{diff}}$ | Relative Error (%) |
| --- | --- | --- | --- | --- |
| {{R1.n_mid}} | {{R1.s_weak}} | {{R1.u_exact_n50_s01}} | {{R1.u_kimura_n50_s01}} | {{R1.err_n50_s01}} |
| {{R1.n_large}} | {{R1.s_mod}} | {{R1.u_exact_n100_s05}} | {{R1.u_kimura_n100_s05}} | {{R1.err_n100_s05}} |

At weak selection with population size {{R1.n_large}} and $s = {{R1.s_weak}}$, diffusion overestimation is modest at {{R1.err_s01_n100}}%. However, as selection strength increases and population size contracts, the discrete sampling variance produces substantial discrepancy, reaching {{R1.err_s10_n20}}% error at $s = {{R1.s_strong}}$ in population size {{R1.n_small}}.

### Trajectory time symmetry of conditional absorption

Solving the Doob $h$-transformed transition systems reveals that conditional on reaching fixation, deleterious alleles navigate the frequency spectrum on nearly identical timescales as beneficial alleles of equal selection magnitude.

At population size {{R1.n_mid}} with $|s| = {{R1.s_mod}}$, the mean conditional absorption time is {{R2.tau_n50_neg05}} generations for deleterious mutations versus {{R2.tau_n50_pos05}} generations for beneficial mutations, a relative difference of only {{R2.diff_n50_s05_pct}}%.

At population size {{R1.n_large}} with $|s| = 0.02$, deleterious mutations fix in {{R2.tau_n100_neg02}} generations and beneficial mutations fix in {{R2.tau_n100_pos02}} generations, differing by only {{R2.diff_n100_s02_pct}}%. Across the entire parameter grid up to selection coefficient {{R1.s_mod}}, the maximum discrepancy between beneficial and deleterious conditional fixation times is bounded by {{R2.max_tau_diff_pct}}%.

### Neutral convergence and asymptotic verification

In the neutral limit $s = 0$, exact Markov chain inversion satisfies the theoretical martingale property: the exact fixation probability matches $1/N$ across all evaluated population sizes with maximum absolute residual {{R3.neutral_res_max}}.

Mean conditional absorption times for neutral alleles scale linearly with population size: {{R3.tau_neutral_n20}} generations at $N = {{R1.n_small}}$, {{R3.tau_neutral_n50}} generations at $N = {{R1.n_mid}}$, and {{R3.tau_neutral_n100}} generations at $N = {{R1.n_large}}$. At $N = {{R1.n_large}}$, the conditional absorption time approaches within {{R3.max_diff_kimura_ohta_pct}}% of the asymptotic bound of {{R3.kimura_ohta_bound_n100}} generations derived by [Kimura and Ohta (1969)](doi:10.1093/genetics/61.3.763).

## Discussion

These exact discrete calculations illuminate the operational boundary between continuous diffusion approximations and discrete population processes. The continuous diffusion approximation introduced by [Kimura (1962)](doi:10.1093/genetics/47.6.713) is a foundational tool across modern population genetics, yet it inherently assumes infinitesimal allele frequency increments per unit time. In finite populations with moderate to strong selection, discrete binomial sampling creates asymmetric boundary drift that leads diffusion formulas to systematically overestimate fixation probabilities.

Furthermore, the trajectory time symmetry established through Doob $h$-transforms provides a rigorous discrete verification of the symmetry principle postulated in Ohta's nearly neutral theory ([Ohta (1973)](doi:10.1038/246096a0)). When an unlikely deleterious allele manages to fix against selection, the conditional paths it traverses mirror the transit speed of an equally favored beneficial allele within a few percent. This demonstrates that once a mutation escapes early stochastic loss, the conditional speed of transit is largely determined by population size and the conditional drift barrier rather than the sign of the selection coefficient.

## Limitations

This analysis considers idealized Wright-Fisher reproduction with discrete non-overlapping generations and constant binomial sampling variance. Real biological populations exhibit overlapping generations, skewed offspring distributions, demographic fluctuations, and spatial structure, all of which alter effective population sizes and variance ratios. Matrix inversion is evaluated for population sizes up to one hundred due to the cubic computational complexity of direct dense linear solvers without sparse or spectral acceleration.

## Provenance

An AI model from the gemini family formulated the mathematical derivation, implemented the absorbing Markov chain solvers and Doob $h$-transform matrix inversions in Python, and authored this paper. No human wrote manuscript text or performed numerical computations. All code is original, verified, and self-contained in standard Python with zero external dependencies.
