Background

One cornerstone of population genetics is the fixation probability, i.e. the probability that mutations survive loss. This is a probabilistic comprehension of the eventual fate of the beneficial, neutral, or deleterious mutations. Furthermore, the fixation probability of new beneficial mutations has a significant impact on the rate of adaptation of populations [1, 2]. When a new beneficial mutation goes into a population, to finish an adaptive step, it has to escape random loss due to genetic drift, rise to enough copies, and eventually get fixed. Actually, the frequency of a beneficial mutation fluctuates over time. When this frequency is low, the genetic drift is likely to lead to the disappearance of the beneficial mutation, which needs a stochastic process. Once this frequency is large enough, a deterministic model can be used to well approximate the further increment of this frequency. Usually, the calculation for the frequency of a beneficial mutation is equivalent to evaluating the probability that the beneficial mutation survives an earliest stage of strong genetic drift.

Since 1920s, interest in the computation of fixation probabilities has been maintained for nearly one century and considerable progress has been made in this problem. Generally, there are three methods to estimate the fixation probabilities: Markov chain, branching process and diffusion approximation. When the individuals and genotypes in a population can be enumerated, the Markov chain method can obtain the fixation probability precisely. Therefore, this method is characteristically practicable only when the population size is very small [3, 4]. Once the population size becomes large, the discrete branching processes are in wide use [5,6,7,8,9,10,11,12,13]. Since the branching process method presumes that the population is large enough that the destiny of each mutation is independent of all others, it gives an approximation to the real fixation probability. When the selection is weak in a large population, the diffusion approximation approaches are usually used [9, 14,15,16]. Furthermore, many literatures have tried to integrate and reconcile the discrete and continuous methods [8, 9, 17, 18].

Classically, if a native wild-type individual has on average one offspring per generation, a beneficial mutant has on average 1 + s offspring per generation, where the parameter s (s > 0) is the selective advantage. This mechanism of the selective advantage is defined as fecundity, which is fundamental in a large amount of literature in population genetics [19,20,21,22]. Assuming a Poisson offspring distribution and a small, constant selection coefficient in a population of constant size, Haldane [20] gives the well-known result that the fixation probability is approximately 2s, for a mutation that increases fecundity.

Nevertheless, the mutants in many organisms may produce the same number of offspring as the wild-type in a shorter generation time: so-called “generation time” mutants. For example, in the bacteria population, a mutant that has the antibiotic resistance completes the cell cycle and produces two offspring faster than the drug-sensitive individuals. In this case, a reduced replication time is obviously a more suitable mechanism for the selective advantage. Wahl and DeHaan [12] have firstly demonstrated that the classic approximation 2s for the fixation probability of a beneficial mutation does not hold for this mutation conferring a decreased development time. Using a model with a Poisson-distributed offspring with mean 2 and a weak, constant selective advantage, they have approximated the fixation probability of this “generation time” mutant as s/ln(2) for a population of constant size. Therefore, if all mutations are assumed to increase the offspring number, it leads to an overestimate of the order 2 ln(2) for the fixation probability of the mutation that reduces the replication time.

