Institutional decision making
Thinking about statistics
Principle or heuristic
Intermediate
The setting where formal decision analysis makes sense.
What it is
Formal decision analysis means writing down a utility function, putting probabilities on outcomes and choosing the action that maximizes expected utility. Gelman argues it fits best in institutional settings: a government agency, a hospital or a company that makes the same kind of decision many times and has to justify its rules to others.
For one-off personal choices, utilities are vague and change as you think about them, and the formal machinery can feel artificial. An institution, by contrast, needs explicit, consistent and auditable rules, and it gets to average over many cases.
Why it matters
Institutions often decide by habit or by blanket rules: test everyone, test no one, treat everyone above a fixed cutoff. When decisions repeat across thousands of cases, small improvements in the rule add up. Decision analysis turns a model’s predictions into a policy and makes the tradeoffs explicit, such as the cost of a test against the value of what it finds. That openness is itself valuable when the public is paying.
How it works
For each case \(i\) and action \(a\), compute the expected utility \(\mathrm{E}[U(a, \theta_i) \mid \text{data}]\) under the posterior for the unknown \(\theta_i\). Choose the action with the highest expected utility. A classic example, from Gelman’s work with Phillip Price, is home radon. A model predicts each house’s radon level from geology and house features. The decision rule tells a homeowner whether to remediate immediately, measure first, or do nothing, based on predicted level, uncertainty, costs, and the health benefit of a reduction.
Simulated example
An agency oversees 2,000 homes. Each home has an uncertain true radon level. A model gives a prediction with known uncertainty. A test costs money but reveals the true level, and remediating a high home produces a benefit. Compare three blanket policies with the decision-analytic one: test only the homes where the expected value of information exceeds the test’s cost.
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, sum, dnorm, fmt} from "../js/stats.js"
viewof testCost = Inputs.range([0, 300], {value: 50, step: 10, label: "Cost of a test ($)"})
viewof fixCost = Inputs.range([500, 3000], {value: 1500, step: 100, label: "Cost of remediation ($)"})
viewof benefitPerUnit = Inputs.range([100, 2000], {value: 700, step: 50, label: "Health value per unit of radon removed ($)"})
viewof seed = Inputs.range([1, 500], {value: 5, step: 1, label: "Random seed"})
policies = {
const r = rng(seed);
const s = 0.6; // model's predictive sd (log scale)
const homes = range(2000).map(() => {
const pred = r.normal(0.4, 0.7); // predicted log radon
const truth = r.normal(pred, s);
return {pred, level: Math.exp(truth)};
});
// Remediation brings level down to 1; value = benefit*(level-1) - fixCost when level > 1.
const gain = lvl => Math.max(0, benefitPerUnit * (lvl - 1) - fixCost);
const fixGain = lvl => benefitPerUnit * Math.max(0, lvl - 1) - fixCost;
const expectedFixGain = h => {
// E[benefit*(L-1)^+] - fixCost, by numeric integration over the predictive.
let acc = 0;
for (let z = -4; z <= 4; z += 0.05) acc += dnorm(z) * 0.05 * Math.max(0, Math.exp(h.pred + s * z) - 1);
return benefitPerUnit * acc - fixCost;
};
const expectedTestGain = h => {
let acc = 0;
for (let z = -4; z <= 4; z += 0.05) acc += dnorm(z) * 0.05 * gain(Math.exp(h.pred + s * z));
return acc - testCost;
};
const value = {
"Do nothing": 0,
"Remediate all": sum(homes.map(h => fixGain(h.level))),
"Test all": sum(homes.map(h => gain(h.level) - testCost)),
"Decision analysis": sum(homes.map(h => {
const eFix = expectedFixGain(h), eTest = expectedTestGain(h);
const best = Math.max(0, eFix, eTest);
return best === 0 ? 0 : best === eFix ? fixGain(h.level) : gain(h.level) - testCost;
}))
};
return Object.entries(value).map(([policy, v]) => ({policy, perHome: v / homes.length}));
}
Plot.plot({
ariaLabel: "Institutional decision making: simulation chart",
ariaDescription: "Horizontal axis: Net benefit per home ($). The chart updates with the controls above it, and the summary below the charts states the result in words.",
height: 220,
marginLeft: 130,
x: {label: "Net benefit per home ($)", grid: true},
y: {label: null},
marks: [
Plot.barX(policies, {y: "policy", x: "perHome", fill: d => d.policy === "Decision analysis" ? "#2166ac" : "#8a8a8a", sort: {y: "x", reverse: true}}),
Plot.ruleX([0])
]
})# Institutional decision making: when to test homes for radon.
1test_cost <- 50 # cost of a test ($)
fix_cost <- 1500 # cost of remediation ($)
benefit <- 700 # health value per unit of radon removed ($)
2set.seed(5)
s <- 0.6 # model's predictive sd (log scale)
3pred <- rnorm(2000, 0.4, 0.7) # predicted log radon for each home
level <- exp(rnorm(2000, pred, s)) # true radon level
gain <- function(l) pmax(benefit * (l - 1) - fix_cost, 0) # test, then fix
fix_gain <- function(l) benefit * pmax(l - 1, 0) - fix_cost # fix, no test
# Expected values over each home's predictive distribution (grid over z)
z <- seq(-4, 4, by = 0.05)
wz <- dnorm(z) * 0.05
L <- exp(outer(pred, s * z, "+"))
4e_fix <- benefit * (pmax(L - 1, 0) %*% wz) - fix_cost
5e_test <- gain(L) %*% wz - test_cost
6best <- pmax(0, e_fix, e_test)
decision <- ifelse(best == 0, 0, ifelse(best == e_fix, fix_gain(level),
gain(level) - test_cost
))
per_home <- c(
"Do nothing" = 0, "Remediate all" = mean(fix_gain(level)),
"Test all" = mean(gain(level) - test_cost),
"Decision analysis" = mean(decision)
)
print(round(per_home)) # net value per home ($)
par(mar = c(4, 9, 1, 1))
7barplot(per_home,
horiz = TRUE, las = 1,
col = c("grey70", "grey70", "grey70", "#2166ac"),
xlab = "Net value per home ($)"
)- 1
- The page’s controls: the cost of a radon test, the cost of remediation, and the health value of each unit of radon removed.
- 2
- Fixes the random numbers so the run is reproducible.
- 3
- A model’s prediction of each home’s radon level, with uncertainty.
- 4
- The expected value of remediating without testing, averaged over the home’s predictive distribution.
- 5
- The expected value of testing first and remediating only if the test warrants it.
- 6
- The decision analysis: for each home, do nothing, remediate, or test, whichever has the highest expected value.
- 7
- Net value per home of the four policies. Making the decision home by home, from the model’s uncertainty, beats every blanket rule.
# Institutional decision making: when to test homes for radon.
from statistics import NormalDist
import numpy as np
import matplotlib.pyplot as plt
test_cost = 50 # cost of a test ($)
fix_cost = 1500 # cost of remediation ($)
benefit = 700 # health value per unit of radon removed ($)
rng = np.random.default_rng(5)
s = 0.6 # model's predictive sd (log scale)
pred = rng.normal(0.4, 0.7, 2000) # predicted log radon for each home
level = np.exp(rng.normal(pred, s)) # true radon level
def gain(lv): # test first, fix only if worth it
return np.maximum(0, benefit * (lv - 1) - fix_cost)
def fix_gain(lv): # fix without testing
return benefit * np.maximum(0, lv - 1) - fix_cost
# Expected values over each home's predictive distribution (grid over z)
z = np.arange(-4, 4.001, 0.05)
wz = np.array([NormalDist().pdf(v) for v in z]) * 0.05
L = np.exp(pred[:, None] + s * z[None, :])
e_fix = benefit * (np.maximum(0, L - 1) @ wz) - fix_cost
e_test = gain(L) @ wz - test_cost
best = np.maximum(0, np.maximum(e_fix, e_test))
decision = np.where(best == 0, 0, np.where(best == e_fix, fix_gain(level),
gain(level) - test_cost))
per_home = {"Do nothing": 0, "Remediate all": fix_gain(level).mean(),
"Test all": (gain(level) - test_cost).mean(),
"Decision analysis": decision.mean()}
for k, v in per_home.items():
print(f"{k}: {v:.0f} dollars per home")
plt.barh(list(per_home), list(per_home.values()),
color=["0.7", "0.7", "0.7", "#2166ac"])
plt.xlabel("Net value per home ($)")
plt.tight_layout()
plt.show()Key takeaways
- Formal decision analysis is most convincing where a decision is repeated many times and someone has to justify it.
- An institution averages over many cases, so expected utility is close to what actually happens.
- Writing the utility function down makes the tradeoffs visible and open to debate.
Source
- Andrew Gelman, Institutional decision analysis (2004).
- Lin, Gelman, Price and Krantz, “Analysis of local decisions using hierarchical modeling, applied to home radon measurement and remediation”, Statistical Science (1999).