In [3]:
from numpy.random import normal
from scipy.stats import norm

We have the following constants for the two lizard species.


In [10]:
sexual_mean, sexual_standard_deviation = 1.1, 0.15
asexual_mean, asexual_standard_deviation = 1.2, 0.3

One way to figure out the expected extinction time is to figure out the expected number of generations until the mean population growth rate dips below $0$. We'll call it "Probability of Death", or pod, for short.


In [25]:
pod_sexual = norm.cdf(0, loc=sexual_mean, scale=sexual_standard_deviation)
pod_asexual = norm.cdf(0, loc=asexual_mean, scale=asexual_standard_deviation)

print("The probability that the sexual lizards die off in a given generation is {}".format(pod_sexual))
print("The probability that the asexual lizards die off in a given generation is {}".format(pod_asexual))


The probability that the sexual lizards die off in a given generation is 1.1224881271355393e-13
The probability that the asexual lizards die off in a given generation is 3.167124183311986e-05

Now that we know the probability of both populations dying out in a given generation, we can easily compute their expected number of generations, which is the mean of a geometric random variable whose probability of "failure" is the variable pod.


In [26]:
expected_generations_sexual = int(1/pod_sexual)
expected_generations_asexual = int(1/pod_asexual)
print("The sexual lizards are expected to survive {} generations".format(expected_generations_sexual))
print("The asexual lizards are expected to survive {} generations".format(expected_generations_asexual))


The sexual lizards are expected to survive 8908780198431 generations
The asexual lizards are expected to survive 31574 generations

A random population growth/decrease will just increase the standard deviation in both the cases. And as the standard deviation goes up, the probability of death in a given generation goes up, which means the expected number of generations will go down. That makes sense, because in a nutshell, it's the variability in their mean growth rate that is killing the population, i.e. once the mean growth rate goes below $0$, they are dead. It makes sense that adding more randomness will kill them faster.