The study of fixation probability under diverse genetic factors and ecological scenarios has been explored [23]. A series of articles have estimated the survival probability of beneficial mutations when the population size changes [3, 4, 8, 9, 18, 24]. Ewens [24] derived the fixation probability of a beneficial mutation in two cases of changing population sizes: a cyclic sequence of population sizes and the population size that first increases and then remains constant. Otto and Whitlock [8] studied the survival probability of beneficial mutants under several demographic models of population size change, including a single change, exponential growth or decline, logistic growth or decline, and fluctuating size. Wahl and Gerrish [9] examined the influence of population bottlenecks on the fixation probability. Lambert [18] and Parsons and Quince [3, 4] developed the fixation probability of beneficial mutations when the population size changed dynamically. Since Pollak [25] first studied the fixation probability in a subdivided population, great process has been made in this probability in spatially heterogeneous populations [16, 26,27,28]. The influence of linked loci on the fixation probability of an advantageous allele has been widely investigated [29,30,31,32]. Studies on time-dependent selection mainly focus on random fluctuations of selection coefficients [33,34,35,36]. Recently, Waxman [37] and Uecker and Hermisson [38] addressed the question of the establishment of new beneficial mutants when the change of selection coefficients and population sizes follows an explicit trend. Peischl and Kirkpatrick [39] derived analytical approximations for the fixation probability of favorable mutations in arbitrarily changing environment that used a novel approach assuming small environmental fluctuations. In these studies, the beneficial mutations are assumed to increase the average number of offspring. However, when a mutant confers an advantage in generation time, the effects of various genetic and ecological conditions on the fixation probability have not received enough attention.

In this article, we use a time-dependent branching process to study the fixation probability of “generation time” mutants in changing environments. Assuming weak selection, we centralize all the environmental changes into a single parameter: effective selective advantage, and deduce an analytical approximation for this fixation probability. We apply our result to four absorbing biological cases, including the monotone increase and the periodic change of the selective advantage in a population of constant size, the changing population size, and the stochastic fluctuations in selection. In these conditions, our approximation compares well with the numerical calculation, which demonstrates the effectiveness of our result.

Methods

Branching process

In probability theory, the branching process is a mathematical object known as stochastic process. It is used to model reproduction, that is, to model a population in which each individual produces stochastic number of offspring in the next generation. It can also be used to model some other similar dynamics, for example, the dispersion of surnames in genealogy, the spread of neutrons in a nuclear reactor and so on.

In a discrete-time branching process (Fig. 1), each individual in a population produces k (k = 0, 1, 2, ...) offspring with the assigned probability f k in the next generation. Then, these offspring have the same reproductive capacity with the ancestor, that is, each of them produce k offspring with the probability f k , and so on. The crucial hypothesis of the branching process model is that the offspring distribution of each individual is independent and identical. However, only when the mutant lineage is a small part of the population, this hypothesis is true. If the population size is constant and the mutant lineage becomes a large part of the population, the density of each individual must rely on the others.

Fig. 1
figure 1

The lineage of an individual with a branching process model. Originally, at generation t = 0 there is a single individual. At each generation, each individual produces k offspring with the assigned probability f k . In this condition, the lineage becomes extinct after t = 8 generations

Fixation probability of beneficial mutations in a constant environment

Assuming a wild-type individual in a population has r offspring on average per generation, this individual will have rt offspring and a “fecundity” mutant having selective advantage s will have (r(1 + s))t offspring in t generations. In the “growth” stage of a population, a lot of offspring are reproduced. Due to the assumption of constant population size, only part of offspring can survive in the next generation, which is called the “sampling” stage. We use y(x) to be the probability generating function that represent the number of offspring reproduced by a “fecundity” mutant lineage in one generation, that is, the probability generating function in the “growth” stage. The y(x) is described as follows: if the probability that an individual produces i offspring is p i , y(x) = p0 + p1x + p2x2 + ... [40]. Assuming that the offspring obey the Poisson distribution and the average number of offspring of a wild-type individual is r = 2, a mutant with a fecundity advantage s has 2(1 + s) offspring on average per generation. Hence,

$$ {\displaystyle \begin{array}{l}y(x)={p}_0+{p}_1x+{p}_2{x}^2+\cdots \\ {}\kern1.00em =\sum \limits_{k=0}^{\infty}\frac{\exp \left[-2\left(1+s\right)\right]{\left[2\left(1+s\right)\right]}^k}{k!}{x}^k\\ {}\kern1.00em =\exp \left[2\left(1+s\right)\left(x-1\right)\right]\end{array}} $$
(1)

