Home > Differential Equations, Mathematics > On the Swine Flu

On the Swine Flu

So I've been MIA for the last month-and-a-half because of several exciting things that have happened to me, and I apologize for the hiatus... but it may be prolonged for a while still.  However, in the meantime, since a lot of my Mexican colleagues and students have been asking me about the swine flu, in somewhat of a panic, I thought I would try to put some numbers into some well-known SIR equations and see what insights can be obtained regarding the dynamics and proportions of the purported epidemic.  I believe this kind of analysis is routine in CDC in the US and in Secretaria de Salud in Mexico, although I'm not too sure how mathematically equipped the latter institution is in my home country. In much of what follows, I have to do some hand-waving because of the unavailability of accurate information in the web-o-sphere, or my inability to access true statistics.  Much of what I know I got from CNN and NYTIMES reports of today.  I find such fuzzy math unacceptable, personally, except to derive a notion of the magnitude of a problem, and so it would be a mistake to take the calculations as set fact or hard evidence.  Caveat in mind, I don't derive the model (it's up to the reader to find several excellent sites that might explain it), but instead delve to account for my assumptions and my results.

The SIR model (Susceptibles-Infecteds-Recovereds) uses coupled differential equations to analyze the progress of a disease in a closed population.  I focus on the population of Mexico City, assuming that the count of infected individuals nationally can be mostly found there.  Thus, out of Mexico City's 20 million people, most of the suspected 1600 currently-infecteds are in that city (all for simplicity).  Recovered individuals are the sum of those dead (149) plus those that did not die.  The coupled time-differential equations are: 

 \frac{dS}{dt} = -a S I

 \frac{dR}{dt} = b I

 \frac{dI}{dt} = a S I - b I

which basically says that the change in susceptible individuals is proportional to the amount infected and the amount currently susceptible, that the change in recovereds (removed from infection) is proportional to those who are already infected, and that the change in infecteds depends is the rate at which susceptibles get sick minus the rate at which infecteds get removed from the population.  The proportionality constants can be calculated with some cleverness (though not necessarily accuracy), like this:  

 a = \frac{-\frac{dS}{dt}}{S I}

and so we must guesstimate  \frac{dS}{dt} as well as  S and  I .  If there are currently 1600 individuals that are infected, linearly, 400 have been infected per day since this became news four days ago.  So my guesstimate is that the current rate  \frac{dS}{dt} = -400 individuals per day. The number of susceptibles is the population of Mexico City, so all 20 million, minus infecteds, about (I'm thinking naturally immune individuals are so few that the population number doesn't change much).  Finally, the number of current infecteds (Mexico-wide? focused in Mexico City) is 1600 according to the NYTIMES article I've been linking to.  This gives a value of  a = 1.25 \times 10^{-8} .  Calculating  b is a bit trickier.  The datum says that 149 people have died from the swine flu, but I don't think all people infected with the swine flu die.  I'm going to guesstimate that approximately 20% of the infecteds either die or recover (since apparently 10% of them die) in a day.  There's no reason for this except my hunch. So  b \approx .2 .

By the chain rule,  \frac{dI}{dt} = \frac{dI}{dS} \cdot \frac{dS}{dt} , and so  \frac{dI}{dS} = \frac{\frac{dI}{dt}}{\frac{dS}{dt}} .  With  I not zero, this means

 \frac{dI}{dS} = \frac{1.25 \times 10^{-8} S I - 0.2 I}{-1.25 \times 10^{-8} S I} = -1 + \frac{16,000,000}{S} .  The partial is zero at  S_* = 16,000,000 , and has initial conditions  S_0 = 19,998,400 and  I_0 = 1600 (twenty million total).

The value  S_* is called the threshold value, and it is less than the initial condition  S_0 \approx 20,000,000 .  This suggests an epidemic in fact occurs.

Luckily,  \frac{dI}{dS} can be solved in closed form, as

 I = -S + 1.6 \times 10^{7} ln(S) + C .

The value of  C is of course determined by the initial conditions, as  C = I_0 + S_0 - 1.6 \times 10^7 ln(S_0) \approx -2.489 \times 10^8 . Then 

 I = -S + 1.6 \times 10^7 ln (S) - 2.489 \times 10^8 .  

With this in mind, the maximum number of infecteds at a time occurs at  S_* = 16,000,000 and is

 I_* \approx 500,000 ,

or about half a million people, equivalent to about 2.5% of Mexico City's population.

If there is enough interest, I may calculate the time dynamics (how long the epidemic lasts, etc.) with numerical methods (as by Euler's method), unfortunately by hand since access to fast computers and cool software is limited to me at present.


UPDATE May 5, 2009.

So it appears that the foundational numbers above were vastly overstated (since Mexico hadn't confirmed the particular strains of the alleged infecteds due to under-equipment): from the number of actual infecteds to the actual number of deaths related to the illness.  It now appears that the progression of the swine flu is a lot slower, and also that our derived coefficients are vastly different than originally thought.  Still, a happy exercise using the SIR equations.  I may yet post a new derivation that reflects reality more truly.

  1. April 28th, 2009 at 15:37 | #1

    Very nice, careful, clear analysis. Loved it!

  2. Enoch
    April 28th, 2009 at 19:54 | #2

    Cool. I believe you should work for the WHO as a consultant with you and your crazy math skills.

  3. omar
    April 28th, 2009 at 20:26 | #3

    Buen analisis, simple, para explicar un poco el SIR. En cuanto al potencial matematico en Mexico, en sector salud, creeme que hay muy buenos mexicanos en el area de Biologia Matematica, asi que estoy seguro de que han analizado este tipo de modelos, quizas el MEIRS con procesos estocasticos.

  4. Enoch
    April 28th, 2009 at 20:50 | #4

    I was thinking, could you generate an SIR model that continually updates with current news?

  5. April 28th, 2009 at 22:10 | #5

    Hi Everyone! Thank you so much for your input.

    @Enoch, the "problem" with deterministic modeling is that, even if I get updated information (new infecteds, new deaths), the model is likely to come up more or less the same unless such information forces a radical change in an assumption (i.e., coefficients  a and  b turn out to be substantially different to what they are now -- which might actually be the case with coefficient  b , for example). From a point of view, deterministic modeling is quite consistent, leaving no room for "random" or stochastic factors, a characteristic that is often searched for and opted for in certain applications. However, I'll keep track as best as I can and will definitely post major revisions.

    @omar, hay una expresión en inglés: "KISS: keep it short and simple," y creo que es particularmente aplicable cuando la información es escasa y hay que hacer muchas inferencias. La idea es que lo que sí sabemos nos lleve lo más lejos posible: en este caso, lo sustancial tal vez es lograr vislumbrar la magnitud potencial del problema. Personalmente, no confío tanto en los números, ni los reportados ni los que fueron derivados. No estoy convencido de que un modelo estocástico es aplicable dados los datos tan genéricos que hay ahorita en el internet y las noticias, mas, como tú dices, seguramente hay mexicanos capaces de análisis a profundidad que están trabajando incansablemente en estimar la trayectoria de esta epidemia que aqueja a nuestro país (y de muchas otras también). ¡Te mando un saludo! Y ya me platicarás que haces tan lejos de México.

  1. No trackbacks yet.