Science Journaling Club Founded 2024

VOLUME 1, ISSUE 1 · FALL 2024 · ORIGINAL RESEARCH

A Population That Grows on Average Can Still Die Out

Written jointly by the Science Journaling Club

Computational study · Peer-edited by the club review board · LaTeX source · Analysis code · Raw output · Interactive model

Abstract A population in which every individual leaves 1.15 offspring on average grows by 15 per cent a generation and can still go extinct by bad luck alone. We simulated a Galton-Watson branching process and a continuous-time birth-death process, 20,000 replicates per parameter cell, for starting sizes from 2 to 500 and five offspring distributions whose variance ranges from 1.15 to 33.2 with the mean held exactly fixed. The probability of extinction within 100 generations falls below 5 per cent at a starting size of 10.5 under Poisson reproduction, 21.4 under geometric reproduction, and 302.9 under a lottery distribution in which about one individual in twenty-six leaves 30 offspring and the rest leave none. Across the five levels the threshold is close to proportional to the variance: a log-log fit gives a slope of 1.0014 with R² = 0.9994, so the safe size is about 8.8 times the offspring variance at this growth rate. Every simulated cell carries an exact analytic partner, computed along a wholly separate path: we iterate the offspring probability generating function forward, then locate its smallest non-negative fixed point by bisection, and the two answers have to agree. Over the 154 cells with at least ten expected extinctions the mean z-score is −0.048 with a standard deviation of 0.943 and no cell exceeds three standard errors; the two closed forms we can solve independently, 1/m for geometric offspring and the Lambert-W form for Poisson offspring, match our root finder to within 1.3×10−15. Haldane's 1927 approximation for lineage survival, 2s/V, written before anyone could simulate anything, sits within 0.2 to 13.2 per cent of our exact values over a thirty-fold range of variance. The whole study is a computation: the club has no laboratory, observed no animals, and claims nothing about any of them.

What the question actually asks

Begin with the average. Every individual in this population leaves 1.15 offspring and then dies, so the population grows by 15 per cent a generation and doubles in five generations. An average, however, is a summary of many outcomes rather than a promise about any one of them. No individual ever leaves 1.15 offspring. Offspring arrive in whole numbers: zero, one, two, six. The average is only what those whole numbers come to once you have added them all up and divided, and nothing prevents a small population from drawing a run of low numbers long before the average has any chance to assert itself. Worse, the drawing repeats. Twenty individuals who between them happen to leave fourteen offspring have started downhill, and those fourteen must then take their own draw, from the same distribution, with no memory of the twenty that produced them. Nothing in the process remembers that the population has already had a bad generation, and no compensating good generation is owed to it, which is the whole difficulty with small numbers and the reason the arithmetic is worth taking slowly.

The question therefore has two halves. How large must a population with positive mean growth be before reproductive randomness loses the power to kill it, and how far does that size move when reproduction becomes more variable while the average stays exactly where it was?

The second half is what drew us in. Two populations can share an average and share nothing else about how reproduction is distributed among their members, and the difference hides entirely inside the spread. In one, almost everybody leaves one or two offspring. In the other, almost everybody leaves none, and a rare individual leaves thirty. The long-run arithmetic is identical. The short-run risk is not. How large that gap is, and whether a single number as crude as the variance can predict it, is the measurement this article was built to report.

The experiment is the program

The club has no laboratory. No field site, no licence to handle animals, no budget. We have a room, a table and a set of laptops. So when this article says experiment, it means a program that was written, seeded and run, and every number quoted below is printed output from that program rather than an observation of anything alive. Nobody counted a beetle. Nobody watched a population of anything.

The limitation is real, and it governs every claim this article is entitled to make. A simulation cannot tell you whether beetles reproduce the way our model says they do. It can tell you what follows, exactly and checkably, from a set of assumptions you are free to read in the source, and where those assumptions are wrong about the world our numbers are wrong about the world in precisely the same way. Our only defence is to write every assumption down in a place where you can find it and attack it.

The code lives at analysis/extinction-by-bad-luck.py. Every random number comes from a numpy PCG64 generator seeded from the master seed 21091847, with one spawned child stream per parameter cell, so the run reproduces exactly, and the output file linked at the top of this page is the run that produced every figure and table here.