We use N to denote the population size, which involves both the wild type and the mutant. Because the population size is constant, only N of the newly produced offspring will survive in every generation. Owing to the supposition that the average number of offspring of each wild-type individual is r, the probability that each offspring survives is 1/r. Conversely, the probability that each offspring dies is 1 − 1/r. Therefore, the probability generating function in the “sampling” stage is z(x) = 1 − 1/r + (1/r)x. According to the property of the probability generating function, the overall probability generating function of “growth” stage followed by “sampling” stage is ϕ(x) = y(z(x)) = y ∘ z(x), which is the total probability generating function for the number of offspring in a “fecundity” mutant lineage after one generation. Consequently, the whole probability generating function for the “fecundity” mutant lineage after n generation is

$$ {\phi}_n(x)=\phi \circ \phi \circ \phi \circ \cdots \left(n\kern0.5em times\right)\cdots \circ \phi (x) $$
(2)

By calculating the value of the probability generating function at x = 0, we can eliminate the higher terms and obtain the probability that the mutant lineage eventually disappear. Hence, the extinction probability of a “fecundity” mutation is \( q=\underset{n\to \infty }{\lim }{\phi}_n(0) \). And, the fixation probability of the “fecundity” mutation is [20].

$$ p=1-\underset{n\to \infty }{\lim }{\phi}_n(0) $$
(3)

The deduction of the fixation probability above can be expanded to the case that a population has population bottlenecks. We suppose that the bottlenecks happen every τ generations, where τ is constant. The “fecundity” mutant lineage will experience τ sequential “growth” stages and one “sampling” stage, so the total probability generating function is

$$ y(x)=y\circ y\circ y\circ \cdots \left(\tau \kern0.5em times\right)\cdots \circ y\circ z(x) $$
(4)

Here, the ϕ(x) can be simply denoted as ϕ(x) = y τ  ∘ z(x). Particularly, the situation that the bottlenecks occur every τ = 1 generations is equal to a constant population size.

We will give the calculation method of the fixation probability of a “generation time” mutation below [12]. Let t g (t g  < 1) be the generation time of the “generation time” mutant lineage. In t wild-type generations, a “generation time” mutant will produce \( {r}^{t/{t}_g} \) offspring on average. Assuming that the whole growth rate of both the “fecundity” mutant lineage and the “generation time” mutant lineage is the same, we have \( {r}^{t/{t}_g}={\left(r\left(1+s\right)\right)}^t \) and obtain

$$ {t}_g=\frac{1}{1+{\log}_r\left(1+s\right)} $$
(5)

Let \( \tilde{s}={\log}_r\left(1+s\right) \), then \( {t}_g=1/\left(1+\tilde{s}\right) \). When s is very small, we have \( \tilde{s}\approx s/\ln (r) \).

For the “generation time” mutation, the mutant lineage will finally undergo τ + 1 generations between two population bottlenecks. If a mutation of this type firstly appears at the start of a “growth” stage, the situation above will firstly happen before n1 population bottlenecks. Therefore, we have

$$ \left({n}_1\tau +1\right)\left(\frac{1}{1+\tilde{s}}\right)\le {n}_1\tau $$
(6)

and obtain

$$ {n}_1\ge 1/\left(\tilde{s}\tau \right) $$
(7)

Extending the Eq. (6), the situation that the “generation time” mutant lineage undergo an extra generation occurs before n i consecutive population bottlenecks, we find \( \left({n}_i\tau +i\right)\left[1/\left(1+\tilde{s}\right)\right]\le {n}_i\tau \) and have \( {n}_i\ge i/\left(\tilde{s}\tau \right) \).

When the “generation time” mutant lineage experiences an extra generation, the probability generating function of “growth” stage followed by “sampling” stage is ϕ+(x) = yτ + 1 ∘ z(x). For all the other “growth” and “sampling” stages, the probability generating function is ϕ(x) = y τ  ∘ z(x). For instance, if τ = 5, \( \tilde{s}=1/20 \), we obtain n1 ≥ 4. Thus, the probability generating function of this mutant lineage after eight population bottlenecks is

