learn-two-cultures-with-phoebe / Session 2 of 6
Learn The Two Cultures with Phoebe · Session 2 of 6

All models are wrong, some are useful

It is the most quoted sentence in statistics, and most people who quote it could not tell you where it is printed. George Box wrote the idea twice in 1976, put the exact words in a section heading in 1979, and a softer "essentially" version is widely credited to a 1987 book. Tonight we read the first two at source, turn "some are useful" into three checks you can actually run, and then meet a real regression that gets 170 of 171 unseen biopsies right while 7 of its 30 coefficients point against their own feature. Is that a tiger or a mouse? It depends entirely on what you want the model for.

🟠 Advanced Leaders and practitioners Python, scikit-learn 45 min
0-3 · Welcome 3-18 · Box, and what useful means 18-40 · Build-along: a useful model that is wrong 40-45 · Q&A
Part 0

Where we start

Session 1 ended on a puzzle: the logistic regression was 99.4 percent right on biopsies it had never seen, and its biggest coefficient sat on texture rather than on any of the size measurements a pathologist would name first. Box is the statistician who gave the data modelling culture its best defence against exactly that kind of embarrassment. His defence is not "the model is right". It is "the model is wrong, so be precise about where". The colours are unchanged: ochre for the data modelling culture, violet for the algorithmic culture.

🎫 Clear all three quiz questions to stamp your passport Live = presented in the 45 minutes Self-study = the full depth, after class ★ Build-along = run the code yourself

★ What you walk out with tonight. The correct citation for "all models are wrong", with the page number, and the two versions people confuse it with; Box's own test for a model, "Is the model illuminating and useful?"; three operational checks for useful that you can run on any model at work tomorrow; and a script that finds the 7 coefficients in a 99.4 percent model that you must never read as facts about nature.

Part 1 · covers where Box wrote it

One idea, three printings

6 min live

Ask a room where "all models are wrong, but some are useful" comes from and you will hear three different years. All three are partly right, which is why the argument never ends. The fix is to separate the idea, the exact sentence and the popular version, and to say which of them has actually been read.

ONE IDEA, THREE PRINTINGS which words appear where, and whether anyone here has read the page 1976 1979 1987 Science and Statistics JASA 71(356), p.792 "Since all models are wrong" twice: 2.3 Parsimony and 2.4 Worrying Selectively Robustness in Statistics Launer and Wilkinson (eds), p.202 ALL MODELS ARE WRONG BUT SOME ARE USEFUL the exact sentence, as a heading Empirical Model-Building Box and Draper, a book "Essentially, all models are wrong, but some are useful." widely quoted read at source read at source reported The idea is 1976, the exact sentence is 1979, and the "essentially" version is 1987 and was not read here.
🔍 Click to zoom - the terracotta card is the only place the famous sentence has been found word for word, and it is a heading, not a conclusion
LiveWhat the 1976 paper actually says4 min▶

Box's 1976 paper, "Science and Statistics", appeared in the Journal of the American Statistical Association, volume 71. Read at source, it does not contain the sentence on the mugs. It contains the idea, twice, on the same page, p.792, and each time the words "all models are wrong" are the first half of an argument about what to do next.

Section 2.3, Parsimony: "Since all models are wrong the scientist cannot obtain a 'correct' one by excessive elaboration." He adds that "overelaboration and overparameterization is often the mark of mediocrity". Section 2.4, Worrying Selectively: "Since all models are wrong the scientist must be alert to what is importantly wrong. It is inappropriate to be concerned about mice when there are tigers abroad."

The exact sentence arrives three years later, as a section heading on p.202 of Box's chapter "Robustness in the Strategy of Scientific Model Building", in the 1979 volume Robustness in Statistics edited by R. L. Launer and G. N. Wilkinson. The chapter was also issued as a Wisconsin technical report in May 1979; that copy is reported, not read. Box and Draper's 1987 book Empirical Model-Building and Response Surfaces is widely quoted as saying "Essentially, all models are wrong, but some are useful" (reported: the book was not opened for these pages).

So when a colleague cites the sentence, the precise citation is Box 1979, p.202. When they want the argument behind it, send them to 1976, p.792: that is where the useful part, the tigers and the mice, is written out.

Self-study1976 in context: Fisher, iteration and "mathematistry"3 min▶

The 1976 paper is not about models in the abstract. Box illustrates it with R. A. Fisher's work at Rothamsted, and his claim is that good statistics comes from exactly that kind of close contact with a real scientific problem. He describes science as "a motivated iteration" between theory and practice and draws it as a feedback loop, which is where Part 2's figure starts.

