← Python Programming

Part 5: Moment Equations

Moment equations describe the evolving centre, spread and dependence of stochastic epidemic variables. This pathway begins with simulated samples, derives exact identities, introduces closure only when necessary, and ends with validated probability applications.

Stage 1 · Measure stochastic outcomes

Random variables and empirical moments

Define epidemic variables and estimate their centre, spread and dependence from independent simulations.

Stage 2 · Derive and close moment equations

From transition rates to a finite system

Derive exact low-order identities, identify nonlinear hierarchy and state closure assumptions.

Stage 3 · Program, solve and validate

Closed moment ODEs

Translate retained moments into code, solve them and assess closure accuracy.

Stage 4 · Convert moments into risk information

Probabilities, capacity and communication

Add explicit distributional assumptions, validate probability estimates and communicate results.

Coverage rule

Lessons 1–4 establish empirical moments. Lessons 5–8 derive and close equations. Lessons 9–12 program, solve and validate them. Lessons 13–15 add explicitly assumption-dependent probability and capacity applications. Each later lesson reuses earlier mathematics only to teach its stated new purpose.