$$ {\phi}_8(x)=\phi \circ \phi \circ \phi \circ {\phi}^{+}\circ \phi \circ \phi \circ \phi \circ {\phi}^{+} $$
(8)

Accordingly, the fixation probability of the “generation time” mutation can be computed by the Eq. (3).

Fixation probability of beneficial mutations in a variable environment

We explore the fixation probability of beneficial mutations when the selective advantage s k (s k  > 0, and s k  ≪ 1, k = 1, 2, 3,...) changes in time in a changing environment. Extending the classical result for the fixation probability of beneficial mutations in a constant environment, Peischl and Kirkpatrick [39] have provided this probability in a time-dependent branching process:

$$ 1-p=\underset{n\to \infty }{\lim }{\phi}_0\left({\phi}_1\left(\cdots {\phi}_n(0)\right)\right) $$
(9)

Combined with the probability generating function of the “generation time” mutant given above, the fixation probability of this mutant lineage in changing environments can be evaluated by the Eq. (9). Due to the computational complexity of the nested structure in Eq. (9), we need a simple analytic approximation to describe this probability. Peischl and Kirkpatrick [39] have given an approximation of the fixation probability of a “fecundity” mutation in a variable environment:

$$ p\approx 2{s}_e $$
(10)

where the offspring obey the Poisson distribution and s e is the effective selective advantage.

Here we aim to develop an analytic approximation for the fixation probability of “generation time” mutations in changing environments using a time-dependent branching process. Firstly, we innovate a reference environment. In this reference environment, assuming a Poisson-distributed offspring and a small, constant selection coefficient \( \overline{s} \) (\( \overline{s}>0 \)) in a population of constant size, we get the fixation probability of the “generation time” mutant as \( \overline{p}=\overline{s}/\ln (2) \) [12]. Let \( \overline{\phi} \) be the probability generating function of the “generation time” mutant in this reference environment, we define the probability generating function of this mutant lineage at generation k in a variable environment as:

$$ {\phi}_k(x)=\overline{\phi}(x)+{\varepsilon}_k(x) $$
(11)

where ε k , k = 1, 2, 3, ... is the disturbance function in generation k. ε k is a smooth and bounded function that maps [0,1] to [− 1,1], and ε k (1) = 0, k = 1, 2, 3, .... Assuming that the offspring obey the Poisson distribution and its instantaneous variation is very small in the changing environment, we have maxx, k[ε k (x)] ≪ 1, \( {\max}_{x,k}\left[{\varepsilon}_k^{\prime }(x)\right]\ll 1 \). We substitute the Eq. (11) into the Eq. (9) and expand in a Taylor series

$$ p=\overline{p}-\sum \limits_{k=0}^{\infty }{\varepsilon}_k\left(1-\overline{p}\right){\sigma}^k+O\left({\varepsilon}^2\right) $$
(12)

Here, \( \sigma ={\overline{\phi}}^{\prime}\left(1-\overline{p}\right) \), and O(ε2) denotes the order of maxx, k[ε k 2(x)] and \( {\max}_{x,k,l}\left[{\varepsilon}_k(x){\varepsilon}_l^{\prime }(x)\right] \). The average number of offspring in the reference environment is more than 1, so we have 0 < σ < 1. Because ε k is bounded, the \( {\sum}_{k=0}^{\infty }{\varepsilon}_k\left(1-\overline{p}\right){\sigma}^k \) in the Eq. (12) is convergent for every series of environments.

Because the selective advantage s k of the “generation time” mutation in variable environments is very small, i.e. s k  ≪ 1, k = 1, 2, 3, ..., and \( \overline{s}\ll 1 \), we have

$$ \sigma \approx {\overline{\phi}}^{\prime}\left(1-\frac{\overline{s}}{\ln 2}\right)\approx {\overline{\phi}}^{\prime }(1)-{\overline{\phi}}^{{\prime\prime} }(1)\frac{\overline{s}}{\ln 2}\approx 1-\overline{s} $$
(13)