Two lines carry the attitude. The statistician knows that "in nature there never was a normal distribution, there never was a straight line", and yet useful results follow from assuming both. And "we cannot know that any statistical technique we develop is useful unless we use it." For theory that has lost contact with practice he coins a word, "mathematistry".

Read beside Breiman, this is the data modelling culture at its most self-aware. Box never claims the equation in the box is nature's. He claims that a deliberately wrong equation, criticised against data again and again, is how science makes progress.

Real world

The ideal gas law. Box's own example sits on the page after the heading, p.203. The law PV = RT "is not exactly true for any real gas, but it frequently provides a useful approximation and furthermore its structure is informative". Every chemistry student is taught a model that is false for every gas in the room, because the three things it relates, and the way they trade off, are the right three things. "For such a model there is no need to ask the question 'Is the model true?'. If 'truth' is to be the 'whole truth' the answer must be 'No'."

Part 2 · covers what useful means operationally

Three checks for useful

5 min live

Box's replacement for "is it true?" is one line from the 1979 chapter: "The only question of interest is 'Is the model illuminating and useful?'." He also says how to get there: model building "must be accomplished by iteration", a tentative model, a tentative analysis, then criticism using residual diagnostic checks, and round again. What he does not give is a checklist. Here is one, built from his words and Breiman's.

BOX'S LOOP, WITH THREE GATES ON THE WAY OUT the loop is Box's; the gates are a synthesis of Box and Breiman tentative model tentative analysis criticism revise the model residual diagnostic checks, Box 1979 a motivated iteration Box 1976, drawn as a loop 1 · beats the base rate on rows it never saw Breiman's perception (d) 2 · wrong only where it does not matter the decision does not care about the error Box: tigers, not mice 3 · its structure tells you something Box's word, "illuminating" like PV = RT, wrong yet informative useful, for this decision fails a gate: back round the loop The gates are a synthesis, not a rule Box or Breiman wrote. Each one names a question, not a threshold.
🔍 Click to zoom - criticism is where "useful" gets decided, and the three gates are what criticism should be asking
LiveThe three checks, and where each one comes from5 min▶

A synthesis, not a quotation. Neither Box nor Breiman wrote this list; it is built from their words so that "useful" becomes something you can test rather than assert.

  1. It beats the base rate on rows it never saw. Breiman's perception (d): "Predictive accuracy on test sets is the criterion for how good the model is." A model that cannot beat the do-nothing rule on unseen rows is not useful for anything, whatever its coefficients say. This is the algorithmic culture's check, and a data modeller loses nothing by running it.
  2. It is wrong only where the decision does not care. Box's "importantly wrong": every model is wrong somewhere, so the question is whether the wrongness sits under the decision you are about to make. A tiger for one use can be a mouse for another; Part 3 shows the same coefficient being both.
  3. Its structure tells you something. Box's "illuminating". The ideal gas law earns its place because its structure is informative, not because it is exact. A model whose structure you cannot read, or whose structure you should not read, can still pass checks 1 and 2, but it does not pass this one.

Notice what is missing: a high R squared on the training rows, every coefficient significant, a clean goodness-of-fit test. None of those is on the list, and Part 3's real world story shows a model failing nearly all of them and still winning.

Self-studyCox in 2001: the ideal, and the lower bound2 min▶

D. R. Cox, replying to Breiman in the same issue of Statistical Science, states the data modelling ideal in one sentence: "Descriptively appealing and transparent methods with a firm model base are the ideal." That is check 3 raised to a principle.

He is also honest about its cost. The significance tests and confidence intervals the culture reports "are often lower bounds to real uncertainty", because they are computed as if the model were right. Box's line and Cox's line are the same warning from two directions: the model is wrong, so the uncertainty it reports about itself is too small.

Self-studyTukey, quoting Martin Wilk, 19621 min▶

Fourteen years before Box's paper, John Tukey quoted his colleague Martin Wilk in "The Future of Data Analysis" (p.7): "The hallmark of good science is that it uses models and 'theory' but never believes them." It is the shortest statement of the whole attitude, and session 3 reads the rest of Tukey's paper.

One fault line this session leaves alone: frequentist versus Bayesian runs inside the data modelling culture, not between the cultures. Breiman: "I would include Bayesians in the data modeling culture." That argument lives in Bayesian, leader session 5 ↗.

Real world