The two models, and what they leave out

Model A is a Galton-Watson branching process, the oldest model in this subject: Watson and Galton built it in 1875 to work out how often aristocratic surnames die out [1]. Generations do not overlap. Every individual alive in a generation independently produces a random number of offspring, drawn from a fixed distribution with mean m, and then dies; the survivors of that draw face the identical rule in the generation after. We fixed m = 1.15 throughout and varied only the shape of the distribution, so that the five variance levels differ in nothing else:

Offspring lawShapeVariance VEventual extinction q from one individual
Poissonmost individuals leave 0, 1 or 21.15000.75099795
Negative binomial, r = 4slightly more spread than Poisson1.48060.79705349
Geometricnegative binomial with r = 12.47250.86956522
Negative binomial, r = 0.25heavily overdispersed6.44000.94634805
Lottery, K = 3096.2% leave nothing, the rest leave 3033.17750.99015744

The sum of n independent draws from each of these families is itself a draw from one named distribution, so a whole generation of any size is produced with a single vectorised call. Closure under addition is an exact identity rather than an approximation, and it is the only reason a study of this size finishes in under three minutes on a laptop.

Model B runs in continuous time. Generations overlap and nothing is synchronised. Each individual gives birth at per-capita rate λ and dies at per-capita rate μ. We held the growth rate r = λ − μ at 0.15 and raised the turnover λ + μ, which is the rate at which demographic variance accumulates, and simulated the process exactly through its embedded jump chain with exponential waiting times, the standard construction going back to Kendall [3] and used as a simulation method by Gillespie [5].

What both models leave out is a good deal longer than what they contain, and the omissions are not accidental. No carrying capacity constrains them. Survivors simply grow for ever at 15 per cent a generation, which no population in the world has ever done. Environmental variation is absent too: the offspring distribution never has a good year or a bad one, and that single omission matters more than anything else in this article, because for real populations environmental stochasticity usually dominates once numbers are above a few dozen [7, 9]. Individuals reproduce independently. Mate finding, crowding, the Allee effect and competition for a shared resource are all absent, as are age structure, sex, space and immigration, and the list could be made longer than the model. Every one of those omissions was chosen rather than overlooked, and every one of them makes the model kinder to the population than the world would be, so the numbers below are a best case and should be read as one. What remains is demographic stochasticity, alone. Isolating it is artificial, and isolation is nonetheless the only way to find out how large the term is on its own.

Checking the simulator against answers we already know

We chose this model class for one reason: it has exact answers, and exact answers let a simulator be caught out rather than merely admired. A probability generating function is a bookkeeping device, and there is nothing deep about it at all. It packs the whole offspring distribution into a single function of a dummy variable s, and composing it with itself once corresponds exactly to letting one generation pass. Write f(s) for that function. The probability that a lineage descended from one individual is extinct by generation G is then exactly the G-fold composition of f with itself, evaluated at zero, and the probability of eventual extinction is the smallest non-negative root of f(s) = s [1, 4].

P(extinct by G | one ancestor) = fG(0),    q = min{ s ≥ 0 : f(s) = s },    P(extinct | N ancestors) = P1N the last identity because the N founding lineages are independent

So every one of our 210 simulated cells in Model A has an exact partner computed a different way, and the comparison is a test the simulator can fail rather than a reassurance it cannot. We computed the root two ways: by bisection on f(s) − s, and, where a closed form exists, by solving that closed form independently. For geometric offspring the closed form is q = 1/m, and our bisection reproduces it with a difference of −4.4×10−16, which is a few times the spacing between adjacent doubles. For Poisson offspring the root is −W(−mem)/m, where W is the Lambert function, which we solved with our own Newton iteration; the difference from bisection is −1.2×10−15, and substituting each root back into its own generating function leaves a residual of at most 1.1×10−16.

The simulation was then compared with that analytic answer, cell by cell, across the whole grid. If the simulator is correct, the quantity (Psimulated − Pexact) divided by the binomial standard error is a draw from a standard normal, and the collection of them across cells should look like a sample from one. We separated out the cells where fewer than ten extinctions were expected, because the normal approximation is worthless there, and tested those instead with an exact Poisson tail probability.