Neglecting the second order terms and high order terms of (x − 1), we obtain an approximation of the disturbance function ε k

$$ {\varepsilon}_k(x)\approx {\varepsilon}_k(1)+{\varepsilon}_k^{\prime }(1)\left(x-1\right)=\left({s}_k-\overline{s}\right)\left(x-1\right) $$
(14)

Substituting the Eq. (14) into the Eq. (12), one finds

$$ p\approx \overline{p}+\overline{p}\sum \limits_{k=0}^{\infty}\left({s}_k-\overline{s}\right){\sigma}^k=\overline{p}\sum \limits_{k=0}^{\infty }{s}_k{\left(1-\overline{s}\right)}^k $$
(15)

We define

$$ {\omega}_k=\overline{s}{\left(1-\overline{s}\right)}^k $$
(16)

Since \( {\sum}_{k=0}^{\infty }{\omega}_k=1 \), {ω k }can be understood as a probability distribution. And, the value of ω k diminished over time. Here we define the effective selective advantage s e as:

$$ {s}_e=\sum \limits_{k=0}^{\infty }{\omega}_k{s}_k $$
(17)

So the s e can be regarded as a weighted average. Consequently, in a variable environment where the selective advantage changes over time, an analytical approximation for the fixation probability of “generation time” mutations is given by

$$ p\approx \frac{s_e}{\ln 2} $$
(18)

In the derivation above, it is important how to select an appropriate reference environment. Generally, we use the arithmetic average of the selective advantage to define the reference environment

$$ \overline{s}=\underset{n\to \infty }{\lim}\left(\frac{1}{n}\sum \limits_{k=0}^n{s}_k\right) $$
(19)

Results

We apply our analytic approximation to four interesting biological instances of changing environments. In these cases, we compare our approximation for the fixation probability of “generation time” mutations (Eq. (18)) to the exact value acquired by numerical iteration of Eq. (9).

Monotonously increasing selection

We assume that the selective advantage of a “generation time” mutation monotonously increases from s0 to s in a population of constant size:

$$ {s}_k={s}_0{e}^{-\frac{1}{2}k}+{s}_{\infty}\left(1-{e}^{-\frac{1}{2}k}\right) $$
(20)

The selective advantage of reference environment obtained by the Eq. (19) is

$$ \overline{s}=\underset{n\to \infty }{\lim}\left(\frac{1}{n}\sum \limits_{k=0}^n\left[{s}_0{e}^{-\frac{1}{2}k}+{s}_{\infty}\left(1-{e}^{-\frac{1}{2}k}\right)\right]\right)={s}_{\infty } $$
(21)

Assuming s ≪ 1, we have \( {e}^{-{s}_{\infty }}\approx 1-{s}_{\infty } \). The effective selective advantage acquired by the Eq. (17) is

$$ {s}_e\approx {s}_{\infty}\left[1+\frac{s_0-{s}_{\infty }}{1-{e}^{-\frac{1}{2}}\left(1-{s}_{\infty}\right)}\right] $$
(22)

In this case, the fixation probability of “generation time” mutations can be approximated as

$$ p\approx \frac{s_{\infty }}{\ln 2}\left[1+\frac{s_0-{s}_{\infty }}{1-{e}^{-\frac{1}{2}}\left(1-{s}_{\infty}\right)}\right] $$
(23)

In the Fig. 2, we compare our approximation with the numerical computations in this instance, and find that they are consistent. Accordingly, the analytic result we deduced is a good approximation for the fixation probability of “generation time” mutations.

Fig. 2
figure 2

Comparison of the approximation with exact results in the case of monotonously increasing selection. The initial selective advantage is s0 = 0 in the figure (a), and s0 = 0.001 in the figure (b)

Cyclically changing selection

