Simulating death processes



Let {N(t)} be a death process with the death rate μ and initial population size N(0)=n0. It is characterized by the following differential-difference equations for the probability mass function pn(t)=Pr(N(t)=n):

(Eq:DeathN)dpn(t)dt=μ(n+1)pn+1(t)μnpn(t),  (0nn01)(Eq:DeathN0)dpn0(t)dt=μn0pn0(t)

with the initial condition

pn(0)=δn,n0.

See also: Death process

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

We can do so just like we did for the birth process.

That is, 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 death is the first death 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 nt1. We can solve (Eq:Death0) (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 death during δt). Accordingly, we have the probability that N(t+δt)=nt+1 (i.e., one death during δt) as
pnt1(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