Simulating birth processes


 

The birth process {N(t)} with birth rate λ and initial population size N(0)=n0 is characterized by the following differential-difference equations for the probability mass functions pn(t)=Pr(N(t)=n):

(Eq:Birth0)dpn0(t)dt=λn0pn0(t),(Eq:Birthn)dpn(t)dt=λ(n1)pn1(t)λnpn(t),  (nn0+1)

with the initial condition

pn(0)=δn,n0.

See also: Birth process

Here, we want to simulate this process numerically to obtain some concrete sample paths like this one:

To do so, we first discretize the time variable so that we consider time steps with some small interval δt: N(0),N(δt),N(2δt),N(3δt),,N(kδt),

Next, we exploit the Markov property of the birth process: Every birth is the first birth since the last one. That is, given N(t)=nt at time t, we may regard this as the "initial" condition for the next step: N(t+δt)=nt or nt+1. We can solve (Eq:Birth0) (with n0 replaced with nt) to find pnt(t+δt) with the "initial" condition pn(t)=δn,nt. A bit of exercise gives
pnt(t+δt)=eλntδt,
which is the probability that N(t+δt)=nt (i.e., no birth during δt). Accordingly, we have the probability that N(t+δt)=nt+1 (i.e., one birth during δt) as
pnt+1(t+δt)=1eλntδt.

Thus, the algorithm for simulating the birth process is the following:
  1. Set N(0)=n0; set k = 0.
  2. Generate a uniformly distributed random number r[0,1).
  3. If r<1eλδtN(kδt), then set N((k+1)δt)=N(kδt)+1; Otherwise, set N((k+1)δt)=N(kδt).
  4. Update k:=k+1, go to Step 2, and repeat.


Comments

Popular posts from this blog

Birth process

Branching processes: Mean and variance

Informal introduction to formal logic