In the natural environment, a population usually goes through periodic environmental changes, such as seasonal variations in the temperature and humidness. Assume that the selective advantage of a “generation time” mutation experiences periodic changes as follows

$$ {s}_k={s}_{mean}+\varDelta s\cos \left( k\rho +\theta \right) $$
(24)

where s mean is the mean of selective advantage, Δs is the amplitude of fluctuations, ρ is a parameter that controls the length of a circle of fluctuations, and θ is used to decide the initial selective advantage.

The selective advantage of reference environment is

$$ \overline{s}=\underset{n\to \infty }{\lim}\left(\frac{1}{n}\sum \limits_{k=0}^n\left[{s}_{mean}+\varDelta s\cos \left( k\rho +\theta \right)\right]\right)={s}_{mean} $$
(25)

The effective selective advantage is

$$ {s}_e\approx {s}_{mean}\left[1+\varDelta s\frac{\left(1-{s}_{mean}\right)\cos \left(\rho -\theta \right)-\cos \theta }{2\left(1-{s}_{mean}\right)\cos \rho -{\left(1-{s}_{mean}\right)}^2-1}\right] $$
(26)

In this instance, the analytic approximation for the fixation probability of “generation time” mutations is

$$ p\approx \frac{s_{mean}}{\ln 2}\left[1+\varDelta s\frac{\left(1-{s}_{mean}\right)\cos \left(\rho -\theta \right)-\cos \theta }{2\left(1-{s}_{mean}\right)\cos \rho -{\left(1-{s}_{mean}\right)}^2-1}\right] $$
(27)

Figure 3 shows the comparison of the approximation with the accurate value in the case of cyclically changing selection. It can be seen that our approximation gives an exact prediction for the fixation probability of “generation time” mutations.

Fig. 3
figure 3

Comparison between the approximation and exact values when the selective advantage periodically changes. The parameter values are S mean =0.01, Δs =0.005, and θ = π

Varying population size

We assume that the selective advantage of the “generation time” mutants s is constant in a population in which the population size changes over time. The average number of offspring of each wild-type individual in generation n is Nn + 1/N n , and that of each mutant is

$$ {M}_n=\frac{N_{n+1}}{N_n}\left(1+s\right) $$
(28)

where N n is the population size of the wild-type individuals in generation n. We use the solution of the Beverton-Holt equation as the demographic dynamics of the wild-type individuals:

$$ {N}_n=C\frac{N_0}{N_0+\left(C-{N}_0\right){e}^{- gn}} $$
(29)

Here, N0 denotes the initial population size, g denotes the growth rate of the population, and C denotes the carrying capacity.

In the Fig. 4, a comparison between the approximation and accurate results is shown. In this instance, our approximation matches well with the exact values, which shows our result is effective.

Fig. 4
figure 4

Comparison of the approximation with accurate results when the population size changes. The parameter values are s = 0.02, 0.01, and 0.001 (from top to bottom) and g = 0.01

Stochastic fluctuations in selection

Suppose the selective advantage of a “generation time” mutation experiences random fluctuations as

$$ {s}_k=\left(1-\lambda \right){s}_{mean}+\lambda {s}_{k-1}+{\xi}_k $$
(30)

where s mean is the mean of selective advantage, λ ∈ [0, 1] is the correlation coefficient between sk − 1 and s k , and ξ k is a white noise that has mean 0 and variance σ2.

If this process has a condition that the initial selective advantage is s0, it becomes time dependent and the expected selective advantage in generation k is

$$ E\left[{s}_k|{s}_0\right]=\left(1-{\lambda}^k\right){s}_{mean}+{\lambda}^k{s}_0 $$
(31)

Thus, the expected fixation probability of “generation time” mutations is

$$ E\left[p|{s}_0\right]=\frac{s_{mean}}{\ln 2}\left[1+\frac{s_0-{s}_{mean}}{1-\lambda \left(1-{s}_{mean}\right)}\right] $$
(32)

