axiom

Tutorials · 5 problems

Worked all the way through

Most library tours show you a subpackage at a time. These take a single problem and carry it through every phase it actually has to survive — because the hard part of causal work is not any one phase, it is that they have to agree with each other at the end.

Start with the porting one if you have a table and want to know what it takes to get it into axiom at all. It imports no simulator: every object you would have to write yourself is written on the page — the column roles, the treatment and outcome with their dimensions, the model spec, the estimand — and it ends where an honest porting exercise ends, with a number and a precise statement of the one thing standing between it and a causal claim.

Next to it, a model of your own, for when the kernels do not fit your mechanism. It writes the mean as an expression by hand, gets the dimensions checked before anything is fitted, and is honest about what leaving the kernels behind costs you.

The other two are the two shapes the work itself comes in. In one, the data already exists and the question is whether it can answer anything — it cannot, so an experiment gets designed, and its answer reverses the decision the existing data would have supported.

In the other there is no data at all. Every step is a decision about what to go and measure: which angles, what shape of aperture, how long at each, and when you are allowed to stop. It is the older discipline and the one that is easier to get wrong, because nothing pushes back until the money is spent.

Every number on every page below was produced by running the code shown beside it, when this site was built.

A porting story · 6 steps

Bringing your own problem

Twenty-four stores, forty weeks, leaflet spend and footfall. How do you turn a table you already have into a model axiom can fit, an estimand it can read, and a number you could defend?

The other two series start from a world that already exists — a simulator in one, a physics module in the other — which is fine for telling a story and no help at all when what you have is a CSV. Nothing in this one imports axiom.sim. Every object you would have to write is written on the page: the roles, the entities and their dimensions, the spec, the estimand.

A modelling story · 5 steps

A model of your own

Your response is an exponential approach to a ceiling, and no kernel on the menu is that shape. How do you write the mean yourself, get it checked, and fit it — and what do you give up by leaving the kernels?

A `ModelSpec` is the object underneath everything else: a mean written as a typed expression, the outcome it predicts, the likelihood around it, and every parameter with a prior. `SurfaceSpec` builds one and hands it to the same backends. Writing one yourself is the route the physics case study takes, on a response small enough to read in five steps.

An analysis story · 8 steps

One question, carried all the way

A logistics operator runs 40 distribution depots in one region and 500 nationally. Should the standing weekly maintenance schedule go from nothing to 60 hours per depot?

Identification refuses the panel on hand, so an experiment is designed, sized against the boundary the decision turns on, and run. Its answer is folded back into the model — and it reverses the decision the observational fit would have made.

A transfer story · 6 steps

Making a model travel

A household water-filter programme was evaluated in one district over twelve weeks, per household. The decision is in a different district, per person, over a year. What has to be true for the first number to be an answer to the second question — and what does it cost to assume it?

This is the failure mode that survives every other check. The identification was fine, the fit was fine, the interval was honest, and the number was still wrong where it landed, because nobody wrote down that the question had changed on the way. Eight facets, a selection diagram, four things a graph can say, and a ledger you could hand to somebody who has to sign for it.

A design story · 6 steps

Designing an experiment before there is any data

Is the positive charge of an atom concentrated in a small hard centre, or spread through the whole atom? Both models fit everything known in 1910. What experiment would tell them apart — and specifically, which scattering angles, what shape of aperture, and for how long?

Nothing here is an analysis. Every step decides what to go and measure, and the whole argument turns on noticing that the two rival atoms are one model at two values of one number. That is what gives the experiment a resolving power, a sensitivity curve, and a rule for when to stop.

Then what

Where to go after them

The two worked problems exist at full length as notebooks, with every intermediate result the site's path leaves out: nbs/tutorial/ and nbs/case-studies/rutherford/. For the porting path, every symbol it uses is demonstrated on its own in nbs/surface/ and nbs/estimands/.

For the same phases taken further one at a time, the five pillar pages start at Identify. For the same library in twelve other fields, the examples. For the scattering study written up as a finished argument rather than as a tutorial, see GEIGER-1911; for a sequential trial that has to stop an arm early, HYPER-3.