Skip to main content

The Taxonomy of Confusion

Building and checking models
Advice
Introductory
What to do when you’re stuck.
Published

November 9, 2026

Modified

November 13, 2026

Entry #19 in Andrew Gelman’s Handy Statistical Lexicon. Original discussion: Taxonomy of confusion.

Filed under Building and checking models · Advice · Introductory.

Source check: ✓ The explanation was checked against the source. The taxonomy is Rachel’s, quoted in Gelman’s post.

What it is

The taxonomy is not Gelman’s own. In the post he quotes Rachel, writing about the students in their graduate class in applied statistics, which was based on the Gelman and Hill book. She gave the students what she called a “Taxonomy of Confusion”: the “types of things they might be confused about and what they should do before asking the T.A.”:

  1. Statistics questions that are prerequisite to the course: “get an Intro to Stats book, don’t ask the T.A. unless you really must.”
  2. Statistics questions that are part of the course: “read the book, ask a friend, then ask the T.A.”
  3. “You know what you want statistically but you don’t know the name of the function”: search for it (for example R standard deviation) or write the function yourself, then ask a friend, then the T.A.
  4. “You know the function’s name but you can’t figure out how it works”: read the help page (help(sd)), then ask a friend, then the T.A.
  5. “You wrote code but you get error messages”: debug, by printing things out and breaking the code into smaller steps.
  6. “You wrote code and it doesn’t do what you think it should do but there are no errors”: debug.

Gelman’s whole comment: “This just seemed hilarious to me. Maybe it was the deadpan tone.”

Why it matters

The list is funny because it is so practical. Each kind of confusion has its own first step, and most of those steps don’t need another person. Sorting a problem into the right kind is already half the work. The last two cases are the ones that matter most in statistical computing. An error message at least tells you something is wrong. Code that runs without errors and does the wrong thing is the dangerous case, and it is only caught by checking results against what you expect.

How it works

A toy model of the list’s effect, our own. Each question a student has falls into one of the six kinds. Following the list, the student first tries the self-help step for that kind (a book, a search, a help page, a friend, debugging), which resolves some share of the questions. Only the rest reach the T.A. The share of questions in each kind and how well each self-help step works are assumptions, chosen for illustration.

Simulated example

A semester of 300 student questions. Compare how many reach the T.A. when nobody follows the list and when everybody does.

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, fmt} from "../js/stats.js"

viewof helpScale = Inputs.range([0, 1.5], {value: 1, step: 0.05, label: "How well the self-help steps work (1 = our baseline)"})
viewof seed = Inputs.range([1, 500], {value: 19, step: 1, label: "Random seed"})

kinds = [
  {kind: "1. Prerequisite statistics", share: 0.15, selfHelp: 0.8},
  {kind: "2. Course statistics", share: 0.25, selfHelp: 0.6},
  {kind: "3. Don't know the function's name", share: 0.15, selfHelp: 0.85},
  {kind: "4. Don't know how the function works", share: 0.15, selfHelp: 0.75},
  {kind: "5. Code gives an error", share: 0.18, selfHelp: 0.6},
  {kind: "6. Code runs but is wrong", share: 0.12, selfHelp: 0.35}
]
semester = {
  const r = rng(seed);
  const counts = kinds.map(k => ({...k, asked: 0, reachTA: 0}));
  for (let q = 0; q < 300; q++) {
    let u = r(), i = 0;
    while (i < counts.length - 1 && u > counts[i].share) { u -= counts[i].share; i++; }
    counts[i].asked++;
    if (r() >= Math.min(1, counts[i].selfHelp * helpScale)) counts[i].reachTA++;
  }
  return counts;
}

