Clarke’s Law
How science behaves
Law or aphorism
Introductory
Any sufficiently crappy research is indistinguishable from fraud.
What it is
A riff on Arthur C. Clarke’s “any sufficiently advanced technology is indistinguishable from magic.” When research is sloppy enough, with errors in data entry, impossible summary statistics, unreproducible analyses and missing records, an outside reader cannot tell it apart from fabrication. Whether the authors intended to deceive matters morally. It doesn’t matter for whether the results can be trusted.
Why it matters
Debates about problematic papers often get stuck on intent: it was an honest mistake, not fraud. Clarke’s law moves attention to the evidence. If the numbers are internally inconsistent, the conclusions are unsupported either way. It also explains why forensic tools built to catch fraud flag so much sloppy work: from the data’s point of view, the two look alike.
How it works
The GRIM test (Brown and Heathers) is a simple forensic check. If \(n\) people answer an integer-valued question, the mean must be a multiple of \(1/n\). A reported mean of 3.48 with \(n = 17\) is impossible, because no integer sum divided by 17 rounds to 3.48. Honest, careful reporting always passes. Fabricated means fail at a high rate. Sloppy reporting, with transcription errors and rounding mistakes, also fails, at a rate that rises with the sloppiness until it matches fraud.
Simulated example
Studies report means of 1–7 Likert items with small samples. Compare the GRIM-inconsistency rate for honest, sloppy and fabricated reporting.
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, pct} from "../js/stats.js"
viewof errorRate = Inputs.range([0, 1], {value: 0.4, step: 0.05, label: "Sloppiness: Pr(a reported mean has an error)"})
viewof seed = Inputs.range([1, 500], {value: 59, step: 1, label: "Random seed"})
grimOK = (mean, n) => {
const k = Math.round(mean * n);
return [k - 1, k, k + 1].some(s => (Math.round(s / n * 100) / 100).toFixed(2) === mean.toFixed(2));
}
grim = {
const r = rng(seed);
const report = type => range(2000).map(() => {
const n = r.int(10, 40);
let sum = 0; for (let i = 0; i < n; i++) sum += r.int(1, 7);
let m = Math.round(sum / n * 100) / 100;
if (type === "Sloppy" && r() < errorRate) m = Math.round((m + (r() < 0.5 ? -1 : 1) * r.int(1, 9) / 100) * 100) / 100;
if (type === "Fabricated") m = Math.round(r.uniform(2, 6) * 100) / 100;
return {type, ok: grimOK(m, n)};
});
return ["Honest", "Sloppy", "Fabricated"].map(t => { const rep = report(t); return {type: t, fail: rep.filter(d => !d.ok).length / rep.length}; });
}
Plot.plot({
ariaLabel: "Clarke's Law: simulation chart",
ariaDescription: "Horizontal axis: Share of reported means that are GRIM-inconsistent. The chart updates with the controls above it, and the summary below the charts states the result in words.",
height: 200,
marginLeft: 90,
x: {label: "Share of reported means that are GRIM-inconsistent", domain: [0, 1], tickFormat: "%", grid: true},
y: {label: null},
marks: [Plot.barX(grim, {y: "type", x: "fail", fill: d => d.type === "Honest" ? "#2166ac" : d.type === "Sloppy" ? "#b8860b" : "#d6604d"})]
})# Clarke's Law: the GRIM test can't tell crappy research from fraud.
1error_rate <- 0.4 # sloppiness: probability a reported mean has an error
2set.seed(59)
r2 <- function(x) round(x, 2)
3grim_ok <- function(m, n) { # can n integers have mean m (to 2 decimals)?
k <- round(m * n)
any(sprintf("%.2f", r2((k - 1):(k + 1) / n)) == sprintf("%.2f", m))
}
4report <- function(type) {
replicate(2000, {
n <- sample(10:40, 1)
m <- r2(mean(sample(1:7, n, replace = TRUE))) # a 1-7 rating scale
if (type == "Sloppy" && runif(1) < error_rate) {
m <- r2(m + sample(c(-1, 1), 1) * sample(1:9, 1) / 100)
}
if (type == "Fabricated") m <- r2(runif(1, 2, 6))
grim_ok(m, n)
})
}
5fail <- sapply(
c("Honest", "Sloppy", "Fabricated"),
function(type) 1 - mean(report(type))
)
print(round(100 * fail)) # GRIM failure rates (%)
6barplot(fail,
col = c("#2166ac", "#b8860b", "#d6604d"), ylim = c(0, 1),
ylab = "Share of means that fail the GRIM test"
)- 1
- The page’s control: how often a sloppy researcher’s reported mean contains an error.
- 2
- Fixes the random numbers so the run is reproducible.
- 3
- The GRIM test: with n integer responses, can any integer total divided by n give the reported mean to two decimals?
- 4
- Two thousand reported means from honest, sloppy or fabricated research. Sloppy means get a small transcription error; fabricated ones are made up.
- 5
- The share of each kind that fails the test.
- 6
- Honest means never fail. Sloppy and fabricated ones both do, and the test cannot tell the two apart: sufficiently crappy research is indistinguishable from fraud.
# Clarke's Law: the GRIM test can't tell crappy research from fraud.
import numpy as np
import matplotlib.pyplot as plt
error_rate = 0.4 # sloppiness: probability a reported mean has an error
rng = np.random.default_rng(59)
def grim_ok(m, n):
"""Can n integers have a mean that rounds to m (2 decimals)?"""
k = round(m * n)
return any(f"{round(s / n, 2):.2f}" == f"{m:.2f}"
for s in (k - 1, k, k + 1))
def report(kind):
ok = []
for _ in range(2000):
n = int(rng.integers(10, 41))
m = round(rng.integers(1, 8, n).mean(), 2) # a 1-7 rating scale
if kind == "Sloppy" and rng.uniform() < error_rate:
m = round(m + rng.choice([-1, 1]) * rng.integers(1, 10) / 100, 2)
if kind == "Fabricated":
m = round(rng.uniform(2, 6), 2)
ok.append(grim_ok(m, n))
return np.mean(ok)
kinds = ["Honest", "Sloppy", "Fabricated"]
fail = [1 - report(k) for k in kinds]
for k, f in zip(kinds, fail):
print(f"{k}: {100 * f:.0f}% fail the GRIM test")
plt.bar(kinds, fail, color=["#2166ac", "#b8860b", "#d6604d"])
plt.ylim(0, 1)
plt.ylabel("Share of means that fail the GRIM test")
plt.show()Key takeaways
- Whether a result is reliable doesn’t depend on intent. Sloppy and fraudulent work are both untrustworthy.
- Simple consistency checks (GRIM, SPRITE, recomputing test statistics) catch both.
- Defend results with clean, shareable data, not with assurances of good intentions.
Source
- Andrew Gelman, Clarke’s Law: Any sufficiently crappy research is indistinguishable from fraud (2016).
- Brown and Heathers, “The GRIM test”, Social Psychological and Personality Science (2017).