Jun 28, 2026

[Planned] Static Normals

This post introduces a "Static Normals" probabilistic model to PlanZero that is the first to fit overarching assumptions to data, and the first to make predictions. The overarching assumption is that regional sub-totals should add up to national totals (which is often the case in the data, but not always). The predictions are trivial: that all years are the same. These predictions aren't very precise because the model assumes variation from year to year is all measurement error and the historical range of variation will continue indefinitely. Static Normals is intended as a baseline in PlanZero against which more complex models will be judged: they shouldn't be poorer predictors of the future than Static Normals.

This post is "Planned". The technical modelling work has been done, but this post hasn't been written yet.

Overview

Until next time,

- James Bergstra

Appendices

Supporting Update to PlanZero's Build System

The Static Normals model is the first in PlanZero to create build artifacts of a significant size. The samples from the MCMC chains are not huge, but they are tens or hundreds of megabytes, depending on how long they're configured to be. PlanZero's build and deployment implementation was modified not to save these MCMC chains in git, or upload them to fly.io.

PlanZero's Dockerfile was modified to use a multi-stage build to produce a small docker image for fly.io that does not contain large data files or raw model samples. The following flow-chart illustrates the dependencies between docker images defined in the Dockerfile. It has been added to the About page in a new section about Architecture.


flowchart TB

python_arm["Python:3.11-slim [ARM64]"]

base["base"]

testing["testing"]

build_cache["build_cache"]

production_server["production_server"]

production_server_amd64["production_server_amd64"]

python_arm --> base
base --> testing
testing --> build_cache

base --> production_server

build_cache -. copy pre-rendered pages .-> production_server

python_amd["Python:3.11-slim [AMD64]"]


build_cache -. copy pre-rendered pages .-> production_server_amd64

python_amd --> production_server_amd64