06
Deriving second-moment equations
Second moments follow from how each event changes the square of the stochastic state.
Squaring changes the jump contribution
For current state \(i\), a birth changes \(i^2\) by
and a removal changes it by
Derive the second-moment equation
Multiply each squared jump change by its rate and take expectation:
With \(m_1=\mathbb E[I]\) and \(m_2=\mathbb E[I^2]\),
This equation is closed together with \(m_1'=(\lambda-\mu)m_1\).
Obtain the variance equation
Differentiating and substituting the moment equations gives
The additional \((\lambda+\mu)m_1\) term creates stochastic variation even when the initial state has zero variance.
Interactive Python laboratory
Output
Run the code to see the result.
Why the second moment is not the variance
\(m_2\) includes both squared mean and spread. Variance removes the squared mean. Always calculate \(v=m_2-m_1^2\) before interpreting uncertainty.
What this lesson adds
You can now derive a second-moment equation from squared jump changes, obtain the variance equation and explain how stochastic events generate variance from a deterministic initial condition.