Basketball, or knitting
Thinking about statistics
Law or aphorism
Introductory
Like these activities, statistics is hard.
What it is
Nobody expects to learn basketball or knitting by reading the rules. You learn them by doing them, badly at first, with feedback, over and over. Statistics is the same. Knowing the formulas is not the same as being able to analyze data, judge whether a pattern is real or spot a flawed design. Gelman’s point is that statistics is hard in this skill-based way, and that teaching and practice should treat it that way.
Why it matters
Treating statistics as rules to memorize produces people who can recite the definition of a p-value but can’t tell a noisy result from a real one. Those people go on to design studies, review papers and make decisions. It also explains why short methods courses and checklists have limited effect: skill comes from many repetitions with feedback, not from exposure to concepts.
How it works
A toy model of skill. A learner looks at scatterplots and has to judge whether there is a real relationship or just noise. Their decision threshold starts poorly calibrated. With feedback after each judgment, they adjust and their accuracy improves. Without feedback, from “reading the rules” only, the threshold is set once from a textbook heuristic and never improves.
Simulated example
A learner judges 300 scatterplots of 20 points each. Half have a real correlation and half are noise. Compare learning with feedback against reading the rules only.
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, cor, pct} from "../js/stats.js"
viewof trueR = Inputs.range([0.1, 0.8], {value: 0.4, step: 0.05, label: "Correlation when the pattern is real"})
viewof lr = Inputs.range([0.001, 0.05], {value: 0.01, step: 0.001, label: "How quickly feedback adjusts judgment"})
viewof seed = Inputs.range([1, 500], {value: 98, step: 1, label: "Random seed"})
practice = {
const r = rng(seed);
const trials = range(300).map(() => {
const real = r() < 0.5, rho = real ? trueR : 0;
const x = r.normals(20), y = x.map(v => rho * v + Math.sqrt(1 - rho * rho) * r.normal());
return {real, rObs: Math.abs(cor(x, y))};
});
let tFeedback = 0.05; // starts "seeing patterns everywhere"
const tRules = 0.05;
const out = [];
trials.forEach((t, i) => {
const sayF = t.rObs > tFeedback, sayR = t.rObs > tRules;
if (sayF !== t.real) tFeedback += (sayF ? 1 : -1) * lr; // feedback nudges the threshold
out.push({i, feedback: +(sayF === t.real), rules: +(sayR === t.real)});
});
return range(15).flatMap(b => {
const blk = out.slice(b * 20, b * 20 + 20);
return [{block: b + 1, how: "Practice with feedback", acc: mean(blk.map(d => d.feedback))}, {block: b + 1, how: "Read the rules only", acc: mean(blk.map(d => d.rules))}];
});
}
Plot.plot({
ariaLabel: "Basketball, or knitting: simulation chart",
ariaDescription: "Horizontal axis: Block of 20 judgments. Vertical axis: Accuracy. The chart updates with the controls above it, and the summary below the charts states the result in words.",
height: 280,
x: {label: "Block of 20 judgments"},
y: {label: "Accuracy", domain: [0.3, 1], tickFormat: "%", grid: true},
color: {legend: true, range: ["#2166ac", "#d6604d"]},
marks: [Plot.line(practice, {x: "block", y: "acc", stroke: "how", strokeWidth: 2, marker: "circle"}), Plot.ruleY([0.5], {stroke: "#8a8a8a", strokeDasharray: "4 3"})]
})# Basketball, or knitting: judging scatterplots is learned by practice.
1true_r <- 0.4 # correlation when the pattern is real
lr <- 0.01 # how quickly feedback adjusts judgment
2set.seed(98)
real <- runif(300) < 0.5
3r_obs <- sapply(real, function(is_real) {
rho <- if (is_real) true_r else 0
x <- rnorm(20)
abs(cor(x, rho * x + sqrt(1 - rho^2) * rnorm(20)))
})
threshold <- 0.05 # the learner starts by seeing patterns everywhere
rules <- 0.05 # the rules-only learner never adjusts
feedback_ok <- rules_ok <- logical(300)
for (i in 1:300) {
says <- r_obs[i] > threshold
feedback_ok[i] <- says == real[i]
5 rules_ok[i] <- (r_obs[i] > rules) == real[i]
4 if (says != real[i]) threshold <- threshold + if (says) lr else -lr
}
cat("Accuracy in the last 100 judgments: with feedback ",
round(100 * mean(feedback_ok[201:300])), "%, rules only ",
round(100 * mean(rules_ok[201:300])), "% (chance: 50%)\n",
sep = ""
)
block <- rep(1:15, each = 20)
acc <- cbind(tapply(feedback_ok, block, mean), tapply(rules_ok, block, mean))
6matplot(1:15, acc,
type = "b", pch = 19, lty = 1, ylim = c(0, 1),
col = c("#2166ac", "#d6604d"), xlab = "Block of 20 judgments",
ylab = "Accuracy"
)
abline(h = 0.5, lty = 2)
legend("bottomright", c("Practice with feedback", "Read the rules only"),
col = c("#2166ac", "#d6604d"), pch = 19, bty = "n"
)- 1
- The page’s controls: the correlation when a pattern is real, and how fast feedback adjusts the learner’s judgment.
- 2
- Fixes the random numbers so the run is reproducible.
- 3
- Three hundred scatterplots of 20 points, half with a real correlation and half pure noise. The learner sees only the sample correlation.
- 4
- Practice with feedback: after each wrong call the learner moves the threshold for calling a pattern real.
- 5
- The rules-only learner keeps the threshold the textbook gave and never adjusts it.
- 6
- Accuracy in blocks of 20 judgments. Practice improves; reading the rules does not.
# Basketball, or knitting: judging scatterplots is learned by practice.
import numpy as np
import matplotlib.pyplot as plt
true_r = 0.4 # correlation when the pattern is real
lr = 0.01 # how quickly feedback adjusts judgment
rng = np.random.default_rng(98)
real = rng.uniform(size=300) < 0.5
r_obs = []
for is_real in real:
rho = true_r if is_real else 0
x = rng.normal(size=20)
y = rho * x + np.sqrt(1 - rho ** 2) * rng.normal(size=20)
r_obs.append(abs(np.corrcoef(x, y)[0, 1]))
threshold = 0.05 # the learner starts by seeing patterns everywhere
rules = 0.05 # the rules-only learner never adjusts
feedback_ok, rules_ok = [], []
for r, is_real in zip(r_obs, real):
says = r > threshold
feedback_ok.append(says == is_real)
rules_ok.append((r > rules) == is_real)
if says != is_real:
threshold += lr if says else -lr
feedback_ok, rules_ok = np.array(feedback_ok), np.array(rules_ok)
print(f"Accuracy in the last 100 judgments: with feedback "
f"{100 * feedback_ok[200:].mean():.0f}%, rules only "
f"{100 * rules_ok[200:].mean():.0f}% (chance: 50%)")
blocks = np.arange(1, 16)
plt.plot(blocks, feedback_ok.reshape(15, 20).mean(axis=1), "o-",
color="#2166ac", label="Practice with feedback")
plt.plot(blocks, rules_ok.reshape(15, 20).mean(axis=1), "o-",
color="#d6604d", label="Read the rules only")
plt.axhline(0.5, color="black", linestyle="--")
plt.ylim(0, 1)
plt.xlabel("Block of 20 judgments")
plt.ylabel("Accuracy")
plt.legend()
plt.show()Key takeaways
- Statistical skill is learned through practice with feedback, not by memorizing rules.
- Expect it to be hard, and budget time for repetition.
- Teach with many worked analyses and feedback, not just definitions.
Source
- Andrew Gelman, Statistics is like basketball, or knitting (2016).