When the prediction is not where the data was. Cox's reply names the case where check 2 bites hardest. He accepts that some problems suit a directly empirical approach, short term economic forecasting and real-time flood forecasting among them, then warns: "Often the prediction is under quite different conditions from the data." His examples are forecasting the v-CJD epidemic in the UK and predicting the effect on US cancer incidence of reducing medical X-rays by 10 percent. In both, the question is about a world the data never contained, and an error that was a mouse on the historical rows can be the tiger that decides the answer.

Part 3 · covers worrying selectively on real biopsies

Tiger or mouse?

4 min live

Back to session 1's regression. With all 30 features it gets 170 of 171 held-out biopsies right, 99.4 percent. And 7 of its 30 coefficients point against their own feature's correlation with "benign" on the training rows. They are not the size features. They are mean compactness, mean symmetry, smoothness error, compactness error, concavity error, fractal dimension error and worst compactness. The model is wrong about them. Whether that matters is Box's question.

ONE SIGNAL, SIX SHARES, ONE FLIP standardised logistic coefficients, one scale for both panels · negative leans malignant worst area alone 1 feature, 158 of 171 held out -4.41 one feature carries the whole size signal correlation with benign -0.74 0 the same size signal, full 30-feature model 170 of 171 held out · 21 pairs correlate above 0.9 mean radius mean perimeter mean area worst radius worst perimeter worst area -0.27 -0.24 -0.31 -0.84 -0.61 -0.85 near-twins share it mean compactness +0.57 correlation with benign -0.59: the sign points the other way Prediction does not care how the weight is split. Reading one coefficient as a fact about nature does.
🔍 Click to zoom - the terracotta bar is a coefficient doing repair work for its neighbours, not describing its own feature
LiveThe same flip is a mouse and a tiger3 min▶

For prediction, a mouse. The model is 170 of 171 on biopsies it never saw, well above the 62.6 percent base rate, so it passes check 1. Nobody deciding "send this biopsy for a second read" is harmed by how the weight is split between radius, perimeter and area, because the prediction uses them all together.

For reading mechanism, a tiger. Read mean compactness off the model and you would report that compact nuclei lean benign, +0.57. On the training rows the feature's correlation with benign is -0.59: more compact nuclei are more often malignant. The coefficient is not describing compactness; it is correcting its neighbours. The model fails check 3 for that sentence, and check 2 for any decision built on it.

This is Box's "importantly wrong" made concrete: the error is the same seven numbers either way. What changes is the decision sitting on top of them. The honest report says both halves: "useful for prediction; do not read these seven coefficients".

Self-studyWhy a coefficient can take the wrong sign3 min▶

Radius, perimeter and area are three ways of measuring one thing. On the training rows mean radius and mean perimeter correlate at 0.998, mean radius and mean area at 0.990, worst radius and worst perimeter at 0.993, worst radius and worst area at 0.987. Across all 30 features, 21 pairs correlate above 0.9 in absolute value.

When features are near-duplicates, the fit can trade weight between them almost freely, and a feature can take whatever sign best corrects the others rather than one that describes itself. Alone, worst area carries a coefficient of -4.41; in the full model it carries -0.85, and the rest of the size signal is spread over five siblings. With Box's parsimony in mind, the fix is not a cleverer reading of 31 numbers. It is fewer features: the build-along refits on the dataset creators' 3 and gets 4 numbers, 0 sign surprises and 167 of 171.

The broader fact that many equally good models can tell different stories about the same data is the Rashomon effect, and it has its own session: ML Epistemology, leader session 2 ↗.

Real world

Hoadley's Fat Scorecard. Bruce Hoadley, replying to Breiman from the credit scoring company Fair, Isaac, describes a scorecard problem where every model with 27 to 36 characteristics had the same test performance. The 27-characteristic model had 162 score weights with p-values from 0.0001 to 0.984, only one of them below 0.05. "The confidence intervals for the 162 score weights were useless." And it slightly outperformed a 2,000-weight neural network. Wrong by the textbook, useful by the test: it failed every significance check and passed check 1.

Build-along

A useful model that is wrong

★ 22 min · everyone builds

Same data, same split, same regression as session 1. Five steps find the seven flipped coefficients, show the near-duplicates that cause them, and refit on the three features the dataset's creators chose, to see what parsimony costs in accuracy and buys in readability. Every output below is what the code prints on scikit-learn 1.9.0.

