← Stochastic Differential Equations

01

From deterministic change to stochastic change

A deterministic epidemic model gives the expected direction of change. A stochastic model also represents the variation between possible epidemic histories.

Scenario: the same epidemic state can change differently

In a population of 1,000, suppose \(S=900\) and \(I=100\). Infection occurs at rate \(a_{\mathrm{inf}}=\beta SI/N\) and recovery at rate \(a_{\mathrm{rec}}=\gamma I\).

With \(\beta=0.30\) and \(\gamma=0.10\), these rates are 27 infection events per day and 10 recovery events per day. The deterministic model uses their difference:

\[\frac{dI}{dt}=27-10=17.\]

What the deterministic change means

Over \(\Delta t=0.1\) day, Euler’s method gives \(\Delta I\approx17(0.1)=1.7\). This is an expected net change across many comparable epidemics. It does not mean that exactly 1.7 people change state.

A deterministic model follows one average-direction path. It does not show the probability of no infections, unusually many infections, or early extinction.

Why the average is not the whole answer

Suppose two epidemics have the same expected increase. In one realisation, recoveries may temporarily exceed infections; in another, infection may rise rapidly. Their average can be identical even though their biological consequences are different.

QuestionDeterministic pathStochastic repetitions
What is the expected direction?YesYes, through the ensemble average
Can infection decrease despite positive expected growth?No probability suppliedFrequency can be estimated
What is the chance of early extinction?Not representedCan be estimated from many paths
What is the chance of exceeding hospital capacity?Only one predicted pathA distribution of peaks can be compared with capacity

The stochastic model is not better merely because it is random. It is useful when variability, thresholds, rare outcomes or extinction are part of the biological question.

Actual event counts fluctuate

During a short interval, let \(K_{\mathrm{inf}}\) and \(K_{\mathrm{rec}}\) be random infection and recovery counts. Then

\[\Delta I=K_{\mathrm{inf}}-K_{\mathrm{rec}},\qquad \mathbb E[\Delta I]\approx(a_{\mathrm{inf}}-a_{\mathrm{rec}})\Delta t.\]

Different repetitions give integer changes above or below 1.7, while their average approaches 1.7.

Why introduce an SDE?

An SDE preserves the deterministic average direction but adds continuous random fluctuation:

\[dX(t)=f(X(t))dt+g(X(t))dW(t).\]
PartRole
\(f(X)dt\)Expected systematic change over a short time.
\(g(X)dW\)Random deviation whose scale depends on state and interval length.

This page motivates the two parts. The next lessons define drift, diffusion and Brownian increments precisely.

Interactive Python laboratory

Run 10,000 short-interval repetitions. The red line is the deterministic expected change; the bars show possible integer stochastic changes.

Interactive PythonExpected change versus random change

Output

Run the code to see the result.

What this lesson adds

You can now distinguish expected deterministic change from one random realised change and explain why stochastic modelling matters even when the stochastic average resembles the deterministic result.