mathematics//statistics//causal inference

Causal inference is the part of statistics that asks what would happen if a variable were changed, as opposed to what tends to accompany it in recorded data, and for an engineer it is the difference between a model that can drive a decision or a controller and one that only describes the past. Its tools range from controlled experiments to methods that adjust observational data for known confounders, and the cheapest of them is still to touch the system.


Causal inference is the part of statistics that asks what would happen if a variable were changed, as opposed to what tends to accompany it in recorded data, and for an engineer it is the difference between a model that can drive a decision or a controller and one that only describes the past. Its tools range from controlled experiments to methods that adjust observational data for known confounders, and the cheapest of them is still to touch the system.

Two traps make passive data mislead. The first is confounding: summer heat raises both the load on a fleet of compressors and their failure rate, so load and failures correlate without one causing the other, and a policy of capping load would disappoint. The second is subtler and belongs to every regulated plant. In a well-tuned oven the heater power and the temperature barely correlate: the temperature stays flat while the power compensates for open doors and cold loads. A naive analysis concludes the heater has no effect. What it measured is the heater's relation to the disturbances, because feedback control erases exactly the relation being sought (feedback loop).

Selection, closed loops, heavy tails and outliers fool an analysis more than noise does, and to learn a cause, intervene.

A controlled step, an excitation signal or a field trial answers what no amount of historian data can, because the engineer, and not the process, chose the input (system identification, persistent excitation).

Predicting what usually happens and predicting what will happen if one acts are different questions. A model with 98 % accuracy on test data can be useless for control if it never saw the input changed on purpose, and a closed loop always asks the second question (model and representation).

Acting on a prediction changes the data that follow. A maintenance model that triggers repairs removes the very failures it was trained to foresee, so its next training set is shaped by its own decisions (performative prediction).

When experiments are impossible, observational methods (adjusting for measured confounders, natural experiments, causal graphs) can recover effects, each under assumptions that must be argued from physics or process knowledge rather than from the data alone.

The related traps of the same family have their own notes: selection bias for data chosen by a process, robust statistics for outliers, heavy-tailed distribution for tails.