FIVE STEPS FROM 99.4 PERCENT TO A MODEL YOU CAN READ 1 · fit all 30 held out 170 of 171 2 · count flips 7 of 30 against their own correlation 3 · correlations radius, perimeter 0.998 21 pairs above 0.9 4 · worst area alone: -4.41 158 of 171 5 · creators' 3 4 numbers 0 flips 167 of 171 Same split as session 1. Giving up three biopsies buys a model with no coefficient you must not read.
🔍 Click to zoom - the terracotta step is the one most teams never run, and it is a single line of code

Rebuild session 1's split and regression. Same seed, same 398 training rows and 171 held-out rows. A small helper fits a standardised logistic regression on any list of columns, because steps 4 and 5 refit on fewer features.

★ Step 1 · fit all 30import numpy as np from sklearn.datasets import load_breast_cancer from sklearn.preprocessing import StandardScaler from sklearn.linear_model import LogisticRegression data = load_breast_cancer() X, y = data.data, data.target # y: 1 = benign, 0 = malignant names = list(data.feature_names) rng = np.random.default_rng(2001) # session 1's split, unchanged test = [] for cls in (0, 1): idx = np.flatnonzero(y == cls) test += list(rng.permutation(idx)[: round(0.30 * len(idx))]) test = np.array(sorted(test)) train = np.setdiff1d(np.arange(len(y)), test) def fit(cols): sc = StandardScaler().fit(X[train][:, cols]) m = LogisticRegression(C=1.0, tol=1e-10, max_iter=10000) m.fit(sc.transform(X[train][:, cols]), y[train]) right = (m.predict(sc.transform(X[test][:, cols])) == y[test]).sum() return m, right lr, right = fit(list(range(30))) print("held out", right) # held out 170

Count the flips. For each feature, compare the sign of its correlation with benign on the training rows against the sign of its coefficient. A disagreement means the coefficient is not describing its own feature.

★ Step 2 · the sign checkr = np.array([np.corrcoef(X[train][:, j], y[train])[0, 1] for j in range(30)]) w = lr.coef_[0] flips = [j for j in range(30) if r[j] * w[j] < 0] print(len(flips)) for j in flips: print(f"{names[j]:24s} corr {r[j]:+.2f} coef {w[j]:+.2f}") # 7 # mean compactness corr -0.59 coef +0.57 # mean symmetry corr -0.33 coef +0.17 # smoothness error corr +0.07 coef -0.23 # compactness error corr -0.25 coef +0.71 # concavity error corr -0.20 coef +0.25 # fractal dimension error corr -0.06 coef +0.39 # worst compactness corr -0.58 coef +0.13

Find the near-duplicates. Correlate the size features with each other, then count every pair above 0.9 in absolute value. This is the mechanism behind step 2.

★ Step 3 · the twinsc = np.corrcoef(X[train].T) for a, b in [("mean radius", "mean perimeter"), ("mean radius", "mean area"), ("worst radius", "worst perimeter"), ("worst radius", "worst area")]: print(f"{a} vs {b}: {c[names.index(a), names.index(b)]:.3f}") print("pairs above 0.9:", sum(abs(c[i, j]) > 0.9 for i in range(30) for j in range(i + 1, 30))) # mean radius vs mean perimeter: 0.998 # mean radius vs mean area: 0.990 # worst radius vs worst perimeter: 0.993 # worst radius vs worst area: 0.987 # pairs above 0.9: 21

Watch the weight being shared. Print the six size coefficients from the full model, then fit worst area on its own. The signal that six features split between them, one feature carries alone.

★ Step 4 · one feature alonefor n in ("mean radius", "mean perimeter", "mean area", "worst radius", "worst perimeter", "worst area"): j = names.index(n) print(f"{n:16s} coef {w[j]:+.2f} corr {r[j]:+.2f}") one, right1 = fit([names.index("worst area")]) print(f"worst area alone: coef {one.coef_[0][0]:+.2f}, held out {right1}") # mean radius coef -0.27 corr -0.72 # mean perimeter coef -0.24 corr -0.74 # mean area coef -0.31 corr -0.71 # worst radius coef -0.84 corr -0.77 # worst perimeter coef -0.61 corr -0.78 # worst area coef -0.85 corr -0.74 # worst area alone: coef -4.41, held out 158

Refit on the creators' 3. The dataset's own documentation reports its best separating plane used worst area, worst smoothness and mean texture. Fit those three on our split and check every sign against its correlation.

