Ockhamite Tendencies
Building and checking models
Fallacy
Advanced
The irritating habit of trying to get other people to use oversimplified models.
What it is
The entry comes from Gelman’s published discussion of an article by Christian Robert, Nicolas Chopin and Judith Rousseau on Harold Jeffreys’s Theory of Probability. One of his three points: “it is natural for those of us who work in social and computational sciences to favor complex models, contra Jeffreys’s preference for simplicity.” The others are to go beyond Jeffreys’s principles toward weakly informative priors, and to include model checking explicitly in data analysis.
Ockham’s razor says not to multiply entities beyond necessity. As a heuristic for scientific explanation it has its uses. Gelman objects to its use as a statistical modeling rule: the reflex to drop terms, set small effects to exactly zero, and push collaborators toward the simplest model that “fits.” In the social and biological sciences especially, effects are rarely exactly zero. The real question is how to estimate many small, uncertain effects well, not how to pick which ones to pretend don’t exist.
Why it matters
Simplifying by deletion, through stepwise selection, dropping non-significant terms or insisting on a single predictor, produces models that are overconfident and biased. The surviving coefficients are inflated by the significance filter, and the deleted ones are set to an exact zero that nobody believes. Predictions suffer, and so does understanding. The alternative is continuous model expansion: include the plausible terms and use partial pooling or priors to keep them in check.
How it works
Compare two ways of handling \(K\) candidate effects \(\beta_1, \dots, \beta_K\), most of them small but not zero:
- Ockhamite selection. Estimate each one, keep it if \(|\hat\beta_k / \text{se}_k| > 2\), and otherwise set it to 0.
- Partial pooling. Shrink every estimate toward zero by a common factor learned from the data, \(\tilde\beta_k = \frac{\tau^2}{\tau^2 + \text{se}^2}\,\hat\beta_k\), keeping all of them.
Selection is a hard, discontinuous version of shrinkage. It is too aggressive for most effects and not aggressive enough for the few lucky ones it keeps.
Simulated example
Forty effects are drawn from a normal distribution, so most are small. Each is estimated with noise. Compare the error of the simplify-by-selection approach with the error of keeping everything and partially pooling.
Show simulation code
The R version uses base R, and the Python version uses NumPy and Matplotlib. Where the simulation draws random numbers, each language draws its own, so exact numbers differ slightly but show the same pattern. The numbered markers in the R code are explained under it.
import {rng, range, mean, fmt} from "../js/stats.js"
viewof tau = Inputs.range([0.05, 1.5], {value: 0.4, step: 0.05, label: "Spread of true effects τ"})
viewof se = Inputs.range([0.1, 1], {value: 0.4, step: 0.05, label: "Standard error of each estimate"})
viewof seed = Inputs.range([1, 500], {value: 22, step: 1, label: "Random seed"})
effects = {
const r = rng(seed);
const raw = range(40).map(k => {
const truth = r.normal(0, tau), est = r.normal(truth, se);
return {k, truth, est};
});
const tau2hat = Math.max(0.0001, mean(raw.map(d => d.est ** 2)) - se * se);
return raw.map(d => ({
...d,
selected: Math.abs(d.est / se) > 2 ? d.est : 0,
pooled: tau2hat / (tau2hat + se * se) * d.est
}));
}
Plot.plot({
ariaLabel: "Ockhamite Tendencies: simulation chart",
ariaDescription: "Horizontal axis: True effect. Vertical axis: Estimate used. The chart updates with the controls above it, and the summary below the charts states the result in words.",
height: 320,
x: {label: "True effect", grid: true},
y: {label: "Estimate used", grid: true},
color: {legend: true, domain: ["Ockhamite selection", "Partial pooling"], range: ["#d6604d", "#2166ac"]},
marks: [
Plot.line([[-3 * tau, -3 * tau], [3 * tau, 3 * tau]], {stroke: "#8a8a8a", strokeDasharray: "4 3"}),
Plot.dot(effects, {x: "truth", y: "selected", fill: () => "Ockhamite selection", r: 3.5}),
Plot.dot(effects, {x: "truth", y: "pooled", fill: () => "Partial pooling", r: 3.5})
]
})# Ockhamite Tendencies: zeroing out small effects vs partial pooling.
1tau <- 0.4 # spread of true effects
se <- 0.4 # standard error of each estimate
2set.seed(22)
truth <- rnorm(40, 0, tau)
est <- rnorm(40, truth, se)
tau2_hat <- max(0.0001, mean(est^2) - se^2)
3selected <- ifelse(abs(est / se) > 2, est, 0) # keep only "significant"
4pooled <- tau2_hat / (tau2_hat + se^2) * est # shrink everything a bit
rmse <- function(x) sqrt(mean((x - truth)^2))
cat("Error (RMSE): raw ", round(rmse(est), 2), ", select-or-zero ",
round(rmse(selected), 2), " (", sum(selected != 0), " of 40 kept), ",
"partial pooling ", round(rmse(pooled), 2), "\n",
sep = ""
)
5plot(truth, selected,
pch = 19, col = "#d6604d", xlab = "True effect",
ylab = "Estimate", ylim = range(est)
)
points(truth, pooled, pch = 19, col = "#2166ac")
abline(0, 1, lty = 2)
legend("topleft", c("Select or zero", "Partial pooling"),
pch = 19,
col = c("#d6604d", "#2166ac"), bty = "n"
)- 1
- The page’s controls: the spread of the 40 true effects and each estimate’s standard error.
- 2
- Fixes the random numbers so the run is reproducible.
- 3
- The Ockhamite move: keep the significant effects at face value and set the rest to exactly zero.
- 4
- The alternative: keep every effect, shrunk a little toward zero.
- 5
- Both against the truth. Zeroing out small effects is a model with many parameters set to exactly zero, and it loses to shrinking them.
# Ockhamite Tendencies: zeroing out small effects vs partial pooling.
import numpy as np
import matplotlib.pyplot as plt
tau = 0.4 # spread of true effects
se = 0.4 # standard error of each estimate
rng = np.random.default_rng(22)
truth = rng.normal(0, tau, 40)
est = rng.normal(truth, se)
tau2_hat = max(0.0001, np.mean(est ** 2) - se ** 2)
selected = np.where(np.abs(est / se) > 2, est, 0) # keep "significant"
pooled = tau2_hat / (tau2_hat + se ** 2) * est # shrink everything
def rmse(x):
return np.sqrt(np.mean((x - truth) ** 2))
print(f"Error (RMSE): raw {rmse(est):.2f}, select-or-zero "
f"{rmse(selected):.2f} ({np.sum(selected != 0)} of 40 kept), "
f"partial pooling {rmse(pooled):.2f}")
plt.scatter(truth, selected, color="#d6604d", label="Select or zero")
plt.scatter(truth, pooled, color="#2166ac", label="Partial pooling")
lim = [truth.min(), truth.max()]
plt.plot(lim, lim, "k--")
plt.xlabel("True effect")
plt.ylabel("Estimate")
plt.legend()
plt.show()Key takeaways
- In most applied fields effects are rarely exactly zero. Deleting them is a modeling assumption, and usually a bad one.
- Prefer continuous model expansion with regularization to discrete simplification.
- Simplicity is a virtue in communication. It is not a reason to distort estimates.
Source
- Andrew Gelman, Bayes, Jeffreys, prior distributions, and the philosophy of statistics (2009).