Presets
Playback
Camera
Layers
Quality
Model check
The science
Risk = probability x consequence
With independent hazards i of annual probability pi and severity si, the expected annual loss is E[L] = Σ pi si and, because they are independent, Var[L] = Σ pi(1 - pi) si2. The ledger tower in the middle shows the running simulated mean (green), the exact E[L] (white ring) and the simulated 95th percentile (red ring).
Preventive measures and prioritisation
A preventive measure scales the probability, pi → pi(1 - m). The hazards are ranked by pi si and the top k are treated first: the standard prioritisation rule, because it removes the most expected loss per treated hazard. In manual mode you can test other choices. Notice that the rare, huge hazards (building collapse, dam failure) barely move the histogram but dominate the tail and the 95th percentile: frequent small events set the mean, rare large ones set the risk.
Two independent numerical checks
1. The running simulated mean must stay within four standard errors 4√(Var/n) of the exact mean at every moment (dashed band in the second graph).
2. The simulated histogram of annual loss is compared with the exact distribution, obtained by enumerating all 28 = 256 combinations of hazards that can occur in a year (dots in the first graph). Each bin with at least 5 expected events must have |z| < 5. The random sequence and its order are identical to the 2D companion, so seed 12345 reproduces its numbers.
Honest simplifications
Hazards are independent; probabilities and severities are illustrative round numbers in arbitrary loss units; mitigation has no cost and always scales probability by the same factor; severity is a fixed number rather than a distribution. Real risk assessments add correlations (a flood causes a power outage), uncertainty in the inputs and the cost of controls. The buildings are schematic stand-ins for each scenario. This is an educational model, not a decision tool.
Things to try
Compare “No mitigation” with “All 8, weak controls”; treat only the most frequent hazards in manual mode and see how little the expected loss changes; run 50 000 years and watch the 95th percentile settle; press “New seed” to see sampling noise at 1 000 years.