Model A, 154 cells with at least ten expected extinctions: mean z = −0.0482 (standard error of the mean 0.0806), standard deviation of z = 0.9429, largest |z| = 2.471, 8 cells beyond 1.96 where 7.7 are expected, 0 cells beyond 3.
Rare cells, 56 of them: smallest Poisson tail probability 0.2104 (geometric offspring, N = 70, three extinctions seen against 1.13 expected), and none of them falls below 0.001.
Model B, 34 cells: mean z = −0.0340, standard deviation 1.1025, largest |z| = 2.591, 4 cells beyond 1.96; six rarer cells by exact tail, smallest probability 0.0201.

Passing looks like that. The measured curve is the analytic curve, to within the noise that 20,000 replicates leave behind, at every starting size and under every offspring law we tried.

Which raises the question of whether 20,000 replicates is enough, and Figure 1 answers it for a single cell by running that cell out to 200,000 and recording the estimate as the trials accumulate. At 100 replicates the estimate was 0.050 with a 95 per cent interval of ±0.043, which is useless; at 20,000 it was 0.0620 ± 0.0033; at 200,000 it was 0.06139 ± 0.00105 against an exact value of 0.061100. The interval shrinks as the square root of the trial count. The estimate stays inside it. Convergence means nothing more than that.

0.000.020.040.060.080.100.121001,00010,000100,000exact value 0.06110020,000 = our standardreplicates accumulated (log scale)running estimate of P(extinction)shaded: 95 per cent interval
Figure 1. Convergence of the Monte Carlo estimate for one cell: geometric offspring, starting size 20, extinction within 100 generations. The dashed line is the exact value 0.061100 obtained from the generating function. The shaded band is the 95 per cent interval at each trial count, and the dotted vertical line marks the 20,000 replicates used for every cell in the rest of the study. Estimates at 100 and 200 trials are the honest state of a small simulation: not wrong, just uninformative.

The arithmetic

Mean offspring number is 1.15 in every run. The horizon is 100 generations. Each cell rests on 20,000 replicates.

Poisson offspring, starting size 2: extinction in 56.9 per cent of runs. At 10, 5.80 per cent. At 20, 0.34 per cent. The starting size at which the probability crosses 5 per cent is 10.46 by exact calculation, and 10.45 with a standard error of 0.03 from the simulation.

Geometric offspring, variance 2.47, and the same three starting sizes now give 75.70 per cent, 24.71 per cent and 5.92 per cent, so twenty individuals is no longer anywhere near safe. The crossing is at 21.43 exact, 21.41 ± 0.06 simulated.

Lottery distribution, variance 33.18. A population of 100 still goes extinct 37.07 per cent of the time. At 300, 5.28 per cent. The crossing is at 302.86 exact, 302.05 ± 1.47 simulated.

Poisson to lottery is a variance ratio of 28.85. The threshold ratio is 28.95.

The log-log fit across the five levels gives a slope of 1.0014. R² is 0.99940. The intercept puts the constant at 8.83. Level by level, threshold over variance runs 9.10, 8.92, 8.67, 8.44, 9.13.

Figure 2 is those five curves, Figure 3 the fit.

1e-41e-31e-20.11251020501002005005 per centstarting population size N (log scale)extinction probabilityPoisson V=1.15NB r=4 V=1.48geom. V=2.47NB r=.25 V=6.44lottery V=33.2
Figure 2. Extinction probability within 100 generations against starting size, for five offspring distributions with identical mean 1.15. Lines are exact, computed from the generating function; markers are simulated points, 20,000 replicates each, plotted only where the simulated probability is above 1.2×10−4, since below that a cell with 20,000 replicates cannot distinguish a small number from zero. Short vertical ticks on the 5 per cent line mark each threshold. Increasing the spread of reproduction while leaving the average untouched moves the threshold from 10 individuals to 303.
Offspring lawVarianceP at N = 10P at N = 50 N* exactN* simulatedSESmallest grid size whose 95% CI clears 5%
Poisson1.15000.058000.0000010.4610.450.0311
Neg. binomial r = 41.48060.104800.0000513.2113.180.0414
Geometric2.47250.247050.0010521.4321.410.0622
Neg. binomial r = 0.256.44000.572250.0627554.3254.360.1856
Lottery K = 3033.17750.908050.60865302.86302.051.47400

