How many people have to get infected to end COVID-19?

Well, given that apparently people do not get sick twice, the easy answer should be EVERYONE, but it’s not that simple…

Let me explain… each sick person infects healthy people. Currently there are 30,000 sick and 4,000 infected in the last day (approximately), so we can say that daily we have a contagion rate of $ \frac{4000}{30000} \simeq 13.3\% $ which we will call $ \lambda $.

Then we can set up a simple model of the form:
$ \Delta et = \lambda e{t-1} – r_{t-1} $, where the sick remain ill for 14 days.
where:

  • $e_t$ sick at time t.
  • $r_t$ recovered at time t.
  • $t$ some day.

Note that if $ (1+\lambda)^d – 1 < 1 $, where $d$ is the number of days the illness lasts, the number of sick begins to decrease instead of increase (you can modify the code to test).

The above is a process which, if we simulate with the following code in Python (yes, in Python) for a period of 365 days:

import pandas as pd
import seaborn as sns
pd.set_option('display.max_rows', 500)
pd.set_option('display.max_columns', 500)
pd.set_option('display.width', 100)
e_t0 = 100.0
l = 0.133
dias_sim = 365
dias_enf = 14
sim = [[e_t0]]
for t in range(1,dias_sim):
    #print(t)
    sim_t = sim[t-1].copy()
    sim_t.insert(0,l*sum(sim_t))
    sim_t = sim_t[0:dias_enf]
    sim.append(sim_t)
sim = [sum(x) for x in sim]
sim = pd.DataFrame({'dia':range(1,dias_sim+1),'enfermos':sim})
sns.set(style="darkgrid")
sns.lineplot(x="dia", y="enfermos",data=sim)

it gives us a sick curve as follows:

reaching 40,000,000,000,000,000 sick in just one year. That is because it does not consider that there is a population limit. To account for that, we modify the model to consider a population limit and assume that no one gets sick twice (there are cases, but few…).

The assumption of this new model is that the probability of infecting another person decreases linearly as fewer people remain immunized.
$ \Delta et = \frac{ps{t-1}}{p} \lambda * e{t-1} – r{t-1} $ where:

  • $ps_t$ is the healthy population that has never been sick
  • $p$ is the total population

We simulate with the following code for a population of 10,000,000 inhabitants:

import pandas as pd
import seaborn as sns
pd.set_option('display.max_rows', 500)
pd.set_option('display.max_columns', 500)
pd.set_option('display.width', 100)
e_t0 = 100.0 #initial sick
p = 10000000.0 #population
l = 0.133 # lambda
dias_sim = 365 #days to simulate
dias_enf = 14 # days sick
ps = [p - e_t0] # healthy population
sim = [[e_t0]]
for t in range(1,dias_sim):
    #print(t)
    sim_t = sim[t-1].copy()
    sim_t.insert(0,ps[t-1]/p*l*sum(sim_t))
    ps.append(ps[t-1] - sim_t[0])
    sim_t = sim_t[0:dias_enf]
    sim.append(sim_t)
sim = [sum(x) for x in sim]
sim = pd.DataFrame({'dia':range(1,dias_sim+1),
                    'enfermos':sim,
                    'sanos':ps})
sns.set(style="darkgrid")
sns.lineplot(x="dia", y="enfermos",data=sim)

which gives us a sick curve as follows:

We can see immediately that it looks more like the curves we see in the media. This is because if we call $ \hat{\lambda} = \frac{ps}{p} \lambda $, it is a term that decreases over time, so at some day $ (1+\hat{\lambda})^d – 1 < 1 $, reducing the number of sick.

But we still haven’t answered how many have to get sick to stop the pandemic. That is a matter of plotting the evolution of ps.

We see that approximately 75% of people have to get sick for the population to become immunized.

Now, we cannot change the number of days the illness lasts, but we can change the contagion rate $\lambda$ with social distancing. Let’s see how the curve looks for different contagion rates.

import pandas as pd
import seaborn as sns
pd.set_option('display.max_rows', 500)
pd.set_option('display.max_columns', 500)
pd.set_option('display.width', 100)
e_t0 = 100.0 #initial sick
p = 10000000.0 #population
lambdas = [0.07, 0.085, 0.1 , 0.133,0.15] # lambdas
dias_sim = 365*2 #days to simulate
dias_enf = 14 # days sick
simulaciones = pd.DataFrame()
for l in lambdas:
    ps = [p - e_t0] # healthy population
    sim = [[e_t0]]
    for t in range(1,dias_sim):
        #print(t)
        sim_t = sim[t-1].copy()
        sim_t.insert(0,ps[t-1]/p*l*sum(sim_t))
        ps.append(ps[t-1] - sim_t[0])
        sim_t = sim_t[0:dias_enf]
        sim.append(sim_t)
    sim = [sum(x) for x in sim]
    sim = pd.DataFrame({'dia':range(1,dias_sim+1),
                        'enfermos':sim,
                        'sanos':ps,
                        'lambda': l})
    simulaciones = simulaciones.append(sim)
sns.set(style="darkgrid")
sns.lineplot(x="dia", y="sanos",data=simulaciones,style='lambda')
sns.lineplot(x="dia", y="enfermos",data=simulaciones,style='lambda')


By lowering $\lambda$ from 0.133 to a little less than half, 0.085, we manage to reduce the percentage that must get sick from 75% to only 30%. Considering that masks help reduce contagion per interaction from 50% to 5%, we can conclude that with everyone’s collaboration, we can control the disease.

On the other hand, not overwhelming the health system is key. In the following graph we see the number of sick; if we halve the contagion rate, we reduce the peak of sick from 2.5 million to 0.25 million, which is one tenth.

So while we are in crisis, stay home, and when you are allowed to go out WEAR A MASK – you will be doing us all a favor.

Be the first to comment

Leave a Reply

Your email address will not be published.




This site uses Akismet to reduce spam. Learn how your comment data is processed.