Skip to main content

The Foxhole Fallacy

Thinking about statistics
Fallacy
Introductory
There are no X’s in foxholes (where X = people who disagree with me on some issue of faith).
Published

November 9, 2026

Modified

November 13, 2026

Entry #30 in Andrew Gelman’s Handy Statistical Lexicon. Original discussion: No Bayesians in foxholes.

Filed under Thinking about statistics · Fallacy · Introductory.

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

What it is

“There are no atheists in foxholes” claims that under real pressure, everyone comes around to belief. The foxhole fallacy is the general form of the argument: when it really matters, everybody does it my way. In statistics, the version is “there are no Bayesians in foxholes.” Gelman’s post responds to Leo Breiman’s 1997 article “No Bayesians in foxholes”, which argued that “when big, real, tough problems need to be solved, there are no Bayesians.” Gelman’s counterexample was his own toxicology paper in the Journal of the American Statistical Association (1996): a model with 90 parameters, and a prior that was needed “in order to get reasonable results”. His wider point is “how our attitudes toward methods are so strongly shaped by our direct experiences”. He welcomes the more pluralistic attitude he saw spreading in statistics.

Why it matters

The claim is unfalsifiable as usually stated. Anyone who doesn’t convert under pressure wasn’t in a “real” foxhole. It also rests on anecdote, and on anecdotes filtered by the arguer’s own side. People remember the dramatic conversion toward their view and forget the quiet cases going the other way. It replaces evidence about what works under pressure with a story about who is serious.

How it works

A toy model of the evidence behind a foxhole claim. Under pressure, some practitioners switch methods, in both directions, at similar rates. The arguer observes switches through a biased memory: switches toward their view are noticed with high probability and switches away with low probability. Their “evidence” shows a one-way stampede even when the true net flow is zero.

Simulated example

There are 1,000 practitioners in high-pressure situations. Set the true switching rates in each direction and how selective the arguer’s memory is.

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

viewof toMine = Inputs.range([0, 0.2], {value: 0.05, step: 0.01, label: "True rate of switching TO my method"})
viewof fromMine = Inputs.range([0, 0.2], {value: 0.05, step: 0.01, label: "True rate of switching AWAY"})
viewof memoryBias = Inputs.range([0, 1], {value: 0.8, step: 0.05, label: "Memory selectivity"})
viewof seed = Inputs.range([1, 500], {value: 30, step: 1, label: "Random seed"})

foxhole = {
  const r = rng(seed);
  let toT = 0, fromT = 0, toR = 0, fromR = 0;
  for (let i = 0; i < 1000; i++) {
    const usesMine = i < 500;
    if (!usesMine && r() < toMine) { toT++; if (r() < 0.5 + memoryBias / 2) toR++; }
    if (usesMine && r() < fromMine) { fromT++; if (r() < 0.5 - memoryBias / 2) fromR++; }
  }
  return [
    {what: "Actually happened", dir: "Switched to my side", n: toT},
    {what: "Actually happened", dir: "Switched away", n: fromT},
    {what: "What I remember", dir: "Switched to my side", n: toR},
    {what: "What I remember", dir: "Switched away", n: fromR}
  ];
}

Plot.plot({
  ariaLabel: "The Foxhole Fallacy: simulation chart",
  ariaDescription: "Horizontal axis: Number of practitioners. The chart updates with the controls above it, and the summary below the charts states the result in words.",
  height: 220,
  marginLeft: 120,
  fy: {label: null},
  x: {label: "Number of practitioners", grid: true},
  y: {label: null},
  color: {legend: true, range: ["#2166ac", "#d6604d"]},
  marks: [Plot.barX(foxhole, {fy: "what", y: "dir", x: "n", fill: "dir"}), Plot.ruleX([0])]
})
# The Foxhole Fallacy: selective memory turns two-way traffic one-way.
1to_mine <- 0.05 # true rate of switching to my method
from_mine <- 0.05 # true rate of switching away
memory_bias <- 0.8 # memory selectivity
2set.seed(30)

# 500 practitioners use my method and 500 don't
3to <- runif(500) < to_mine
away <- runif(500) < from_mine
4to_remembered <- to & runif(500) < 0.5 + memory_bias / 2
away_remembered <- away & runif(500) < 0.5 - memory_bias / 2

counts <- rbind(
  "Actually happened" = c(sum(to), sum(away)),
  "What I remember" = c(
    sum(to_remembered),
    sum(away_remembered)
  )
)
colnames(counts) <- c("Switched to my side", "Switched away")
print(counts)

5barplot(t(counts),
  beside = TRUE, col = c("#2166ac", "#d6604d"),
  ylab = "Practitioners", legend.text = TRUE,
  args.legend = list(bty = "n")
)
1
The page’s controls: the true rates of switching to and away from my method, and how selective my memory is.
2
Fixes the random numbers so the run is reproducible.
3
What actually happens: equal traffic in both directions.
4
What I remember: conversions to my side stick, defections fade.
5
Actual against remembered counts. Selective memory turns two-way traffic into a one-way street.
# The Foxhole Fallacy: selective memory turns two-way traffic one-way.
import numpy as np
import matplotlib.pyplot as plt

to_mine = 0.05     # true rate of switching to my method
from_mine = 0.05   # true rate of switching away
memory_bias = 0.8  # memory selectivity
rng = np.random.default_rng(30)

# 500 practitioners use my method and 500 don't
to = rng.uniform(size=500) < to_mine
away = rng.uniform(size=500) < from_mine
to_remembered = to & (rng.uniform(size=500) < 0.5 + memory_bias / 2)
away_remembered = away & (rng.uniform(size=500) < 0.5 - memory_bias / 2)

print(f"Actually happened: {to.sum()} switched to my side, "
      f"{away.sum()} switched away")
print(f"What I remember: {to_remembered.sum()} switched to my side, "
      f"{away_remembered.sum()} switched away")

x = np.arange(2)
plt.bar(x - 0.2, [to.sum(), to_remembered.sum()], 0.4, color="#2166ac",
        label="Switched to my side")
plt.bar(x + 0.2, [away.sum(), away_remembered.sum()], 0.4, color="#d6604d",
        label="Switched away")
plt.xticks(x, ["Actually happened", "What I remember"])
plt.ylabel("Practitioners")
plt.legend()
plt.show()

Key takeaways

  • Everyone agrees with me when it really counts is a rhetorical move, not evidence.
  • Anecdotes about conversions are filtered by who is telling them.
  • To judge methods under pressure, look at outcomes, not testimonials.

Source

Back to top