The last column is the flattest statement we can make without any model at all: the smallest size on our grid where the whole 95 per cent interval of the measured extinction probability sits below 5 per cent. For the lottery that size is 400 rather than 303, because our grid jumps from 300 straight to 400 and the interval at 300 straddles the line.

125102040102050100200500Haldane: N* = ln(20) V / 2soffspring variance V (log scale)threshold size N* for 5 per centfilled: branching(Model A)open: birth-death(Model B, V = λ+μ)solid line: our fit,slope 1.0014,R² = 0.9994
Figure 3. Threshold size against offspring variance, both axes logarithmic. Filled markers are the five branching-process levels; open circles are the four birth-death levels of Model B, plotted against their turnover λ + μ, which is that model's variance rate. The solid line is our fitted scaling, slope 1.0014 and R² = 0.9994. The dashed line is Haldane's 1927 approximation carried through to a threshold, N* = ln(20)V/2s, with no fitting of any kind. Two models with different assumptions and a formula from a century ago land on the same line.

Notes from the table

Session one, deciding what to run The first plan was to simulate everything, survivors included, across the whole hundred-generation horizon, and it did not survive contact with a whiteboard. Someone worked out that a population of 500 growing at 15 per cent for 100 generations ends near 590 million individuals, times 20,000 replicates, times 210 cells. That plan lasted four minutes.

The cap, and the argument about it We stop a replicate at 20,000 individuals and call it a survivor, which is a cheat unless the cheat can be bounded. The bound exists. A population of 20,000 still has probability q20000 of dying out eventually, and the worst q in our set is 0.9902, which gives 1.2×10−86. The printed output carries that bound for every parameter set, so nobody has to take it on trust. One of us insisted the bound be printed rather than asserted, which was the right call, because the birth-death model needed a much smaller cap and its bound is only 1×10−6.

The z-scores looked too good The first validation run gave a standard deviation of z of 0.846 across 210 cells, against an expectation of exactly 1. Too small a spread is exactly as suspicious as too large a one, and it took a day to see why. The cause was cells where the exact probability is about 10−7 and no replicate ever goes extinct: the z-score there is mechanically zero and it was dragging the spread down. Holding back the cells with fewer than ten expected extinctions and testing them separately with a Poisson tail moved the standard deviation to 0.943 over 154 cells, which is what it should be.

The birth-death model nearly killed the runtime Our first birth-death configuration took 28 seconds for a single cell, and there were 44 cells to get through. The problem was the escape cap: a population drifting upward at 1.5 per cent per event needs tens of thousands of events to get from 200 individuals to 600. The fix was to set the cap from the tail bound rather than by guessing, which for the gentlest turnover gives 160 instead of 600, and to drop starting sizes above 80, which were far past every threshold anyway. Total runtime came down to 174.5 seconds.

What we argued about longest Whether the lottery distribution is a cheat. About one individual in twenty-six leaves thirty offspring and everybody else leaves none. Nothing reproduces like that. Two of us wanted it dropped. It stayed, because superspreading in epidemics is measured to be nearly that extreme [12, 16], and because dropping the extreme case would have narrowed the variance range to about six-fold and made the scaling claim much weaker. The objection is in section 8 rather than buried here.

How long it takes a population to die

Among the runs that ended at zero, we recorded the generation in which the last individual died, and the pattern was not the one the club expected. More variance kills faster. It kills earliest of all in the populations a reader would have picked out as the safest ones.

With Poisson offspring and a starting size of 2, the populations that died took 5.24 generations on average, with a median of 3; under the lottery distribution at the same starting size the mean is 1.21 generations and the median is 1. Nearly all of those populations died in the first generation, because in a lottery distribution the most likely thing for two individuals to do is leave nothing at all. An individual leaves 30 offspring with probability 1.15/30 = 0.0383 and otherwise leaves none, so two of them leave nothing between them with probability 0.96172 = 0.9248.

Starting size pushes extinction later. Geometric offspring starting at 2 give a mean of 4.17 generations. Starting at 20 gives 13.34. The lottery starting at 500 gives 14.94. Larger populations that fail take longer to fail, because they have to lose more ground, and the conditional distribution has a long right tail in every case: the 95th percentile is regularly two to three times the median. Figure 4 shows the means with their interquartile ranges.