Plot.plot({
  ariaLabel: "The Taxonomy of Confusion: simulation chart",
  ariaDescription: "Horizontal axis: number of questions. Vertical axis: the six kinds of confusion in Rachel's list. For each kind, a light bar shows all questions and a dark bar shows those that still reach the T.A. after the self-help step. The chart updates with the controls above it, and the summary below the charts states the result in words.",
  height: 280,
  marginLeft: 250,
  x: {label: "Questions in the semester", grid: true},
  y: {label: null, domain: kinds.map(k => k.kind)},
  marks: [
    Plot.barX(semester, {y: "kind", x: "asked", fill: "#2166ac", fillOpacity: 0.25}),
    Plot.barX(semester, {y: "kind", x: "reachTA", fill: "#2166ac"}),
    Plot.ruleX([0])
  ]
})
# The Taxonomy of Confusion: which questions still reach the TA?
1help_scale <- 1 # how well the self-help steps work (1 = baseline)
2set.seed(19)

3kinds <- data.frame(
  kind = c(
    "1. Prerequisite statistics", "2. Course statistics",
    "3. Don't know the function's name",
    "4. Don't know how the function works",
    "5. Code gives an error", "6. Code runs but is wrong"
  ),
  share = c(0.15, 0.25, 0.15, 0.15, 0.18, 0.12),
  self_help = c(0.8, 0.6, 0.85, 0.75, 0.6, 0.35)
)
q <- sample(6, 300, replace = TRUE, prob = kinds$share) # a semester
4solved <- runif(300) < pmin(1, kinds$self_help[q] * help_scale)
kinds$asked <- tabulate(q, 6)
kinds$reach_TA <- tabulate(q[!solved], 6)
print(kinds[, c("kind", "asked", "reach_TA")], row.names = FALSE)
cat(sum(kinds$reach_TA), "of 300 questions reach the TA\n")

par(mar = c(4, 15, 1, 1))
5barplot(t(as.matrix(kinds[6:1, c("reach_TA", "asked")])),
  beside = TRUE,
  horiz = TRUE, las = 1, names.arg = kinds$kind[6:1],
  cex.names = 0.7, col = c("#d6604d", "grey80"),
  xlab = "Questions in a semester"
)
1
The page’s control: how well the self-help steps (the book, a friend) work.
2
Fixes the random numbers so the run is reproducible.
3
Rachel’s six kinds of confusion, with how common each is and how often its self-help step resolves it.
4
Which of a semester’s 300 questions get resolved before they reach the teaching assistant.
5
Questions asked and questions that reach the TA, by kind. The taxonomy routes each kind to the right first step.
# The Taxonomy of Confusion: which questions still reach the TA?
import numpy as np
import matplotlib.pyplot as plt

help_scale = 1  # how well the self-help steps work (1 = baseline)
rng = np.random.default_rng(19)

kinds = ["1. Prerequisite statistics", "2. Course statistics",
         "3. Don't know the function's name",
         "4. Don't know how the function works",
         "5. Code gives an error", "6. Code runs but is wrong"]
share = np.array([0.15, 0.25, 0.15, 0.15, 0.18, 0.12])
self_help = np.array([0.8, 0.6, 0.85, 0.75, 0.6, 0.35])
q = rng.choice(6, 300, p=share)                      # a semester
solved = rng.uniform(size=300) < np.minimum(1, self_help[q] * help_scale)
asked = np.bincount(q, minlength=6)
reach = np.bincount(q[~solved], minlength=6)
for k, a, r in zip(kinds, asked, reach):
    print(f"{k}: {a} asked, {r} reach the TA")
print(f"{reach.sum()} of 300 questions reach the TA")

y = np.arange(6)[::-1]
plt.barh(y + 0.2, asked, 0.4, color="0.8", label="Asked")
plt.barh(y - 0.2, reach, 0.4, color="#d6604d", label="Reach the TA")
plt.yticks(y, kinds)
plt.xlabel("Questions in a semester")
plt.legend()
plt.tight_layout()
plt.show()

Key takeaways

  • The taxonomy is Rachel’s: six kinds of confusion for students in an applied statistics class, each with what to try before asking the T.A.
  • Naming the kind of confusion points to the first thing to try: a book, a search, a help page, a friend, or debugging.
  • The hardest case is code that runs without errors and does the wrong thing. Only checking the results against what you expect will catch it.

Source

Back to top