Modeling infections

618 days ago by calkin

How can we model viral infections?

One way is with a logistic function.  This is a function $f(t)$ which is a solution to 

a differential equation of the form something like 

\[  f'(t) = cf(t)(L-f(t))\]

Typically, equations like this have the form

\[ f(t) = \frac{L}{1+de^{-ct}} \]

L=100 c=1 f(t)= L/(1+exp(-c*t)) A=plot(f(t),t,-10,10,color='blue') plot(f(t),t,-10,10,color='blue') 
       

Another potential model for these sorts of phenomena is the question of how big the largest component of a random graph is.

What happens with random graphs? 

We get functions appearing like

\[ g(t)=e^{-e^{-ct}} \]

M=100 d=1 g(t)=M* exp(-exp(-d*t)) 
       
B=plot(g(t),t,-10,10,color='red') plot(g(t),t,-10,10,color='red') 
       

How do these functions compare?  Let's plot them on the same axes: $f(t)$ in blue, $g(t)$ in red. 

show(A+B) 
       

We see that we have a later start, with a steeper trajectory for $g(t)$ than we do with $f(t)$.

 
       

How about modeling a population consisting of two separate groups who don't (basically) infect each other.

For example, Hubei + rest of china.

h(t)= 3*f(t) + f(t-7) plot(h(t),t,-10,20)