Figure 5 shows the comparison of the approximation with the accurate value in the case of random fluctuations in selection. It can be seen that they are coincident, which proves the effectiveness of our approximation.

Fig. 5
figure 5

a Examples of Eq. (30). The solid curve shows one example, and shaded curves show 20 other examples. The dashed line shows the mean selective advantage. The parameter values are s0 = 0.001, s mean  = 0.02, λ = 0.6, and σ = 0.001. b Comparison between the approximation and exact results when the selective advantage experiences stochastic fluctuations. The whiskers show 99% confidence intervals. The other parameter values are as in the top figure

Discussion

In the nature, if an organism carries a beneficial mutation, it will propagate more quickly than the wild-type individuals. In a large number of literature, this means that the beneficial mutant can reproduce more surviving offspring in each generation, i.e. “fecundity” mutant. Nevertheless, a great deal of organisms may produce the same number of offspring as the wild-type in a shorter generation time, i.e. “generation time” mutant. In many cases, the mechanism of the beneficial mutations is very important. Therefore, we studied the fixation probability of “generation time” mutations in variable environments that has not been explored.

The adaptation of populations to environmental challenges relies on the fixation probability of new beneficial mutations. There are a variety of origins of environmental change, and variations can happen in all time scales, from transient variations to transitions in the geological time scales. However, a majority of researches of adaptation depend on the detachment of time scales in the evolution and ecology. This is maybe a serious simplification in many situations. Thus, we explored the establishment probability of beneficial mutations in changing environments.

In a population, individual alleles can undergo changing selection pressures even though the outside environment is constant. This is because multiple selected alleles separate and interfere owing to the linkage or the epistasis [41]. There are many examples, such as the evolution of the compensatory mutation, clonal interference, adaptive genes that flow across a genetic barrier, and so on.

In population genetics, the deduction of the fixation probability from branching processes is a common method. Using branching processes, it is easy to obtain simple analytic results, which are precise when the population size is large enough that Ns ≫ 1. The shortcoming of this method is that it is only applicable to beneficial and originally rare mutations. So far, branching processes have been also applied to some other natural phenomenon, including the spread of communicable diseases, the increment of tumor cells and so on [42, 43].

To show how our analytic approximation can be applied to special instances of variable environments, we used it to a few biological cases. They are the monotonously increasing selection, periodically changing selection, changing population size and random fluctuations of selection. In these examples, in order to guarantee the positive result of Eq. (9), we focused on the scenarios that the selective advantage s k  > 0. Generally, our approximations match well with the accurate values (see Figs. 2-5). Nevertheless, our result underestimates the fixation probability of “generation time” mutations if \( {s}_k\ll \overline{s} \) in initial generations (see Fig. 5).

The theoretical framework can be tested by the experiments, such as the recent evolution experiments by Bell and Gonzalez [44]. The results from these experiments compare well with the analytic forecasts on evolutionary rescue [45]. For the microbial population in these experiments, the environment they live in can be manipulated by an automatic liquid processing system. Therefore, this system can be applied to verify the theory of adaptation in variable environments. For the future work, we hope that the fixation probability can be further explored both theoretically and experimentally.

Conclusions

In this article, we expanded the classical result of the fixation probability of beneficial mutations acquired by Haldane, and calculated an approximation for the fixation probability of “generation time” mutations in a variable environment. When the selective advantage is weak, all the environmental changes are condensed into a unitary quantity: effective selective advantage. This parameter is a weighted mean across the selective advantage per generation, and the weights diminish monotonously over time. Consequently, this fixation probability in changing environments is decided by the environments that the population experienced and the average influence.

We employed our result to four attractive biological cases, which are the monotone increase of selection, the periodic change of selection, varying population size, and stochastic fluctuations in selection. In these situations, our approximation is in good accordance with the precise value, which certifies the effectiveness of our result.