06121824303625102050100200500starting population size N (log scale)generations to extinctionPoisson V=1.15NB r=4 V=1.48geom. V=2.47NB r=.25 V=6.44lottery V=33.2vertical bars: interquartile range
Figure 4. Generations to extinction among the replicates that went extinct, by starting size and offspring law, 20,000 replicates per point. Vertical bars are interquartile ranges of the conditional distribution rather than uncertainty on the mean; standard errors on the means are between 0.01 and 1.2 generations and would be invisible at this scale. Points are dropped where fewer than 30 replicates died, which is why the low-variance laws stop early. Nothing here is a prediction about any species: the units are generations of a model with no carrying capacity.

The practical reading follows. If demographic bad luck is going to take a small population, it takes it quickly, within a handful of generations, while the population is still small enough for anyone monitoring it to think the numbers are just noisy. A population that survives its first twenty generations at this growth rate has mostly escaped: for a single Poisson lineage the probability of extinction is 0.7413 by generation 20 and 0.7510 by generation 100, so the last eighty generations contribute about one per cent of the risk.

The strongest objection we could find

What follows is the case against this article, assembled by the members who wanted the lottery distribution thrown out, and put as strongly as we know how to put it. We have kept it in the body of the article rather than in a footnote, because a study whose strongest criticism appears only in small type at the bottom of a page is a study asking not to be criticised.

The result is arranged. We held the mean fixed and increased the variance by changing the distribution to one that is more and more skewed, and skewness is doing the work rather than variance. In the lottery distribution 96.2 per cent of individuals leave no offspring at all, which is not variance so much as sterility. Of course such a population dies: it dies because almost everybody is sterile and the survival of the lineage depends on a rare jackpot, which is a completely different biological situation from a population where reproduction is merely noisy. Putting the two on a single axis labelled variance invites the reader to believe that one quantity governs extinction risk, when two or three of them do.

We think this objection is partly right, and the pleasant thing about it is that we can measure how right. If variance alone governed the threshold, the ratio of threshold to variance would be constant across our five laws, and it is not quite: the ratio runs 9.10, 8.92, 8.67, 8.44, 9.13, a spread of about 8 per cent. Variance predicts the threshold well but not perfectly. What is left over depends on the rest of the distribution's shape. Kendall and Fox make a related and sharper point in the other direction: variation among individuals in their expected reproduction, as opposed to variation in outcomes, can reduce the effective demographic variance rather than raise it [8, 11], so the mapping from biological heterogeneity to the variance in our model is not automatic.

A second form of the objection holds that discrete, non-overlapping generations are an artefact of the model rather than a fact of biology. A population in which everybody reproduces at once and then dies is a fiction for most organisms, and the synchronisation itself could be what manufactures the risk. That one we could test, which is why Model B exists. In continuous time, with overlapping generations and no synchronisation at all, holding the growth rate at 0.15 and raising the turnover from 1.15 to 6.15 moves the threshold from 11.42 to 61.40, and the ratio of threshold to turnover is 9.93, 9.97, 9.98, 9.98. The scaling survives the assumption being dropped. It survives more cleanly here than in the discrete model. Figure 5 shows those curves.

0.0010.010.1125102045805 per centstarting population size N (log scale)extinction probability by t = 100λ=0.65 μ=0.50λ=1.15 μ=1.00λ=2.15 μ=2.00λ=3.15 μ=3.00all four have thesame growth rater = 0.15
Figure 5. Model B, continuous time. Extinction probability by time t = 100 against starting size, for four levels of turnover that all share the same growth rate r = λ − μ = 0.15. Lines are the exact expression [μ(1 − e−rt) / (λ − μe−rt)]N; markers are simulated, 20,000 replicates each, shown where the simulated value exceeds 0.0012. Faster turnover means more births and deaths for the same net growth, and the threshold rises from 11 individuals to 61.

The third form of the objection is the one we cannot answer, because environmental variation was left out of both models entirely, and for real populations it is usually the dominant term above a few dozen individuals, scaling with population size quite differently from demographic noise [7, 9]. Our thresholds are therefore lower bounds on how big is big enough, and they are lower bounds derived from a model that deliberately removed the thing that usually matters most.

Our numbers against the published ones

