Analysis of a household-scale model for the invasion of Wolbachia into a resident mosquito population Authors: Abby Barlow, Sarah Penington, Ben Adams Published: 2025 ABSTRACT AbstractIn areas infested with Aedes aegypti mosquitoes it may be possible to control dengue, and some other vector-borne diseases, by introducing Wolbachia-infected mosquitoes into the wildtype population. Thus far, empirical and theoretical studies of Wolbachia release have tended to focus on the dynamics at the community scale. However, Ae. aegypti mosquitoes typically dwell in and around the same houses as the people they bite and it can be insightful to explore what happens at the household scale where small population sizes lead to inherently stochastic dynamics. Here we use a continuous-time Markov framework to develop a stochastic household model for small populations of wildtype and Wolbachia-infected mosquitoes. We investigate the transient and long term dynamics of the system, in particular examining the impact of stochasticity on the Wolbachia invasion threshold and bistability between the wildtype-only and Wolbachia-only steady states previously observed in deterministic models. We focus on the influence of key parameters which determine the fitness cost of Wolbachia infection and the probability of Wolbachia vertical transmission. Using Markov and matrix population theory, we derive salient characteristics of the system including the probability of successful Wolbachia invasion, the expected time until invasion and the probability that a Wolbachia-infected population reverts to a wildtype population. These attributes can inform strategies for the release of Wolbachia-infected mosquitoes. In addition, we find that releasing the minimum number of Wolbachia-infected mosquitoes required to displace a resident wildtype population according to the deterministic model, only results in that outcome about 20% of the time in the stochastic model; a significantly larger release is required to reach a steady state composed entirely of Wolbachia-infected mosquitoes 90% of the time.Keywords: Wolbachia, Household model, Quasi-stationary distribution, Continuous-time Markov chain, Invasion, Bistability Introduction Dengue is a vector-borne disease with an estimated global burden of 100 to 400 million cases and 40, 000 deaths per year (Zeng et al. 2021). It circulates endemically across tropical and subtropical regions, affecting over 100 countries (Hasan et al. 2016; Bhatt et al. 2013), and local transmission has recently been observed in parts of Europe (WHO 2023). The viral infection is passed to humans via the bite of infected mosquitoes. Its most common vector is the Aedes aegypti mosquito (WHO 2023). Aedes aegypti is predominantly found in urban and sub-urban areas. It favours artificial water containers, such as unsealed cisterns, tyres and empty plant pots as habitats to lay eggs (ECDC 2023) and has benefited from rapid growth and urbanisation of the human population (Trewin et al. 2021). Dengue prevention methods typically focus on reducing or eliminating the vector population. Spraying insecticides both indoors and outdoors is often used to suppress the mosquitoes. However, complete elimination requires continual spraying, which can lead to the mosquitoes building up resistance to the insecticides. Dengue vaccines have been developed, but currently have limited scope since they are only advised for individuals who have previously contracted the virus (CDC 2024). An alternative dengue control method that has been actively explored in recent years involves infecting the mosquitoes with Wolbachia. Wolbachia are a group of intracellular bacteria found in arthropods and nematodes (Werren et al. 2008; Hughes and Britton 2013). They can alter their host’s biology in numerous ways. When present in mosquitoes such as Aedes aegypti, the bacteria can reduce the incidence of vector-borne disease via several mechanisms which reduce the mosquito population size and vector competence (CDC 2022). Here we will not explore the disease dynamics directly but will focus on the establishment and maintenance of Wolbachia infection in a mosquito population via cytoplasmic incompatibility (CI). CI means that eggs produced by females that are not Wolbachia-infected (hereafter referred to as wildtype) and fertilized by males that are Wolbachia-infected are not viable; eggs produced by Wolbachia-infected females and fertilized by any male are viable, and the majority of offspring are Wolbachia-infected. Therefore, in populations where Wolbachia is present, infected females have a reproductive advantage over uninfected females which, combined with vertical transmission, can drive increasing Wolbachia prevalence with each generation (Dorigatti et al. 2018; Hughes and Britton 2013; Sinkins 2004). The invasion of Wolbachia into a susceptible vector population is, however, not guaranteed. There is a trade-off between the reproductive advantage gained by infected mosquitoes through CI and a fitness cost they experience due to infection. Consequently, when Wolbachia is introduced into a susceptible population, it will only go to fixation (i.e. 100% prevalence) if the initial prevalence exceeds a certain level known as the invasion threshold (Dorigatti et al. 2018). Many cage and field experiments on establishing Wolbachia-infected mosquitoes in wildtype populations have been carried out over the past decade (Ross 2021; Dos Santos et al. 2022; Hoffmann et al. 2014; Dufault et al. 2022). Mathematical modelling has been used to support and explore the insights generated by these empirical studies. The majority of models neglect spatial structure and assume well-mixed populations (Hughes and Britton 2013; Ndii et al. 2012, 2015). Some models describe the movement of mosquitoes through space using dispersal kernels in reaction-diffusion frameworks (Turelli and Barton 2017; Hancock and Godfray 2012); others are highly complex simulations that admit limited analytical tractability (Magori et al. 2009; Hancock et al. 2019; Pagendam et al. 2020). The dynamics of Wolbachia invasion at the scale of a town or city may be reasonably approximated by deterministic models such as these and formulated with ordinary or partial differential equations. However, Aedes aegypti mosquitoes often live in and around the same dwellings as the people they bite and the invasion dynamics unfold stochastically within small household mosquito populations. Wolbachia releases may even be conducted at the household scale with the objective of generating localised protection against dengue (O’Neill et al. 2018). In this study, we develop and analyse a stochastic model to investigate the invasion dynamics of Wolbachia-infected mosquitoes at the household scale. We use Markov process theory and matrix population theory to examine how the deterministic invasion threshold, which dictates whether an initial Wolbachia release spreads to the entire population, is characterised in a stochastic setting. We elucidate the medium and long term transient dynamics of the stochastic system to derive key quantities useful in Wolbachia release design, including the probability that Wolbachia-infected mosquitoes successfully invade the household, the expected time until invasion and the probability of reversion to a wildtype population. The notion that stochastic effects can be important in the invasion dynamics of Wolbachia infection has previously been studied using Markov process frameworks based on classical population genetic models (Rigaud and Rousset 1996; Jansen et al. 2008; Turelli and Barton 2022) that assume finite, constant size populations. The stochastic invasion dynamics of Wolbachia were studied using the Wright-Fisher model by the authors of Rigaud and Rousset (1996). They derived an approximate expression for the probability of Wolbachia fixation following the introduction of a single Wolbachia-infected individual to wildtype population of size N. The authors of Jansen et al. (2008) derived an improved approximation for this fixation probability in very small populations, and derived exact results for specific demographic structures using the Moran model. They also considered the invasion dynamics arising from the introduction of multiple infected individuals, simultaneously or sequentially. They found that the fixation probability from the introduction of a single infected individual is proportional to 1/N and can be substantial for small wildtype populations. For larger populations the corresponding fixation probability is very small but a steady influx of infected individuals can still lead to successful invasion on medium ecological timescales. These results led the authors to conclude that fixation in large wildtype populations may result from initial fixation in smaller, partially isolated populations. The approach we introduce here is complementary to the methods based on population genetic models. It makes use of theory for continuous-time Markov processes to focus on the invasion dynamics in very small, household-scale, populations that can fluctuate in size, and die out altogether. We explore the comparison between the two approaches further in the Discussion. The structure of the paper is as follows. In Sect. 2, we review a deterministic mean-field model of wildtype and Wolbachia-infected mosquito population dynamics (Hughes and Britton 2013) in a household context and discuss the bistability of the steady states where only wildtype or only Wolbachia-infected mosquitoes are present. In Sect. 3, we recast the model in a stochastic framework and introduce the methods required to analyse the dynamics of Wolbachia invasion and persistence. In Sect. 4, we use a tutorial model with very small mosquito populations to elucidate the theory introduced in the previous section. In Sect. 5, we extend the model to incorporate more realistic bounds on the mosquito population size and investigate the invasion threshold and bistability in a stochastic setting. Finally, in Sect. 6, we consider the reversion of a Wolbachia-infected population to wildtype due to partially effective vertical transmission. Deterministic mean-field model of wildtype and Wolbachia-infected mosquito dynamics Here we review a deterministic mean-field model for the dynamics of a population composed of wildtype and Wolbachia-infected mosquitoes. The model was first introduced by Hughes and Britton (2013). We consider a slightly simplified version given by Here, Nm is the adult female wildtype mosquito population density and Nw is the adult female Wolbachia-infected mosquito density. As in the original model, male population densities are implicitly assumed to be equal to the female densities. The per capita birth and death rates of the wildtype mosquitoes are denoted b and d respectively and the per capita death rate for the Wolbachia-infected mosquitoes is d′=δd, where δ≥1. The quantities Zm and Zw are given by The Zm term gives the effective number of adults that produce wildtype offspring. The first term in (3) represents matings between wildtype males and wildtype or Wolbachia-infected males. It accounts for the fitness cost of infection, 1-ϕ, acting on reproduction and the proportion v of the offspring of infected females infected due to vertical transmission. The second term in (3) represents matings between Wolbachia-infected males and wildtype or Wolbachia-infected females. It accounts for a proportion u of the offspring of infected males and wildtype females that are non-viable due to CI. Wolbachia-infected females usually produce viable eggs regardless of the infection status of the male (Dorigatti et al. 2018). So we have slightly revised the expression for Zm given in Hughes and Britton (2013) to omit the CI effect from matings between infected males and infected females; their offspring are always viable. The Zw term gives the effective number of adults that produce infected offspring. It describes Wolbachia-infected females mating with any male to produce infected offspring. Hence bZm and bZw describe the maximum rates at which wildtype and Wolbachia-infected offspring are produced, in the absence of intraspecific competition, by Nm wildtypes and Nw Wolbachia-infected female mosquitoes. The function F(N) in Eqs. (1)–(2) describes intraspecific competition between mosquito larvae. We use the heuristic function (Dye 1984) where h and k describe characteristics of larval competition. We have modified the model in Hughes and Britton (2013) such that the offspring rate is 0 when the adult population is C or more. In effect this means that the household female mosquito population cannot grow above C. Bounding the population size in this way ensures our stochastic model is tractable. Also note that in the original model the argument of the density dependence function is N=Zm+Zw, the effective size of the reproductive adult population after accounting for CI and the fitness costs of infection. However, we follow the same approach as Qu et al. (2022) and use N=Nm+Nw, the actual size of the adult population. For some formulations of the density dependence function F(N) this simplification can keep the system algebraically tractable. It does risk overestimating the impact of density dependence because the reproductive population is smaller than the adult population. However, the function F is heuristic with parameter flexibility that can accommodate the change in argument and, in the qualitative context of our conceptual model, this is a reasonable simplification. A simpler alternative to F(N) is G(N) given by Qu et al. (2022) Since both functions are heuristic, in Sect. B in the Appendix, we reproduce our results using G(N) for comparison. Figure 1 shows the two larval intraspecific competition functions. Larval intraspecific competition functions F(N) and G(N); see Eqs. (5) and (6). Parameter values are C=30, k=0.3 and h=0.76. Model parameterisation is based on Hughes and Britton (2013). We have re-scaled the model such that Nm and Nw are in terms of mosquitoes per 100m2, the approximate area of a dwelling. We have fixed the reproductive carrying capacity, and effective upper bound on the female mosquito population size, at C=30. This bound lies well above observed mosquito household population sizes reported in the literature (Madewell et al. 2019). All parameter definitions and values are given in Table 1. Table 1Parameter definitions and values. Values except C and b are from Hughes and Britton (2013) and re-scaled so that mosquito population density is expressed per 100m2. All rates are per day. C is based on Madewell et al. (2019), b is calculated such that the wildtype female steady-state in the absence of any Wolbachia infection is Nm∗=10.ParameterDefinitionValuebMaximum per capita birth rate for wildtype mosquitoes.4.52d=0.54 (x∗=10)dPer capita death rate of wildtype mosquitoes.0.12b′=ϕbMaximum per capita birth rate for Wolbachia-infected mosquitoes.0.54ϕϕ1-ϕ is the fitness cost of infection, which acts on reproduction. See b′ above.0–1d′=δdPer capita death rate of Wolbachia-infected mosquitoes.0.12δMortality cost of infection. See d′ above.1uCytoplasmic incompatibility. Probability that offspring produced by a Wolbachia-infected male mating with a wildtype female are not viable.1vVertical transmission probability.0.9-1CReproductive carrying capacity.30kLarval competition parameter.0.3hLarval competition parameter.0.19×100k=0.76 Parameter definitions and values. Values except C and b are from Hughes and Britton (2013) and re-scaled so that mosquito population density is expressed per 100m2. All rates are per day. C is based on Madewell et al. (2019), b is calculated such that the wildtype female steady-state in the absence of any Wolbachia infection is Nm∗=10. Stability analysis We now summarise the steady state behaviour of the deterministic model (1)–(2). There are four steady state solutions: all mosquitoes absent E0=(Nm∗,Nw∗)=(0,0); only wildtype mosquitoes present E1=(F-1(d/b),0); only Wolbachia-infected mosquitoes present E2=(0,F-1(d′/(bvϕ))) and a coexistence state where both wildtype and Wolbachia-infected mosquitoes are present, E3, which can be found numerically. If b>d, the absence steady state E0 is unstable and E1 is stable. If in addition ϕb>δd then E2 is also stable and the coexistence steady state E3 is a saddle point (Hughes and Britton 2013). Linear stability analysis shows that system (1)-(2) is bistable in E1 and E2 when CI and vertical transmission are highly efficient i.e. u and v are both close to 1 Hughes and Britton (2013). This means that the outcome of introducing Wolbachia-infected mosquitoes into a household depends on the initial numbers of wildtype and infected mosquitoes in the household. Figure 2 shows how the stability of the wildtype-only and Wolbachia-only steady states, and their basins of attraction in terms of the initial proportion of the mosquito population that is Wolbachia-infected, depend on the fitness cost of infection. The invasion threshold is defined by the minimum proportion of the mosquito population that must be infected to be in the basin of attraction of the Wolbachia-only state. For a household with a total of N0=10 (female) mosquitoes, the invasion threshold in terms of Nw(0)/N0 is shown as a function of the reproductive fitness cost of Wolbachia infection 1-ϕ∈[0,1]. For our parameter values, the steady state (female) wildtype-only population is 10, so this threshold corresponds to the proportion of the wildtype mosquito population that would need to be replaced with Wolbachia-infected mosquitoes for eventual replacement of the entire wildtype population. When 1-ϕ is above 1-d/b(=0.78), the fitness cost of infection is so high that the Wolbachia-only steady state is not biologically feasible. However, as 1-ϕ decreases (and the fitness cost of infection reduces) the Wolbachia-only state becomes viable, and the invasion threshold decreases. The bistability is a key feature of the system. It shows that successfully establishing Wolbachia in a mosquito population requires the release of a sufficient number of infected mosquitoes, and that number depends on the fitness cost of infection associated with the Wolbachia strain. Stability and attraction of the steady states of system (1)–(2), with larval density function (5), depending on the fitness cost of Wolbachia infection 1-ϕ and the initial proportion of the mosquito population that is Wolbachia-infected Nw(0)/N0. Here u,v=1 and N0=10. The diagram is divided along the horizontal axis into a region where the wildtype-only (E1) and Wolbachia-only (E2) steady states exist and are bistable, and a region where the unique non-trivial steady state is wildtype-only, and stable. The bistable region is further divided along the vertical axis into regions of initial conditions in the basins of attraction of E1 or E2. The invasion threshold in the bistable region is labelled in blue text. All of our stability analysis plots are produced using the open source software bSTAB Stender and Hoffmann (2022). In Fig. 2 we assume the total female population size is fixed at N0=10. We now relax this assumption. Figure 3 shows the basins of attraction in the bistable region when the initial numbers of (female) wildtype Nm(0) and Wolbachia-infected Nw(0) mosquitoes can take any values consistent with a total population size less than the reproductive carrying capacity (C=30). In this figure, 1-ϕ=0.15 is fixed and the line Nm(0)+Nw(0)=10 corresponds to ϕ=0.85 in Fig. 2. We see that, regardless of the total population size, the Wolbachia-only steady state is reached if the proportion of Wolbachia-infected mosquitoes exceeds approximately 0.15. Stability and attraction of steady states of system (1)–(2) depending on the initial numbers of female wildtype Nm(0) and Wolbachia-infected Nw(0) mosquitoes. Here u,v=1 and 1-ϕ=0.15, with larval density function (5). Indicated on the diagram are the regions of initial conditions where solutions are in the basin of attraction of the wildtype-only (bistable + E1) or Wolbachia-only (bistable + E2) steady state. The grey triangle covers populations outside our upper bound on the total female mosquito population size. The dashed blue line indicates where Nm(0)+Nw(0)=10, corresponding to 1-ϕ=0.15 in Fig. 2. The stochastic framework We now present a stochastic formulation of the model. The underlying structure is a continuous-time Markov chain (CTMC) X:={X(t),t≥0} (Norris 1997; Anderson 2012) which describes the demographic evolution of the wildtype and Wolbachia-infected mosquito populations within a household. The household state is X. The state space is {(0,0)}∪S. Here S={(m,w):00andm+w≤C} is the class of mixed states. The mixed state class is labelled as S3 since the two other communicating classes are accessible from S3 but S3 is not accessible from S1 or S2. The transient transition matrix Q can then be written in the form where Qk denotes the block matrix composed of the transition rates between the states in Sk and Qij denotes the block matrix composed of the transition rates from the states in Si to states in Sj. Under the current framework, vertical transmission is perfect (v=1) so there is no way to return from the Wolbachia-only state to a wildtype-only state (via some mixed state) and Q21 is a matrix of zeros. Note that the diagonal elements of Qk are not equal to the negative sum of the rest of the corresponding row of Qk because they include transitions to the absorbing state (0, 0). So, Qk[i,i]=-∑j∈S∪{(0,0)}qi,j, where i corresponds to a given state in Sk and qi,j denotes the transition rate from state i to state j (in the concise state notation. The absorbing state in our model can only be reached through S1 (wildtype-only states) or S2 (Wolbachia-only states). The probability mass initially drains out of S3 (mixed states) relatively quickly, then out of S1 or S2 to the absorbing state at a much slower rate. Since v=1, S1 and S2 are not communicating, so once the system enters S1 or S2 it remains in that class until extinction. The time to extinction is governed by the minimal magnitude eigenvalue of the relevant class transition matrix Q1 or Q2. Prior to extinction, the state probabilities in the class reach a stable distribution given by the left eigenvector associated with that eigenvalue. For further mathematical details, see Sect. I.2 in the Appendix. The probability of Wolbachia invasion In Section 2.1 we saw that, in the deterministic model, there is a bistability between the wildtype-only and Wolbachia-only steady states. If the proportion of mosquitoes that are Wolbachia-infected exceeds the invasion threshold then, in the deterministic framework, a Wolbachia-infected population permanently replaces the wildtype population. We define a release that results in a household mosquito population becoming entirely Wolbachia-infected as ‘successful’. In the stochastic framework, exceeding the invasion threshold does not guarantee a successful release, and no mosquito population persists indefinitely. For any initial mixed state, the stochastic process eventually enters the absorbing state (0, 0). Before that, it passes through either the Wolbachia-only class or the wildtype-only class. A successful release must pass through the Wolbachia-only class. Here, we will briefly discuss how to utilise standard Markov chain theory (Norris 1997) to calculate the probability of successful Wolbachia invasion. As before, let the wildtype-only, Wolbachia-only and mixed type classes be S1, S2 and S3 respectively. We denote the first time at which the Wolbachia-only class is entered as T=inf{t≥0:X(t)∈S2}, so that the probability of entering into the Wolbachia-only class at state (0,w′)∈S2 having started in state (m,w)∈S3 is Gómez-Corral and López García (2012) Clearly, the probability of entering the Wolbachia-only class at (0,w′) is 1 if the current state is (0,w′) and 0 if it is contained in S1, S2\{(0,w′)} or if it is (0, 0). Let a(0,w′)=a(m,w)(0,w′):(m,w)∈S3 be a column vector of the probabilities of entering into S2 at (0,w′) from each state in S3. Let q(0,w′) be a column vector containing the transition rates from each state in S3 to (0,w′). Then a(0,w′) can be found by solving the linear system of equations: Here Q3 denotes the sub-Q matrix corresponding to the mixed household states in S3. The system of Eqs. (12) follows directly from Theorem 3.3.1 in Norris (1997), where the subset to be ‘hit’ (reached) is simply {(0,w′)}. The same method can be used analogously to find the probabilities of entering the wildtype-only class at a given state from any given state in S3 by altering a and q accordingly. The probability of a successful Wolbachia invasion starting from a mixed state (m, w) is hence the sum of all the individual probabilities of entering S2 from (m,w)∈S3 via each of the states in S2. Time until Wolbachia invasion Standard Markov chain theory (Norris 1997) can be extended to find the expected time until Wolbachia invasion. This is the time at which the household first enters a state in the Wolbachia-only class. Let τ(k,l)∗ be the expected time until the Wolbachia-only class S2 is reached from state (k,l)∈S2∪S3 (a Wolbachia-only or mixed state), conditional on the event that S2 is reached from state (k, l). Let a(k,l)∗ be the probability of reaching S2 from state (k, l). We determine the expected time until successful Wolbachia invasion originating from a mixed state in S3 by solving the linear system (Gómez-Corral and López García 2012): Recall that τ(k,l)∗=0 for any (k,l)∈S2. That is, the time until a Wolbachia-only state is reached is 0 if the current household state is Wolbachia-only. Details of the derivation of Eqs. (13) are given in the Appendix H. The expected time until the wildtype-only class S1 is reached from any mixed state can be calculated analogously by taking (k,l)∈S1∪S3. Quantifying the transient dynamics Here we introduce some tools from matrix population theory (Caswell 2000) to calculate key quantities in our CTMC model. These quantities give indications of the expected time until the system reaches the QSD and the uncertainty associated with different regions of the state space. We can derive the damping ratio ρ from Eq. (9) as described in Caswell (2000); see Appendix G. Since we do not include the absorbing state in P(t), in our system the damping ratio quantifies the rate of convergence to the QSD and is defined as The difference between the two eigenvalues is called the spectral gap and is often used to quantify the convergence of a Markov chain (Keeling and Ross 2008; Dambrine and Moreau 1981). We can therefore use the damping ratio as an indicator of how close the system is to the QSD. The state entropy is another useful characterisation of the transient dynamics. Entropy measures how uncertain we are of the next state to be reached given we know the current state. For continuous-time processes (Spencer and Susko 2005) we calculate the entropy using the jump matrix of the CTMC which is composed of the probabilities si,j that a process in state i moves next to state j and Recall from Sect. 3 that qi is equivalent to -qi,i. The entropy of state i is defined as The state entropy accounts for the proportion of transitions that have non-zero rates, and their relative magnitudes (Hill et al. 2004). We will use the entropy to identify household states for which the dynamics are most uncertain because they give rise to larger numbers of possible stochastic pathways. Tutorial model - household with up to 3 female mosquitoes To aid understanding of the theory outlined above, in this section we work through a tutorial model. We set the upper bound on the number of (female) mosquitoes in the household at C=3. These mosquitoes can be wildtype or Wolbachia-infected. This configuration yields a small state space with just 9 transient states plus (0, 0), which facilitates visualisation of the communicating classes, the QSD and the associated dynamics. Figure 4 shows a state transition diagram which details the composition of the communicating classes outlined in Sect. 3.2. Although the maximum household size is much smaller than we would expect to observe in reality, the characteristic dynamics of the system are informative. Schematic of the communicating classes in the 3 mosquito model. The states in the mixed class S3 are shaded green, the states in the wildtype-only class S1 are orange and the states in the Wolbachia-only class S2 are blue. Parameterisation We parameterise the 3 mosquito model as in Table 1 except for setting C=3 and b=0.3 corresponding to a wildtype-only deterministic steady state of x∗=2. We also set the fitness cost of infection 1-ϕ=0.3 and assume perfect transmission v=1. We chose these parameters to effectively illustrate how we use the mathematical techniques and interpret the transient dynamics of the system. In later sections, we will move towards a more realistic parameter regime supported by the literature (Hughes and Britton 2013). Larval competition parameters h and k remain the same as in Table 1. No reproduction occurs in households where the population has reached the upper bound. Results We use the methodology described in Sect. 3 to determine the QSD and related metrics for the system with households of up to 3 mosquitoes. Table 3 shows the minimal magnitude eigenvalues of each of the communicating classes along with the quasi-stationary distribution derived from the eigenvector associated with overall minimal magnitude eigenvalue. This eigenvalue arises from the wildtype-only class. The second smallest eigenvalue in magnitude arises from the Wolbachia-only class. This indicates that the probability mass leaves S2 more quickly than it leaves S1. Consequently, for sufficiently large time, almost all of the probability mass outside of the absorbing state is in S1, and distributed according to the QSD. The QSD only holds non-zero probability mass in the states of the wildtype-only class. The minimal magnitude eigenvalue of class S3 is much larger than those of the other two classes. This indicates that the probability mass quickly moves out of the mixed class S3, then more slowly moves out of the wildtype-only and Wolbachia-only classes, S1 and S2, and into the absorbing state. Table 3Key results for the model with households of up to 3 mosquitoes. Minimal magnitude eigenvalues of each class (see Sect. 3.2 for an explanation of the class structure), the probability of reaching the Wolbachia-only class (see Sect. 3.3), expected time to reach the Wolbachia-only class conditional on reaching the class (see Sect. 3.4), probability and expected time (conditional on reaching the class) to reach the wildtype-only class (see Sects. 3.3 and 3.4) and the QSD (see Sects. 3.1 and Appendix Sect. A.1). In the QSD vector, the first three terms correspond to the states (1, 0), (2, 0), (3, 0).ResultNumerical valuesMinimal magnitude eigenvalues for each communicating class-0.047 (S1), -0.052 (S2), -0.183 (S3)Quasi-stationary distribution[0.390, 0.348, 0.263, 0, 0, 0, 0, 0, 0]Probability of reaching Wolbachia-only class from mixed state (m, w)0.524 (1, 1), 0.682 (1, 2), 0.349 (2, 1)Conditional expected time (days) to reach Wolbachia-only class from mixed state (m, w)5.03 (1, 1), 5.35 (1, 2), 7.80 (2, 1)Probability of reaching wildtype-only class from mixed state (m, w)0.477 (1, 1), 0.318 (1, 2), 0.651 (2, 1)Conditional expected time (days) to reach wildtype-only class from mixed state (m, w)4.81 (1, 1), 7.59 (1, 2), 5.13 (2, 1) Key results for the model with households of up to 3 mosquitoes. Minimal magnitude eigenvalues of each class (see Sect. 3.2 for an explanation of the class structure), the probability of reaching the Wolbachia-only class (see Sect. 3.3), expected time to reach the Wolbachia-only class conditional on reaching the class (see Sect. 3.4), probability and expected time (conditional on reaching the class) to reach the wildtype-only class (see Sects. 3.3 and 3.4) and the QSD (see Sects. 3.1 and Appendix Sect. A.1). In the QSD vector, the first three terms correspond to the states (1, 0), (2, 0), (3, 0). In Figs. 5a and 5b we show the dynamics of the transient state probability distribution over an interval of 525 days. We condition on non-extinction and an initial probability distribution P(1,1)(0)=1 corresponding to one wildtype and one Wolbachia-infected (female) mosquito. The initial phase of the dynamics is most clear in Fig. 5b, which shows the first 100 days. The probability in the mixed states of class S3 quickly decays away in the first 40 days, accumulating in the wildtype-only or Wolbachia-only states of the S1 and S2 classes. In the next phase, shown in Fig. 5a, the probability mass decays out of the these classes and into the absorbing state. However, the decay is faster from S2 and the distributions are conditioned on non-extinction. Therefore, the conditioned probability mass in the Wolbachia-only states decays towards zero, and the probability mass in the wildtype-only states steadily increases towards to the QSD. Probability distribution of all transient states over time, conditioned on non-extinction and initial state being (1, 1) with probability 1. Parameter values are as stated in Subsection 4.1. The legend details the transient state that each coloured probability distribution curve refers to in both figures. (a) Over 525 days and (b) enlargement of the first 100 days. The dashed lines indicate the QSD values for the wildtype-only states. The QSD does not depend on the initial number of wildtype and Wolbachia-infected mosquitoes, so cannot be used to determine whether a release of Wolbachia-infected mosquitoes will successfully invade. The QSD is based on the probability mass dynamics of large ensembles of concurrent and independent realisations of the process, in our case corresponding to independent households. Any single realisation of the stochastic process will at some point either enter the wildtype-only class, and remain there until extinction, or enter the Wolbachia-only class and remain there until extinction. Within either of these classes, the probability mass decays to zero at a rate given by the minimal magnitude eigenvalue of the class and with stable state distribution given by the associated eigenvector (see Appendix Sects. I.1 and I.2 for a detailed justification). Table 3 also gives the probabilities of reaching the Wolbachia-only class from each mixed state (m, w) with m>0 and w>0. We define this to be a successful invasion in the stochastic model context. The complements of these values are the probabilities of reaching the wildtype-only class. From (1, 1), the probability of reaching the wildtype-only, and the probability of reaching the Wolbachia-only class, are both close to 0.5. This is intuitive since the sequences of birth-death events required to reach either class are the same, and the probabilities of these sequences are similar when ϕ is close to 1. If the initial number of wildtype mosquitoes is larger than the number of Wolbachia-infected mosquitoes, the chance of reaching the wildtype class increases because the probability of wildtype births occurring is much larger than that of Wolbachia-infected births. The pattern is reversed if there are initially more Wolbachia-infected mosquitoes. The expected time required to reach the Wolbachia-only class from a mixed state is smallest from (1, 1) and largest from (2, 1). The expected time required to reach the wildtype-only class is also smallest from (1, 1) and largest from (1, 2). The damping ratio calculated from the minimal eigenvalues of classes S1 and S2 allows us to estimate the convergence time to the QSD. The QSD is reached when the remaining probability mass in S2 is negligible compared to that in S1. The time until the total probability mass in S1 is 10 times that in S2 is log(10)/log(ρ) (Caswell 2000). This value, along with the expected times for the probability mass in S1 to reach 100 and 1000 times that in S2 are shown in Table 5. Notice how these values are much larger, of the order several hundred days, than the expected time of around 6 days it takes to leave the mixed class S3 (shown in Table 3). Table 5Damping ratio between classes S1 and S2, ρ=exp(α1-α2) and the time until the probability mass in class S1 is 10, 100 and 1000 times the probability mass in S2 as the system approaches the QSD. Results are shown for the model with households of up to 3 female mosquitoes, up to 30 female mosquitoes with perfect vertical transmission (no reversion) and with imperfect vertical transmission (reversion).Quantity3 mosquitoes30 mosquitoes no reversion30 mosquitoes reversionDamping ratio ρ1.011.001.01log(10)/log(ρ)410977219log(100)/log(ρ)8211954438log(1000)/log(ρ)12312931656 Damping ratio between classes S1 and S2, ρ=exp(α1-α2) and the time until the probability mass in class S1 is 10, 100 and 1000 times the probability mass in S2 as the system approaches the QSD. Results are shown for the model with households of up to 3 female mosquitoes, up to 30 female mosquitoes with perfect vertical transmission (no reversion) and with imperfect vertical transmission (reversion). The individual state entropies further elucidate the transient dynamics of the system. These quantities indicate how certain we are of the next state to be reached given the current state. In Fig. 6 values closer to 0 correspond to less variable dynamics whereas values closer to 1 indicate greater variability (Brice et al. 2020). There is no variability in the next state that is reached from (0, 3) and (3, 0) because the only possible event in each case is mortality. The entropy for state (0, 0) is 0 because it is absorbing. The highest variability arises from state (1, 1) because there are four possible birth/death events and the probabilities of birth/death events are similar in the wildtype and Wolbachia-infected populations. The entropies for states (1, 0), (2, 0), (0, 1) and (0, 2) are very similar because each of these states can reach two other states via a birth or a death event. However they do differ slightly due to the fitness cost ϕ acting on the Wolbachia-infected birth rate and density dependence effects via F. In comparison to these states, the entropies for states (1, 2) and (2, 1) are lower because the only possible events are wildtype or Wolbachia-infected mortality. Individual entropies (uncertainty) of the next state to be reached given the current state. Evaluated in the model with households of up to 3 mosquitoes and parameter values as stated in Subsection 4.1. Full model - households of up to 30 female mosquitoes We now reparameterise the model so that a household can contain up to 30 female mosquitoes. This is a more realistic upper bound for a typical infestation. We choose parameters in such a way that in the deterministic model, the wildtype-only steady state is given by x∗=10. This value agrees with the mean-field model (1)–(2) from Sect. 2 scaled to household area. As before, we set the per capita birth rate b to achieve this steady state. Other parameters are in line with Hughes and Britton (2013) and given in Table 1. The fitness cost of Wolbachia infection 1-ϕ is set to 0.15 unless otherwise stated. The vertical transmission probability is set to v=1, so that Wolbachia-infected mosquitoes can only produce infected offspring and there is no possibility of reversion from a Wolbachia-only state to a mixed state. The total transient state space S is decomposed as described in Sect. 3.2, where S1={(m,0):00andm+w≤30} is the mixed class. A key aim of our analysis is to explore how stochasticity affects the transient and asymptotic dynamics previously identified in the deterministic system. In particular, we will examine how the deterministic bistability between the wildtype and Wolbachia-only steady states manifests in the stochastic model. Results The minimal magnitude eigenvalues of each communicating class are shown in Table 4. As before, the overall minimal magnitude eigenvalue is associated with the wildtype-only class and the second minimal magnitude eigenvalue is associated with the Wolbachia-only class. The difference between these two eigenvalues is larger than the magnitude of the wildtype-only minimal magnitude eigenvalue, implying the QSD is valid. The QSD is shown in Fig. 16 in the Appendices. It only has non-zero probability mass in the wildtype-only states and is concentrated around the deterministic steady state x∗=10. The probabilities of household states with 28 or more female mosquitoes are close to 0, justifying our upper bound on household size. The damping ratio between classes S1 and S2 as the system approaches the QSD are shown in Table 5. In comparison with the model with households of up to 3 female mosquitoes (Sect. 4), the expected number of mosquitoes in the household is much larger (approximately 8 in the wildtype-only QSD, 5 in the Wolbachia-only QSD; see Appendix F) but the damping ratio indicates that the time to reach the QSD is only 2.4 times greater. Table 4Minimal magnitude eigenvalues of each communicating class in model with up to 30 female mosquitoes in a household, with reversion (v=0.9) and without reversion (v=1).ModelS1S2S3No reversion-0.002-0.007-0.079Reversion-0.002-0.013 Minimal magnitude eigenvalues of each communicating class in model with up to 30 female mosquitoes in a household, with reversion (v=0.9) and without reversion (v=1). QSD for the model with households of up to 30 female mosquitoes, perfect vertical transmission (v=1), 1-ϕ=0.15 and larval density function (5). Any states not shown have probability equal to 0. Figure 7 shows the probability distribution over time for classes S1 and S2, conditioned on non-extinction. The initial household state is (5, 5) with probability 1. We chose (5, 5) as the initial condition since it has one of the largest individual state entropies (see Fig. 10) and so allows a broad array of possible stochastic trajectories. The mixed states do not hold significant probability mass for long and are disregarded (not shown in Fig. 7). The conditional probability mass in S2 initially grows faster than in S1 due to the reproductive advantage of Wolbachia infection conferred by CI. Each class then settles into a regime of exponential decay (to the absorbing state) with a stable state probability distribution well approximated by the QSD for the class in isolation. We provide some analytic insight into these dynamics in Appendix I.2. Conditioned on non-extinction as in the Fig. 7, the probability accumulates in the wildtype-only class as the fitness cost of infection drives extinction more quickly in the Wolbachia-only class. Dynamics of the probability distribution for the wildtype-only and Wolbachia-only classes conditioned on non-extinction. The class probability is the sum of the probabilities for all states in that class. For the model with households of up to 30 mosquitoes, perfect vertical transmission (v=1), 1-ϕ=0.15 and larval density function (5). Initially P(5,5)(0)=1. For small t some of the probability mass is in the mixed class S3 but this quickly decays and has been omitted here. Entropy of state (Nm,Nw). Higher entropy corresponds to greater uncertainty in the next state. The maximum number of female mosquitoes in household is 30, parameters are as in Table 1, 1-ϕ=0.15, v=1, larval density function is (5). The top right quadrant shaded grey is not an admissible region of the state space. There is some variation in the entropy along the first row and the first column of the diagram due to density dependence but it is too small to detect in the shading. Figure 8 demonstrates how the deterministic bistability manifests in the stochastic model. Under the deterministic framework, we plotted the invasion threshold for Wolbachia-infected mosquitoes with household size N0=10. This threshold separates the basins of attraction of the wildtype-only and Wolbachia-only steady states and is also shown in Fig. 8 for comparison. In the stochastic context, there is no such hard boundary. A Wolbachia invasion is ‘successful’ if the associated stochastic trajectory enters the Wolbachia-only class. Figure 8 shows the probabilities of successful Wolbachia invasions depending on the fitness cost of infection 1-ϕ∈[0,0.9] and the initial proportion of Wolbachia-infected mosquitoes in the household. If the household contains a non-zero proportion of Wolbachia-infected mosquitoes there is a positive probability of successful Wobachia invasion. This probability decreases as the fitness cost of infection 1-ϕ increases, and increases as the initial proportion of mosquitoes that are Wolbachia-infected increases. However, the probability of invasion is not constant along the deterministic invasion threshold. When the fitness cost of infection is low, the deterministic threshold suggests that only a small number of Wolbachia-infected mosquitoes are required for successful invasion. However, in the stochastic model, small Wolbachia-infected populations are prone to chance extinction and the probability of successful invasion from the initial population specified by the deterministic threshold is relatively low. The red crosses in Fig. 8 indicate where the probability of a successful Wolbachia invasion is greater than or equal to 0.9. Observe that when 1-ϕ=0.15, at least 80% of the mosquitoes in the household need to be Wolbachia-infected in order for invasion to be successful with probability greater than or equal to 0.9. In Fig. 8 the total number of mosquitoes in the household is conserved while the proportion of Wolbachia-infected mosquitoes is varied. In Appendix C we show corresponding results when the household size is not conserved and the introduction of Wolbachia-infected mosquitoes may push the population size above the wildtype-only steady state. Probability of successful Wolbachia invasion of a household depending on the initial Wolbachia-infected proportion Nw/N0 and fitness cost of infection 1-ϕ with larval density function (5). The initial household size is fixed at N0=10 female mosquitoes and the initial infected proportion is determined by Nw(0) with Nm(0)+Nw(0)=N0. Households can have up to 30 female mosquitoes and v=1. The solid lines and text show the stable steady states, basins of attraction and invasion threshold of the corresponding deterministic model. The red crosses indicate where the probability of successful Wolbachia invasion is greater than or equal to 0.9. Figure 9a shows how the probabilities of entering the Wolbachia-infected class depend on the initial state (m, w), which allows for resident populations above or below the steady state. As in Fig. 8, we overlay the corresponding deterministic boundary. Along the boundary line, we find that the probability of successful Wolbachia invasion stays fairly consistent; as long as there are at least 3 wildtype (female) mosquitoes in the household, the probability of invasion is close to 0.23. The red crosses indicate, for different wildtype mosquito numbers, the minimum number of Wolbachia-infected mosquitoes required for Wolbachia invasion to be successful with a probability greater than or equal to 0.9. Figure 9b shows how the expected time until Wolbachia invasion depends on the initial state. Larger wildtype populations increase the expected time required to enter the Wolbachia-infected class because it takes longer for them to die out. But, in all cases, the time for the invasion dynamics to resolve is of the order 50 days or less. (a) Probability of entering the Wolbachia-infected class when the initial state is (Nm(0),Nw(0)). The solid black line is the corresponding deterministic threshold (Fig. 3). Red crosses denote, for different wildtype mosquito numbers, the minimum number of Wolbachia-infected mosquitoes required for successful invasion with probability 0.9 or higher. Note that, if there are more than 10 wildtype female mosquitoes present, the number of Wolbachia-infected mosquitoes required for a successful invasion with probability 0.9 or higher is outside of the state space. (b) Expected time in days to enter the Wolbachia-infected class, conditional on this event occurring, when the initial state is (Nm(0),Nw(0)). The red bar indicates initial conditions where only wildtype mosquitoes are present and so the Wolbachia-infected class cannot be reached. In both diagrams the maximum number of female mosquitoes in a household is 30, the initial state probability distribution is P(Nm(0),Nw(0))(0)=1, parameters are as in Table 1, 1-ϕ=0.15, v=1, and the larval density function is (5). The top right quadrant shaded grey is not an admissible region of the state space. Figure 10 shows the state entropy for each state in S. Larger entropy values correspond to a higher uncertainty in the next transient state the household will visit. Entropy is highest for the evenly mixed states in S3 because the number of possible events is maximised, and the event probabilities are evenly weighted. Entropy is lower for states in the wildtype-only or Wolbachia-only classes because the number of possible events is smaller. For the mixed states, the entropy is lowest at the maximum household size because the only possible events are wildtype or Wolbachia-infected mortality. The entropy is zero for the boundary states (30, 0) and (0, 30) since only a single mortality event is possible next. So the entropy may give an indication of how close the household is to the wildtype-only or Wolbachia-only class. In contrast to the deterministic model, in the stochastic framework a successful Wolbachia invasion does not establish the population permanently. The small population size and random walk of the population dynamics eventually lead to extinction and the household enters the absorbing state (0, 0). It is then vulnerable to repopulation by wildtype mosquitoes. Figure 11 shows the conditional expected times until extinction of Wolbachia-only household populations with up to 30 females calculated using a similar method to that described in Sect. 3.4; see Appendix E for more details. Expected extinction time increases with population size, but saturates. For population sizes at the deterministic steady state of 7 Wolbachia-infected female mosquitoes, the extinction time is 167 days, suggesting regular release may be needed to provide long term household protection. Expected time until extinction for a household population with no wildtype mosquitoes and up to 30 Wolbachia-infected female mosquitoes. Parameters are as in Table 1. The fitness cost of Wolbachia infection is 1-ϕ=0.15, v=1 and larval density function is (5). In the next section we will consider imperfect vertical transmission, so the offspring of Wolbachia-infected females are wildtype with probability 1-v, where v<1. This means a household in a state in the Wolbachia-only class can move to a state in the mixed class and subsequently to the wildtype-only class. We will call this reversion. Note that reversion is a separate process to the complete extinction of Wolbachia-infected mosquitoes and subsequent reconolisation by a new population of wildtypes. However, the random walk of the Wolbachia-infected population towards extinction can work synergistically with imperfect vertical transmission to speed up reversion. Reversion to wildtype Model setup If vertical transmission is imperfect (v<1) then some offspring of Wolbachia-infected mosquitoes are wildtype and states in S3 are accessible from S2, and vice-versa. So the state space S decomposes into two communicating classes. We relabel the communicating classes such that S1={(m,0):00,01 communicating classes denoted S1,S2,…,SL. Let Qk be the submatrix of Q composed of the transition rates between the states in Sk. A class Si is accessible from a class Sj, written Si≺Sj, if starting from any state in Sj, we are able to reach any state in Si via some sequence of state transitions. Since Si and Sj are distinct communicating classes, the converse is not true; Sj cannot be reached from Si. We order the communicating classes in such a way that Si≺Sj implies that j>i; such an ordering exists because there cannot exist i, j, k distinct with Si≺Sj≺Sk and Si≻Sk, since Si,Sj,Sk are distinct communicating classes. One might visualise this structure as a cascade — probability mass always moves through the communicating classes down the ordering. The lowest class in the ordering, S1, is termed the minimal class (Doorn and Pollett 2013). The states themselves must be labelled in such a way that Q is of lower-triangular block form and the sub-Q matrices, Qk, reside along the diagonal of Q. If necessary, the states can be relabelled to achieve this. The matrices Qk must be ordered as described above, with the matrix Q1 positioned in the top left hand corner of Q. This is the transition matrix that corresponds to communicating class S1, which is accessible from at least one of the classes higher up the order e.g. S2, S3 etc. The set of eigenvalues of Q is equal to the union of the sets of eigenvalues of the Qk matrices. The minimal magnitude eigenvalues of each Qk, which we denote -αk, are all unique (within the set of eigenvalues of Qk), simple and negative. Hence, the minimal magnitude eigenvalue of Q is the smallest of the set of minimal magnitude eigenvalues of the Qk. That is, the minimal magnitude eigenvalue of Q is -α:=-minkαk (Seneta 2006). The QSD is, as in the irreducible case, the left eigenvector of Q corresponding to -α normalised to sum to 1. If the algebraic multiplicity of -α is greater than one, then α=αk in at least two values of k. In this case, the QSD is given by the eigenvalue-eigenvector pair of Q corresponding to the minimal communicating class, as defined above. State distribution in the main text stochastic model, v=1 Figure 16 shows the quasi-stationary distribution for the system modelled in Sect. 5.1 in the main text. Alternative larval density dependence function All results in the main text come from models that use the function F(N) for density dependent competition at the larval stage where This function was first introduced in Dye (1984), and used in many subsequent studies including (Hughes and Britton 2013). A simpler alternative to F(N) is G(N) given by Qu et al. (2022) Here we reproduce our main results using G(N). We use the same parameter regime as in Table 1. As before, we determine the per capita birth rate b by fixing the wildtype-only steady state at x∗=10 and solving bx∗G(x∗)=dx∗. The shape of G(N) results in b=0.18, much lower than the b=0.54 obtained with F(N). Bistability in the mean-field model Figure 17 shows the stability and basins of attraction of the steady states of the mean-field model (1)–(2). As before (Fig. 2) we observe a bistable region. However, the lower birth rate associated with G(N) means that the bistable region is much smaller as the Wolbachia-only steady state only exists when 1-ϕ<0.33. Stability and attraction of the steady states of system (1)–(2), with larval density function (6), depending on the fitness cost of Wolbachia infection 1-ϕ and the initial proportion of the mosquito population that is Wolbachia-infected Nw(0)/N0. Here u,v=1 and N0=10. The diagram is divided along the horizontal axis into a region where the wildtype-only (E1) and Wolbachia-only (E2) steady states exist and are bistable, and a region where the unique non-trivial steady state is wildtype-only, and stable. The bistable region is further divided along the vertical axis into regions of initial conditions in the basins of attraction of E1 or E2. The invasion threshold under the bistable region is labelled in blue text. All of our stability analysis plots are produced using the open source software bSTAB (Stender and Hoffmann 2022). Figure 18 shows the basins of attraction across the full set of feasible initial conditions at a parameter location in the bistable region. The alternative density dependence function G(N) does not significantly change the results (compare with Fig. 3). Stability and attraction of steady states of system (1)–(2) depending on the initial numbers of female wildtype Nm(0) and Wolbachia-infected Nw(0) mosquitoes. Here u,v=1 and 1-ϕ=0.15, with larval density function (6). Indicated on the diagram are the regions of initial conditions in the basins of attraction of the wildtype-only (E1) or Wolbachia-only (E2) steady state. The grey triangle covers populations outside our upper bound on the total female mosquito population size. The dashed blue line indicates where Nm(0)+Nw(0)=10, corresponding to 1-ϕ=0.15 in Fig. 17. State distributions and invasion probabilities in the stochastic model, v=1 The larval density dependence function does not affect the structure of the communicating classes (Sect. 5). The overall minimal magnitude eigenvalue, and hence the QSD, is still associated with the wildtype-only class. Figure 19 shows the QSD (which has all of its mass in the wildtype-only class). The alternative density dependence function G(N) has little impact on the QSD (compare with Fig. 16) except that the tail to the right is slightly smaller due to the lower birth rate. QSD for the model with households of up to 30 female mosquitoes, perfect vertical transmission (v=1), 1-ϕ=0.15 and larval density function (6). Any states not shown have probability equal to 0. Figure 20 shows the probabilities over time of a household being in the wildtype-only and Wolbachia-only classes, conditioned on non-extinction and initial state probability distribution P(5,5)(0)=1. The alternative density dependence function G(N) has little impact on the distribution (compare with Fig. 7) but the distribution converges slightly faster to the QSD. This observation is corroborated by the damping ratio. Dynamics of the probability distribution for the wildtype-only and Wolbachia-only classes conditioned on non-extinction. The class probability is the sum of the probabilities for all states in that class. For the model with households of up to 30 mosquitoes, perfect vertical transmission (v=1), 1-ϕ=0.15 and larval density function (6). Initially P(5,5)(0)=1. For small t some of the probability mass is in the mixed class S3 but this quickly decays and has been omitted here. Figure 21 shows how the fitness cost of infection 1-ϕ affects the probability of successful Wolbachia invasion (i.e. reaching a Wolbachia-only state) in a household containing a total of N0=10 female mosquitoes, of which a proportion Nw(0)/N0 are Wolbachia-infected. The alternative density dependence function G(N) has little impact on the correspondence between the deterministic bistability and the stochastic invasion probability (compare with Fig. 8). As such, G(N) tends to shift regions with high probability of reaching the Wolbachia-only state to lower values of 1-ϕ. There is little change between Figs. 9a and 22a. However, the expected time until Wolbachia invasion increases overall (compare Figs. 9b and 22b) due to the decrease in birth rate. Probability of successful Wolbachia invasion of a household depending on the initial Wolbachia-infected proportion Nw/N0 and fitness cost of infection 1-ϕ with larval density function (6). The initial household size is fixed at N0=10 female mosquitoes and the initial infected proportion is determined by Nw(0) with Nm(0)+Nw(0)=N0. Households can have up to 30 female mosquitoes and v=1. The solid lines and text show stable steady state, basins of attraction and invasion threshold of the corresponding deterministic model. The red crosses indicate where the probability of successful Wolbachia invasion is greater than or equal to 0.9. (a) Probability of entering the Wolbachia-infected class when the initial state is (Nm(0),Nw(0)). The solid black line is the corresponding deterministic threshold (Fig. 18). Red crosses denote, for different wildtype mosquito numbers, the minimum number of Wolbachia-infected mosquitoes required for successful invasion with probability 0.9 or higher. Note that, if there are more than 9 wildtype female mosquitoes present, the number of Wolbachia-infected mosquitoes required for a successful invasion with probability 0.9 or higher is outside of the state space. (b) Expected time in days to enter the Wolbachia-infected class, conditional on this event occurring, when the initial state is (Nm(0),Nw(0)). The red bar indicates initial conditions where only wildtype mosquitoes are present and so the Wolbachia-infected class cannot be reached. In both diagrams the maximum number of female mosquitoes in a household is 30, the initial state probability distribution is P(Nm(0),Nw(0))(0)=1, parameters are as in Table 1, 1-ϕ=0.15, v=1, and the larval density function is (6). The top right quadrant shaded grey is not an admissible region of the state space. Figure 23 shows the individual state entropies, a measure of the uncertainty in the next state to be visited. The alternative density dependence function G(N) has little impact on the state entropies, except close to the boundary Nm+Nw=C, where they are markedly reduced (compare with Fig. 10). This reduction is due to a much stronger larval density effect close to the maximum population size C (see Fig. 1) which reduces the probability of a birth occurring in states close to the boundary. Entropy of state (Nm,Nw). Higher entropy corresponds to greater uncertainty in the next state. The maximum number of female mosquitoes in household is 30, parameters are as in Table 1, 1-ϕ=0.15, v=1, larval density function is (6). The top right quadrant shaded grey is not an admissible region of the state space. Figure 24 shows the expected time until extinction for a Wolbachia-only household. The alternative density dependence function G(N) reduces the time to extinction (compare with Fig. 11). This reduction is a consequence of the lower birth rate. Expected time until extinction for a household population with no wildtype mosquitoes and up to 30 Wolbachia-infected female mosquitoes. Parameters are as in Table 1. The fitness cost of Wolbachia infection is 1-ϕ=0.15, v=1 and larval density function is (6). State distributions and invasion probabilities in the stochastic model with reversion, v=0.9 We next present results for the model with households of up to 30 female mosquitoes with parameters comparable to the mean-field model (1)–(2) where vertical transmission is imperfect, v=0.9. As above, we use the larval density dependence function (6) and set the fitness cost of Wolbachia infection to 1-ϕ=0.15 unless otherwise stated. The communicating class structure is the same as in Sect. 6. The QSD is once again identical to the QSD in the previous Sect. B.2 (see Sect. 6.2), so is omitted. The probability distribution of the household states over time (conditioned on non-extinction and P0(5,5)=1; Figure 25) is similar to that of Fig. 12 but converges slightly faster to the QSD. Dynamics of the probability distribution for the wildtype-only class and Wolbachia-only classes conditioned on non-extinction when vertical transmission is imperfect. Note that the Wolbachia-only class is not a communicating class here. The class probability is the sum of the probabilities for all states in that class. For the model with households of up to 30 female mosquitoes, v=0.9, 1-ϕ=0.15, larval density function is (6). Initially P(5,5)(0)=1. Repeating the sensitivity analysis we carried out in Sect. 6 with the alternative larval density dependence function G(N), we obtain similar results (Fig. 26 and Fig. 27), although the reversion probability is slightly lower. The average reversion probability conditioned on initially reaching the Wolbachia-only state from an initial mixed state (m, w) for 00, the maximal magnitude of the diagonal entries of Qk. Since Sk is a communicating class, for all i,j∈Sk, there exist an n∈N and i=i0,i1,…,in=j∈Sk such that (Qk)ir,ir+1>0 for all r∈{0,…,n-1}. Therefore Qk+akI is a non-negative irreducible matrix. Hence we can apply the Perron-Frobenius Theorem to Qk+akI. This tells us that there exists a unique left eigenvector l of the matrix Qk+akI such that each entry of l is positive, and a unique right eigenvector u of the matrix Qk+akI such that each entry of u is positive, both with the same positive eigenvalue bk. The eigenvalue bk is the largest eigenvalue of Qk+akI, and is simple. Letting -αk=bk-ak, we have that lQk=-αkl and Qku=-αku, and -αk is the largest eigenvalue of Qk and is simple. Therefore, there exists an invertible matrix Ak such that Qk=AkΛkAk-1, where n=|Sk|-1 and 0n×1=01×n⊤ is a column vector of zeros and Λk′ is a Jordan normal matrix with diagonal entries strictly less than -αk. Since (QkAk)i1=∑j∈Sk(Qk)ij(Ak)j1=(AkΛk)i1=-αk(Ak)i1, it holds that (Ak)i1=c~ui for some constant c~. Since (Ak-1Qk)1i=∑j∈Sk(Ak-1)1j(Qk)ji=(ΛkAk-1)1i=-αk(Ak-1)1i, we have also that (Ak-1)1i=cli for some constant c. Since ∑i∈Sk(Ak-1)1i(Ak)i1=1, we have ∑i∈Skcc~liui=1. Therefore we can assume that u and l are chosen in such a way that (Ak)i1=ui, (Ak-1)1i=li and l·u=1. For i,j∈Sk and t≥0, we have Norris (1997) since, by the class structure of the Markov chain, for n∈N and i=i0,i1,…,in=j∈S with i,j∈Sk and in′∉Sk for some n′∈{1,…,n-1} we have Qi0,i1Qi1,i2…Qin-1,in=0. Therefore By (I14), we also have that where the entries of Bk(t) are all at most t|Sk|-2e-αk′t, where -αk′<-αk is the second largest eigenvalue of Qk. So substituting in (I16), it holds that as t→∞ where eigenvectors l and u are both positive and satisfy lQk=-αkl, Qku=-αku and l·u=1, and -αk is the largest eigenvalue of Qk. This is the required result. Claim 2: Quasi-stationary distribution with a class Secondly, in Sect. 3.2 we claimed that the probability dynamics in our system in S2 will enter their own kind of quasi-stationary distribution and that the same holds for S1 (which is trivial since the QSD of the full system only holds positive probability mass in S1). We prove this claim next below. Fix k∈{1,2} and j∈Sk, then the probability that the Markov chain is at state j at time t, given that it started at state i∈S3 and given that it is in Sk at time t is Our strategy will be to show that given X(0)=i, the events {X(t)=j} and {X(t)∈Sk} are very unlikely to occur unless the Markov chain is already in class Sk at an earlier time ct, for suitable c<1. Then between the times ct and t, the Markov chain can get close to the QSD in Sk. Recall from Sect. 5.1 that α3>αk (see first row of Table 4). So we can take c<1 sufficiently large that α3c>αk. Then it holds that That is, the probability the Markov chain is at state j at time t (given it started at state i) can be partitioned into the sum of the probabilities that the Markov chain has already entered Sk at time ct or that the Markov chain is still in S3 at time ct. Clearly, where the last line follows by (I18) because P(X(ct)=j′|X(0)=i)=Oe-α3ct for each j′∈S3. For the first term on the right hand side of (I20), since if X(1)∈Sk and X(t)∈Sk then X(ct)∈Sk, we can fix j0∈Sk and write where the last line follows by the Markov property at time 1. By (I18), and since j,j0∈Sk, we have P(X(t-1)=j|X(0)=j0)≳e-αk(t-1) as t→∞. Since P(X(1)=j0|X(0)=i)>0 because i∈S3 and j0∈Sk and so i→j0, it follows that P(X(t)=j,X(ct)∈Sk|X(0)=i)≳e-αkt as t→∞. Therefore, where c′=α3c-αk>0 by our choice of c. By (I20) and (I23) we now have where ϵt(j)=Oe-c′t as t→∞. Since (I24) holds for each j∈Sk, we can also write Since we also have P(X(t)∈Sk|X(0)=i)≥P(X(t)∈Sk,X(ct)∈Sk|X(0)=i), it follows from (I25) that for some ϵt′≥0 with ϵt′≤maxj′∈Skϵt(j′), we have Substituting in (I24) and (I26) into (I19), we now have where the last line follows by the Markov property at time ct. For j′∈Sk, by (I18) we have where l(k) and u(k) are the positive eigenvectors of Qk with l(k)Qk=-αkl(k), Qku(k)=-αku(k) and l(k)·u(k)=1 and -αk′<-αk is the second largest eigenvalue of Qk. Therefore, since the u′(k) terms and e-αk(1-c)t terms cancel, we have Finally, substituting into (I27), we can write This completes the proof of our claim. Funding This work was supported by a scholarship from the EPSRC Centre for Doctoral Training in Statistical Applied Mathematics at Bath (SAMBa), under the project EP/S022945/1. Declarations Compliance with ethical standards This study is based solely on mathematical analysis and does not involve human participants, animals, or personally identifiable data. Therefore, no ethical approval or informed consent was required. No new data was created during the study. Competing interests The authors have no competing interests to declare that are relevant to the content of this article. Footnotes Publisher's Note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. References