Deterministic vs CTMC vs SDE models
Deterministic ODEs, continuous-time Markov chains and stochastic differential equations can describe the same biological mechanisms at different mathematical resolutions. The important difference is not simply that one is “random” and another is not. They represent biological change in fundamentally different ways.
Start with one biological mechanism
Consider an SIS epidemic in a population of size \(N\). Let \(I(t)\) be the number of infectious individuals and \(S(t)=N-I(t)\).
Two biological events occur:
| Event | State change | Rate |
|---|---|---|
| infection | \(I\to I+1\) | \(\beta (N-I)I/N\) |
| recovery | \(I\to I-1\) | \(\gamma I\) |
The three modelling approaches can now be built from exactly these same mechanisms.
Deterministic model: keep the net average tendency
The infection rate increases \(I\), while the recovery rate decreases it. Their difference gives the deterministic rate of change:
\[\boxed{\frac{dI}{dt}=\beta\frac{(N-I)I}{N}-\gamma I}.\]For fixed parameters and initial condition, this equation produces one smooth trajectory.
What information has been removed?
Suppose infection and recovery rates are both substantial. The deterministic equation uses their difference. It therefore describes net change but does not retain the randomness of the two event streams.
Two epidemics with identical parameters can experience different sequences of infection and recovery events. The deterministic model does not distinguish those possible histories.
CTMC model: keep the individual random events
In a continuous-time Markov chain, \(I(t)\) remains integer-valued:
\[0,1,2,\ldots,N.\]When the current state is \(I=i\), infection occurs at rate
\[b(i)=\beta\frac{(N-i)i}{N},\]and recovery occurs at rate
\[d(i)=\gamma i.\]The total event rate is
\[\lambda(i)=b(i)+d(i).\]The waiting time until the next event is exponentially distributed:
\[T\sim\operatorname{Exp}(\lambda(i)).\]Conditional on an event occurring,
\[P(\text{infection})=\frac{b(i)}{b(i)+d(i)},\qquad P(\text{recovery})=\frac{d(i)}{b(i)+d(i)}.\]Why CTMC trajectories have steps
Between events, the state does not change. An infection then changes \(I\) by exactly \(+1\), or a recovery changes it by exactly \(-1\). This produces a step-like trajectory.
Because \(I=0\) can be an absorbing state in an SIS epidemic without importation, exact extinction occurs naturally in the CTMC.
SDE model: approximate many random events continuously
For a birth–death-type process, the expected short-time change is approximately
\[E[\Delta I\mid I=i]\approx[b(i)-d(i)]\Delta t,\]while its variance is approximately
\[\operatorname{Var}(\Delta I\mid I=i)\approx[b(i)+d(i)]\Delta t.\]This motivates the diffusion approximation
\[\boxed{dI_t=[b(I_t)-d(I_t)]dt+\sqrt{b(I_t)+d(I_t)}\,dW_t}.\]For the SIS model,
\[\boxed{dI_t=\left[\beta\frac{(N-I_t)I_t}{N}-\gamma I_t\right]dt+\sqrt{\beta\frac{(N-I_t)I_t}{N}+\gamma I_t}\,dW_t}.\]Why difference in the drift but sum in the diffusion?
Infections move the state upward and recoveries move it downward, so their signed contributions subtract in the mean:
\[b-d.\]But both event types create variability. Since the squared size of either a \(+1\) or \(-1\) event is 1, their variance contributions add:
\[b+d.\]The three trajectory types
Do stochastic models just give the same answer with wiggles?
No. The purpose of stochastic modelling is not merely to make a deterministic curve look irregular.
A stochastic model defines a probability distribution over possible histories. Repeating the model can therefore answer questions that one deterministic trajectory cannot:
| Question | Why stochastic modelling helps |
|---|---|
| Could an early outbreak die out? | different event sequences can lead to extinction or growth |
| How uncertain is the epidemic peak? | different trajectories have different peak sizes and times |
| What is the probability of crossing hospital capacity? | threshold crossing is a probability across possible paths |
| How variable are outcomes? | variance and distributions require more than one deterministic path |
But doesn't the stochastic mean resemble the deterministic solution?
Sometimes it does, particularly for large populations and approximately linear behaviour. That does not make the stochastic model redundant.
Even if
\[E[I_t]\approx I_{\mathrm{det}}(t),\]the stochastic model also describes the spread around that mean, extinction probability, tail behaviour and path-dependent outcomes.
And the means are not always identical
For nonlinear models, in general
\[E[f(X_t)]\ne f(E[X_t]).\]Therefore the stochastic mean itself can differ from the deterministic trajectory. This is one reason nonlinear stochastic biological models require care.
State space
| Model | Typical state representation |
|---|---|
| deterministic ODE | continuous-valued population variables |
| CTMC | discrete integer counts |
| SDE | continuous-valued stochastic variables |
If the true population contains 27 infectious people, the CTMC can represent exactly 27. An SDE approximation may produce \(27.4\), which should be interpreted as a continuous approximation to the count process, not as a literal fraction of a person.
How time is represented
All three models here evolve in continuous time, but they use time differently.
| Model | What happens through time? |
|---|---|
| ODE | the state changes smoothly according to a derivative |
| CTMC | the state remains fixed between random event times, then jumps |
| SDE | the state evolves continuously with Brownian fluctuations |
Continuous does not mean smooth
An SDE driven by Brownian motion can have a continuous trajectory while still being extremely irregular. There are no CTMC-style jumps, but the path is not differentiable in the ordinary sense.
This is different from the smooth trajectory of an ODE.
Population size matters
When populations are large and each event changes only a tiny fraction of the population, a continuous approximation can work well. This is the setting in which deterministic and diffusion approximations often become useful.
When counts are small, the discrete nature of events becomes much more important.
A useful scale interpretation
This is a conceptual progression rather than a rule that one model is always derived exactly from the model on its left.
What happens as population size becomes large?
Under suitable scaling and assumptions, random fluctuations become small relative to the population size. A CTMC can then be approximated by a deterministic model at leading order, while an SDE can retain the next level of random fluctuation around that deterministic behaviour.
This provides an important mathematical connection:
\[\text{discrete random events}\longrightarrow\text{diffusion approximation}\longrightarrow\text{deterministic limit}.\]Computational differences
| Feature | ODE | CTMC | SDE |
|---|---|---|---|
| one run | one deterministic solution | one random event history | one random continuous path |
| random sampling | not intrinsic | event times/types | Brownian increments |
| typical numerical method | ODE solver | Gillespie algorithm | Euler–Maruyama or higher-order SDE method |
| many-run statistics | not required for fixed parameters | Monte Carlo | Monte Carlo |
Which model should be chosen?
Choose according to the biological question and the scale at which randomness matters.
| If the main concern is... | A natural starting point |
|---|---|
| average population-level dynamics | deterministic ODE |
| individual events, small counts or exact extinction | CTMC |
| continuous stochastic variability in moderately large populations | SDE |
| rare-event probabilities | often CTMC or another explicitly stochastic formulation |
| fast approximation to event-driven stochastic dynamics | SDE may be useful |
No model is automatically “more realistic”
A more detailed stochastic model can still be poorly specified. An ODE with well-estimated mechanisms may be more useful than an SDE with arbitrary noise. Likewise, an SDE diffusion approximation may be less appropriate than a CTMC near a small-population boundary.
The central relationship
For the SIS example, the same event rates
\[b(i)=\beta\frac{(N-i)i}{N},\qquad d(i)=\gamma i\]lead naturally to three descriptions:
| Model | What is retained? |
|---|---|
| ODE | net tendency \(b-d\) |
| CTMC | separate random events with rates \(b\) and \(d\) |
| SDE | drift \(b-d\) and approximate fluctuation magnitude \(\sqrt{b+d}\) |