The first comparison is to century-old theory. Haldane, working on whether a new advantageous type survives its own rarity, gave the survival probability of a single lineage as approximately 2s/V, where s is the excess growth and V the offspring variance [2]. Haldane derived it for small s, and ours is 0.15, which is not especially small. Comparing it with our exact roots gives ratios of 1.0477, 0.9984, 0.9302, 0.8683 and 0.9187 across the five laws, so the century-old formula is right to within 0.2 to 13.2 per cent over a thirty-fold range of variance. That formula is why the linear scaling in Figure 3 was predictable before we ran anything, and what the simulation adds is the size of the error in the approximation and the shape of the whole curve rather than its rate alone.

The second comparison is to measured offspring distributions. The negative binomial with dispersion parameter around 0.1 to 0.25 is not a mathematical curiosity: it is roughly what is estimated for the number of secondary infections per case in several directly transmitted diseases, where a small minority of individuals cause most of the transmission [12], and estimates for COVID-19 put the dispersion near 0.1 [16]. Our r = 0.25 level sits inside that measured range, at variance 6.44. Its threshold is 54 individuals. The numbers do not transfer directly, since a disease with an R0 of 2 or 3 is not a population growing at 15 per cent, but the shape of the distribution is real and measured rather than invented for this study.

The third comparison is the awkward one. Conservation biology has argued about minimum viable population size since 1981, when Shaffer defined the term [6], and the published numbers dwarf anything in this article. A meta-analysis of 212 species put the median published estimate at 4,169 individuals with a 95 per cent interval of 3,577 to 5,129 [14], and the genetic rules of thumb now argued for are an effective size of 100 against inbreeding and 1,000 for evolutionary potential [15]. Our thresholds run from 10 to 303, and the distance between those numbers and theirs measures what we left out. Demographic bad luck alone stops being the binding constraint at a few hundred individuals, and everything above that number in the published estimates is environmental variance, catastrophes, genetics and habitat. Lande set out why the terms scale differently [7]. The published minimum viable population sizes and ours are answers to different questions, and setting them side by side is only useful once somebody says which question each one answers.

The fourth comparison is to field data on small populations. Matthies and colleagues followed 359 populations of eight threatened plants in northern Germany for ten years and found 27 per cent of them gone, with extinction strongly concentrated in the smallest populations [10]. Fagan and Holmes assembled ten vertebrate populations monitored to extinction and found that time to extinction scales logarithmically with abundance [13], and our conditional extinction times rise roughly linearly with the logarithm of starting size, at between three and five generations per e-fold. We record that the form matches while being clear that the settings do not: their populations were declining and ours are growing on average, and their units are years of real organisms while ours are generations of a model.

Where a different choice would have changed the answer

Four choices in this study move the headline number, and every one of them deserves to be named out loud rather than left in the code.

The mean growth rate matters at least as much as the variance does, and we held it fixed at 1.15 throughout. Recomputing the exact threshold at other means, for the same three laws: at m = 1.02 the Poisson threshold is 65.5 and the lottery threshold is 1,901. At m = 1.10 they are 15.5 and 448. At m = 1.50, 3.4 and 98.8. So any single number quoted from this study is a number about populations growing at 15 per cent per generation, and a population barely above replacement needs an order of magnitude more individuals for the same safety.

We picked the 5 per cent criterion for no better reason than that it is the convention. A 1 per cent criterion would multiply every threshold by ln(100)/ln(20), which is 1.54. A 10 per cent criterion would multiply them by 0.77. The threshold is proportional to the logarithm of the risk you are willing to accept, so it is not a cliff, and nothing changes character at 5 per cent.

The 100-generation horizon turned out not to matter. We know that only because we checked. Extinction probability within G generations, for a single lineage, is 0.6210 at G = 5 and 0.7510 at G = 100 for Poisson offspring, and the gap between 100 generations and eventual extinction is 7.5×10−8. At a horizon of 20 generations the answers would have been visibly different, and at 5 generations this would have been an altogether different study.

Labelling these five laws by variance alone hides an 8 per cent spread, described in section 8. If we had chosen five different distributions with the same five variances, the thresholds would have come out slightly different, and the fitted constant of 8.83 would have moved by something like that amount. The slope of 1.0014 is far more stable than the constant, because the slope is a statement about scaling while the constant is a statement about one particular set of distributions.

