← Moment Equations

05

Deriving first-moment equations

A moment equation follows from stochastic event changes and rates; it is not obtained by averaging a deterministic equation informally.

A linear infection–removal process

Let \(I(t)\) change through

EventChangeRate in state \(i\)
New infectious individual+1\(\lambda i\)
Removal−1\(\mu i\)

This early-outbreak branching model ignores susceptible depletion so that the rates are linear.

Conditional expected change

Given \(I(t)=i\), over a short interval \(h\),

\[ \mathbb E[\Delta I\mid I(t)=i] = (+1)\lambda i h+(-1)\mu i h+o(h). \]

Divide by \(h\) and let \(h\) tend to zero:

\[ \frac{d}{dt}\mathbb E[I(t)] = \mathbb E[(\lambda-\mu)I(t)]. \]

Use linearity of expectation

\[ \frac{dm_1}{dt}=(\lambda-\mu)m_1, \qquad m_1(t)=\mathbb E[I(t)]. \]

Because the rate is linear in \(I\), the right-hand side contains only the first moment. The equation is closed.

Solution and interpretation

\[m_1(t)=I_0e^{(\lambda-\mu)t}.\]

If \(\lambda>\mu\), the expected infectious population grows; if \(\lambda<\mu\), it declines. Positive expected growth does not rule out extinction in individual stochastic paths.

Interactive Python laboratory

Interactive PythonFirst moment versus simulations

Output

Run the code to see the result.

What was—and was not—assumed

The equation describes the exact first moment of this linear birth–death model. It is not a deterministic approximation to one trajectory. Its derivation used the stochastic transition rates and expectation. Nonlinear epidemic rates will introduce higher moments; lesson 07 explains that problem.

What this lesson adds

You can now derive a first-moment differential equation from event changes and rates, use conditional expectation and linearity, solve the closed linear equation and compare it with Monte Carlo evidence.