Skip to main content

Probability

Thinking about statistics
Principle or heuristic
Introductory
A mathematical concept with no single correct foundation.
Published

November 9, 2026

Modified

November 13, 2026

Entry #113 in Andrew Gelman’s Handy Statistical Lexicon. Original discussion: What is probability?

Filed under Thinking about statistics · Principle or heuristic · Introductory.

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

What it is

Probability is a mathematical object, a measure that satisfies Kolmogorov’s axioms, that can be interpreted in several ways. It can be a long-run frequency, a degree of belief, a propensity of a physical system, a betting rate or a symmetry argument. Gelman’s view is that none of these is the single correct foundation. Each is useful in some settings and strained in others. Practitioners use whichever interpretation fits the problem, often several in one analysis.

Why it matters

Wars over the “true meaning” of probability, frequentist against subjectivist, generate more heat than light. In practice, a forecast’s probability is checked by its frequency calibration, a prior is justified by a mix of belief and past frequencies, and a coin’s 50% comes from symmetry. Insisting on one foundation means either distorting problems to fit it or refusing to use useful tools.

How it works

Different routes to the same number:

  • Frequency: flip a coin many times, and the running proportion of heads settles toward \(p\).
  • Bayesian belief: start with a prior on \(p\), update after each flip, and the posterior concentrates on the same value.
  • Symmetry: before any flips, physical symmetry suggests \(p = 0.5\).

In well-behaved problems they agree. They come apart in one-off events, in small samples and when the model is wrong. That is where the choice of interpretation matters.

Simulated example

Flip a biased coin. Watch the frequentist running proportion and a Bayesian posterior (uniform Beta(1, 1) prior) converge on the same number by different routes.

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 p = Inputs.range([0.05, 0.95], {value: 0.3, step: 0.05, label: "True probability of heads"})
viewof flips = Inputs.range([10, 1000], {value: 200, step: 10, label: "Number of flips"})
viewof seed = Inputs.range([1, 500], {value: 10, step: 1, label: "Random seed"})

coin = {
  const r = rng(seed);
  let heads = 0;
  return range(flips).map(i => {
    heads += r.bernoulli(p);
    const n = i + 1, a = 1 + heads, b = 1 + n - heads;
    const mean = a / (a + b), sdv = Math.sqrt(a * b / ((a + b) ** 2 * (a + b + 1)));
    return {n, freq: heads / n, post: mean, lo: Math.max(0, mean - 1.645 * sdv), hi: Math.min(1, mean + 1.645 * sdv)};
  });
}

Plot.plot({
  ariaLabel: "Probability: simulation chart",
  ariaDescription: "Horizontal axis: Number of flips. Vertical axis: Probability of heads. The chart updates with the controls above it, and the summary below the charts states the result in words.",
  height: 300,
  x: {label: "Number of flips", type: "log"},
  y: {label: "Probability of heads", domain: [0, 1], grid: true},
  color: {legend: true, domain: ["Running frequency", "Bayesian posterior mean (90% band)"], range: ["#d6604d", "#2166ac"]},
  marks: [
    Plot.areaY(coin, {x: "n", y1: "lo", y2: "hi", fill: "#2166ac", fillOpacity: 0.15}),
    Plot.line(coin, {x: "n", y: "freq", stroke: () => "Running frequency", strokeWidth: 1.5}),
    Plot.line(coin, {x: "n", y: "post", stroke: () => "Bayesian posterior mean (90% band)", strokeWidth: 2}),
    Plot.ruleY([p], {stroke: "currentColor", strokeDasharray: "4 3"}),
    Plot.ruleY([0.5], {stroke: "#8a8a8a", strokeDasharray: "1 3"})
  ]
})
# Probability: a long-run frequency, and a degree of belief that learns.
1p <- 0.3 # true probability of heads
flips <- 200 # number of flips
2set.seed(10)

3heads <- cumsum(rbinom(flips, 1, p))
n <- 1:flips
a <- 1 + heads
b <- 1 + n - heads # Beta posterior, uniform prior
4post <- a / (a + b)
sdv <- sqrt(a * b / ((a + b)^2 * (a + b + 1)))
lo <- pmax(0, post - 1.645 * sdv)
hi <- pmin(1, post + 1.645 * sdv)
cat("After ", flips, " flips: frequency ", round(heads[flips] / flips, 3),
  ", 90% interval ", round(lo[flips], 2), " to ", round(hi[flips], 2),
  "\n",
  sep = ""
)

5plot(n, heads / n,
  type = "l", col = "grey50", ylim = c(0, 1),
  xlab = "Flips", ylab = "Probability of heads"
)
polygon(c(n, rev(n)), c(lo, rev(hi)),
  col = adjustcolor("#2166ac", 0.2),
  border = NA
)
lines(n, post, col = "#2166ac", lwd = 2)
abline(h = p, lty = 2)
1
The page’s controls: the coin’s true probability of heads and the number of flips.
2
Fixes the random numbers so the run is reproducible.
3
The running count of heads: the long-run frequency view.
4
The posterior mean under a uniform prior: the degree-of-belief view, which learns from the same flips.
5
Frequency and posterior with its 90% band, converging on the truth from different directions.
# Probability: a long-run frequency, and a degree of belief that learns.
import numpy as np
import matplotlib.pyplot as plt

p = 0.3      # true probability of heads
flips = 200  # number of flips
rng = np.random.default_rng(10)

heads = np.cumsum(rng.binomial(1, p, flips))
n = np.arange(1, flips + 1)
a, b = 1 + heads, 1 + n - heads           # Beta posterior, uniform prior
post = a / (a + b)
sdv = np.sqrt(a * b / ((a + b) ** 2 * (a + b + 1)))
lo, hi = np.maximum(0, post - 1.645 * sdv), np.minimum(1, post + 1.645 * sdv)
print(f"After {flips} flips: frequency {heads[-1] / flips:.3f}, "
      f"90% interval {lo[-1]:.2f} to {hi[-1]:.2f}")

plt.plot(n, heads / n, color="0.5", label="Running frequency")
plt.fill_between(n, lo, hi, color="#2166ac", alpha=0.2)
plt.plot(n, post, color="#2166ac", linewidth=2, label="Posterior mean")
plt.axhline(p, color="black", linestyle="--")
plt.ylim(0, 1)
plt.xlabel("Flips")
plt.ylabel("Probability of heads")
plt.legend()
plt.show()

Key takeaways

  • Probability is a mathematical tool with several valid interpretations.
  • Frequency, belief and symmetry often agree, and their disagreements are informative.
  • Choose the interpretation that fits the problem, and check calibration whatever you choose.

Source

Back to top