Reproducing this

Everything in this article comes from one file and one command. Python 3.12.3 with numpy 2.4.2 was what we used. From the project root:

python analysis/extinction-by-bad-luck.py > analysis/extinction-by-bad-luck-output.txt

Expected runtime is about three minutes on a laptop, and our own run printed 174.5 seconds before it stopped. The script imports only math, sys, time and numpy, writes nothing except what it prints, and with the master seed left at 21091847 the output should match ours line for line, including every z-score quoted above. If it does not, the seed handling or the numpy version has changed, and the analytic columns are the ones to trust, because they contain no randomness at all.

The raw output file is linked at the top of this page, and the last section of it is a machine-readable block that every figure here was plotted from. The interactive model runs a smaller version of the same two experiments in the browser, so you can set the mean, the variance and the starting size yourself and watch the lines fall to zero.

References

  1. Watson, H. W. & Galton, F. (1875). On the probability of the extinction of families. The Journal of the Anthropological Institute of Great Britain and Ireland 4, 138–144.
  2. Haldane, J. B. S. (1927). A mathematical theory of natural and artificial selection, Part V: selection and mutation. Mathematical Proceedings of the Cambridge Philosophical Society 23, 838–844. doi:10.1017/S0305004100015644
  3. Kendall, D. G. (1948). On the generalized birth-and-death process. The Annals of Mathematical Statistics 19, 1–15. doi:10.1214/aoms/1177730285
  4. Harris, T. E. (1963). The Theory of Branching Processes. Springer, Berlin.
  5. Gillespie, D. T. (1977). Exact stochastic simulation of coupled chemical reactions. The Journal of Physical Chemistry 81, 2340–2361. doi:10.1021/j100540a008
  6. Shaffer, M. L. (1981). Minimum population sizes for species conservation. BioScience 31, 131–134. doi:10.2307/1308256
  7. Lande, R. (1993). Risks of population extinction from demographic and environmental stochasticity and random catastrophes. The American Naturalist 142, 911–927. doi:10.1086/285580
  8. Kendall, B. E. & Fox, G. A. (2002). Variation among individuals and reduced demographic stochasticity. Conservation Biology 16, 109–116. doi:10.1046/j.1523-1739.2002.00036.x
  9. Lande, R., Engen, S. & Sæther, B.-E. (2003). Stochastic Population Dynamics in Ecology and Conservation. Oxford University Press. doi:10.1093/acprof:oso/9780198525257.001.0001
  10. Matthies, D., Bräuer, I., Maibom, W. & Tscharntke, T. (2004). Population size and the risk of local extinction: empirical evidence from rare plants. Oikos 105, 481–488. doi:10.1111/j.0030-1299.2004.12800.x
  11. Fox, G. A. & Kendall, B. E. (2002). Demographic stochasticity and the variance reduction effect. Ecology 83, 1928–1934. doi:10.1890/0012-9658(2002)083[1928:DSATVR]2.0.CO;2
  12. Lloyd-Smith, J. O., Schreiber, S. J., Kopp, P. E. & Getz, W. M. (2005). Superspreading and the effect of individual variation on disease emergence. Nature 438, 355–359. doi:10.1038/nature04153
  13. Fagan, W. F. & Holmes, E. E. (2006). Quantifying the extinction vortex. Ecology Letters 9, 51–60. doi:10.1111/j.1461-0248.2005.00845.x
  14. Traill, L. W., Bradshaw, C. J. A. & Brook, B. W. (2007). Minimum viable population size: a meta-analysis of 30 years of published estimates. Biological Conservation 139, 159–166. doi:10.1016/j.biocon.2007.06.011
  15. Frankham, R., Bradshaw, C. J. A. & Brook, B. W. (2014). Genetics in conservation management: revised recommendations for the 50/500 rules, Red List criteria and population viability analyses. Biological Conservation 170, 56–63. doi:10.1016/j.biocon.2013.12.036
  16. Endo, A., Abbott, S., Kucharski, A. J. & Funk, S. (2020). Estimating the overdispersion in COVID-19 transmission using outbreak sizes outside China. Wellcome Open Research 5, 67. doi:10.12688/wellcomeopenres.15842.3