← Stochastic Differential Equations

11

Mean paths, variance and uncertainty bands

An ensemble becomes scientifically useful when its centre, spread and simulation error are calculated and labelled correctly.

Time-specific ensemble summaries

For \(M\) simulated paths evaluated at time \(t_n\), the sample mean and variance are

\[\overline X(t_n)=\frac{1}{M}\sum_{r=1}^{M}X_r(t_n),\]
\[s^2(t_n)=\frac{1}{M-1}\sum_{r=1}^{M}[X_r(t_n)-\overline X(t_n)]^2.\]

The mean may be fractional even when the biological variable represents people.

Three different intervals

DisplayInterpretation
Mean ± one SDScale of path-to-path spread; not generally a fixed probability interval.
5th–95th percentilesCentral 90% of simulated outcomes at each time.
Mean ± 1.96 SEMonte Carlo uncertainty in the estimated mean, where \(\mathrm{SE}=s/\sqrt M\).

These answer different questions and must not share the vague label “confidence band.”

Interactive Python laboratory

Interactive PythonMean, variance and bands

Output

Run the code to see the result.

Pointwise does not mean simultaneous

The 5th and 95th percentiles are calculated separately at each time. Approximately 90% of path values lie within them at any selected time, but this does not mean 90% of complete trajectories remain inside the band for the entire interval.

Variance is not parameter uncertainty

The variance above measures intrinsic path-to-path stochasticity with fixed parameters. If \(\beta\) and \(\gamma\) are uncertain, parameter uncertainty requires another layer of sampling or statistical inference.

What this lesson adds

You can now calculate time-dependent mean and sample variance, construct percentile bands, quantify Monte Carlo error in the mean, and state clearly which kind of uncertainty each display represents.