★ Step 5 · parsimonythree = [names.index(n) for n in ("worst area", "worst smoothness", "mean texture")] lr3, right3 = fit(three) print("three held out", right3) print(f"intercept {lr3.intercept_[0]:+.2f}") for j, v in zip(three, lr3.coef_[0]): print(f"{names[j]:16s} coef {v:+.2f} corr {r[j]:+.2f}") # three held out 167 # intercept +0.30 # worst area coef -4.63 corr -0.74 # worst smoothness coef -1.36 corr -0.42 # mean texture coef -1.02 corr -0.42

Price the trade, do not hide it. The 30-feature model is 170 of 171 with 7 coefficients you must not read; the 3-feature model is 167 of 171 with 4 numbers that all agree with their correlations. Three biopsies on 171 is a real cost, and whether it is worth paying depends on whether anyone will read the coefficients. Write the answer down before choosing, not after.

Homework

Before session 3

30 min
  1. Read Box 1976, section 2 (JASA 71, starting p.791). Underline both "Since all models are wrong" sentences and write down what each one tells the scientist to do next.
  2. List the tigers and the mice for one of your own models. Two columns: the ways it is wrong that would change a decision, and the ways it is wrong that would not. Name the decision at the top of the page.
  3. Run the flips check on your model. Step 2's three lines work on any linear model with a numeric target or a 0/1 label. Count the sign disagreements and mark which features they sit on.
  4. Drop all but one size feature and watch the flips. Keep worst area, remove the other five size features, refit, and rerun step 2. Note which of the seven flips disappear, which remain, and what happens to the held-out score. Your numbers will differ from any you have seen tonight; that is the exercise.
Check yourself

Three questions

Clear all three and session 2 gets stamped in your passport.

1 · Which text contains the exact sentence "All models are wrong but some are useful"?

The idea is 1976 (twice, p.792), the exact sentence is 1979 (a heading, p.202), and the "Essentially, all models are wrong, but some are useful" version is credited to Box and Draper 1987, reported rather than read.

2 · A manager asks what "useful" means for a model, operationally. Which answer can you actually test?

Training fit says nothing about unseen rows, and significance can fail while the model wins: Hoadley's 162-weight scorecard had only one p-value below 0.05 and still slightly outperformed a 2,000-weight neural network. The three checks are a synthesis of Breiman's perception (d) and Box's "importantly wrong" and "illuminating".

3 · The 30-feature regression is 99.4 percent right on held-out biopsies and 7 of its coefficients point against their feature's correlation. What can you honestly say?

The same seven numbers are a mouse for prediction and a tiger for reading mechanism. Mean compactness is +0.57 in the model and -0.59 in its correlation with benign; refitting on the creators' 3 gives 0 flips at 167 of 171.

Sources covered

What this session teaches, and where it came from

✓Box (1976), Science and Statistics, sections 2.3 and 2.4JASA 71(356), 791-799; read at source, both "Since all models are wrong" sentences checked on p.792, and the famous sentence confirmed absent
✓Box (1979), Robustness in the Strategy of Scientific Model BuildingIn Launer and Wilkinson (eds), Robustness in Statistics, 201-236; read at source, the heading on p.202 and the ideal gas passage on p.203
◐Box and Draper (1987), Empirical Model-Building and Response SurfacesReported only: the "Essentially, all models are wrong" wording is widely quoted and was not read here
✓Cox's and Hoadley's comments on Breiman (2001)Statistical Science 16(3); read at source, Cox p.217 and the Fat Scorecard p.222
✓Tukey (1962), quoting Martin WilkThe Future of Data Analysis, Annals of Mathematical Statistics 33(1), p.7; read at source
✓The build-along on UCI Breast Cancer Wisconsin (Diagnostic)Wolberg, Mangasarian, Street and Street (1993), doi 10.24432/C5DW2B, CC BY 4.0; every printed output produced by the code on scikit-learn 1.9.0

Every fact on this page, and its verification tier, is recorded in the course's source map.

Session 2 cheat sheet · pin this

The citationExact sentence: Box 1979, p.202, a heading. The idea: Box 1976, p.792, twice. The "essentially" version: 1987, reported.
Box's questionNot "is it true?" but "Is the model illuminating and useful?"
Worry selectivelyEvery model is wrong. Ask what is importantly wrong for this decision: tigers, not mice.
Three checks for usefulBeats the base rate on unseen rows; wrong only where the decision does not care; structure tells you something.
Run the sign checkCompare each coefficient's sign with its feature's correlation. 7 of 30 disagree on a 99.4 percent model.
Parsimony has a price30 features: 170 of 171, 7 flips. The creators' 3: 167 of 171, 0 flips, 4 numbers.