Skip to main content

Theoretical and Applied Statisticians, how to tell them apart

Thinking about statistics
Law or aphorism
Intermediate
A theoretical statistician calls the data x, an applied statistician says y.
Published

November 9, 2026

Modified

November 13, 2026

Entry #12 in Andrew Gelman’s Handy Statistical Lexicon. Original discussion: How to tell the diference between a theoretical statistician and an applied statistician.

Filed under Thinking about statistics · Law or aphorism · Intermediate.

Source check: ✓ The explanation was checked against the source.

What it is

Gelman’s original line: “The theoretical statistician uses x, the applied statistician uses y (because we reserve x for predictors).” The joke hides a real difference in emphasis. In theory textbooks, the data are \(x_1, \dots, x_n\), an iid sample from a distribution whose parameters you want to estimate. In applied work, the data are an outcome \(y\) that you want to understand as a function of predictors \(x\). Regression, not the one-sample problem, is the bread and butter of applied statistics.

Why it matters

If you think of data as “x”, the natural questions are about the marginal distribution: its mean, its variance, the efficiency of an estimator. If you think of data as “y given x”, you ask about relationships, about subgroups, and about how to generalize to populations with a different mix of \(x\). Many practical failures come from answering a marginal question when the real question was conditional. A typical case is estimating a population average from a sample whose covariate distribution doesn’t match the target.

How it works

The marginal mean \(\bar{y}\) answers the question for the population you sampled. If the target population has a different distribution of \(x\), the applied move is to model \(\mathrm{E}(y \mid x)\) and average the predictions over the target’s \(x\) distribution:

\[ \hat\mu_{\text{target}} = \frac{1}{N} \sum_{i \in \text{target}} \hat{\mathrm{E}}(y \mid x_i). \]

This is poststratification in miniature, and it is the logic behind Mister P.

Simulated example

A sample over-represents high values of \(x\), and \(y\) rises with \(x\). The “x” analyst reports the sample mean of \(y\). The “y” analyst fits \(y\) on \(x\) and averages predictions over the target population’s covariate distribution.

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

viewof skew = Inputs.range([0, 2], {value: 1, step: 0.1, label: "How over-sampled high-x units are"})
viewof slope = Inputs.range([0, 2], {value: 1, step: 0.1, label: "Slope of y on x"})
viewof seed = Inputs.range([1, 500], {value: 12, step: 1, label: "Random seed"})

xy = {
  const r = rng(seed);
  const target = r.normals(5000, 0, 1);
  const sample = range(300).map(() => {
    const x = r.normal(skew, 1);
    return {x, y: 2 + slope * x + r.normal(0, 1)};
  });
  const f = lm(sample.map(d => d.x), sample.map(d => d.y));
  return {
    sample,
    trueMean: 2,
    xAnalyst: mean(sample.map(d => d.y)),
    yAnalyst: mean(target.map(f.predict)),
    targetX: target.slice(0, 600)
  };
}

Plot.plot({
  ariaLabel: "Theoretical and Applied Statisticians, how to tell them apart: simulation chart",
  ariaDescription: "Horizontal axis: x. Vertical axis: y. The chart updates with the controls above it, and the summary below the charts states the result in words.",
  height: 300,
  x: {label: "x", grid: true},
  y: {label: "y", grid: true},
  marks: [
    Plot.dot(xy.sample, {x: "x", y: "y", r: 2, fill: "#2166ac", fillOpacity: 0.5}),
    Plot.linearRegressionY(xy.sample, {x: "x", y: "y", stroke: "#2166ac"}),
    Plot.tickX(xy.targetX, {x: d => d, y: () => -2.5, stroke: "#d6604d", strokeOpacity: 0.2}),
    Plot.text([0], {x: -3, y: -2.2, text: () => "target population x", textAnchor: "start", fill: "#d6604d"})
  ]
})
# Theoretical and applied statisticians: model y given x, then transfer.
1skew <- 1 # how over-sampled high-x units are
slope <- 1 # slope of y on x
2set.seed(12)

target_x <- rnorm(5000, 0, 1) # the population we care about
3x <- rnorm(300, skew, 1) # the sample over-represents high x
y <- 2 + slope * x + rnorm(300)
4fit <- lm(y ~ x)
cat("True population mean of y: 2\n",
  "Sample mean of y: ", round(mean(y), 2), "\n",
  "Regression, averaged over the population's x: ",
5  round(mean(predict(fit, data.frame(x = target_x))), 2), "\n",
  sep = ""
)

6plot(x, y,
  pch = 19, cex = 0.5, col = "grey50", xlim = c(-4, 4),
  xlab = "x", ylab = "y"
)
abline(fit, col = "#2166ac", lwd = 2)
rug(target_x[1:600], col = "#d6604d")
1
The page’s controls: how over-sampled high-x units are, and the slope of y on x.
2
Fixes the random numbers so the run is reproducible.
3
The sample over-represents high values of x, so its mean of y is wrong for the population.
4
The applied statistician’s move: model y given x.
5
Then average the predictions over the population’s x. This is poststratification in miniature.
6
The sample with the fitted line, and the population’s x distribution as a rug along the bottom.
# Theoretical and applied statisticians: model y given x, then transfer.
import numpy as np
import matplotlib.pyplot as plt

skew = 1   # how over-sampled high-x units are
slope = 1  # slope of y on x
rng = np.random.default_rng(12)

target_x = rng.normal(0, 1, 5000)   # the population we care about
x = rng.normal(skew, 1, 300)        # the sample over-represents high x
y = 2 + slope * x + rng.normal(size=300)
b, a = np.polyfit(x, y, 1)
print("True population mean of y: 2")
print(f"Sample mean of y: {y.mean():.2f}")
print(f"Regression, averaged over the population's x: "
      f"{np.mean(a + b * target_x):.2f}")

plt.scatter(x, y, s=6, color="0.5")
xs = np.array([-4, 4])
plt.plot(xs, a + b * xs, color="#2166ac", linewidth=2)
plt.plot(target_x[:600], np.full(600, y.min() - 0.5), "|", color="#d6604d")
plt.xlabel("x (red ticks: the population)")
plt.ylabel("y")
plt.show()

Key takeaways

  • Applied statistics is mostly about outcomes conditional on predictors, which is regression.
  • Thinking “y given x” makes it natural to generalize to new populations by poststratification.
  • The labels are a joke, but the change in emphasis is real.

Source

Back to top