What does Benford's Law and Ledger Audits conclude, in numbers, about “The Counterintuitive Claim: Invented Numbers Are Too Clean, and the Law Wrongs Honest Fixed-Price Shops”?
Answer: Chapter 2 states the counterintuitive claim head on: a naive inventor's first-digit MAD is more than three times that of an honest ledger (0.0415 against 0.0133), honest fixed-price, capped and narrow-range ledgers are all flagged by chi-square at a rate of 1.000, and even small broad honest ledgers are misjudged by the MAD standard at a rate of 0.583.
Scope of the numbers: Its parameters are illustrative; all calculations are generated by its programs; the book is not legal advice and not personalised business advice, and test results are only signals for review. Marked boxes separate published evidence, runnable Python calculations (20 programs), classical sources and the author's hypotheses.
Data table
The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 0.0133, 0.0415
| mean per ledger of 300 entries, 400 ledgers each | |
| signal honest naive savvy | |
| first-digit MAD | 0.0133 0.0415 0.0169 |
| chi-square df 8 | 7.8647 62.3204 11.2375 |
| repeat share | 0.1635 0.0000 0.0000 |
| 0/5 tail share | 0.1986 0.1029 0.1033 |
| doubled digits | 0.1063 0.0562 0.0567 |
| standardized gap d = (fake - honest) / pooled sd | |
| first-digit MAD | 6.40 0.90 |
| chi-square df 8 | 5.13 0.74 |
| repeat share | -11.50 -11.50 |
| 0/5 tail share | -4.84 -4.91 |
| doubled digits | -4.62 -4.46 |
Show the full program
# Chapter 2. p21: invented amounts versus recorded amounts, four signals.
# Honest ledger: integer yuan, lognormal, median 260, log-sd 1.2.
# Naive inventor: first digit 0.6 uniform + 0.4 Benford (between the two,
# as in human guessing studies); 2 to 4 digits; a digit equal to the one
# before it is drawn at half weight; a last digit 0 or 5 at 0.4 weight;
# never writes the same amount twice. Savvy inventor: same habits but
# first digits drawn exactly from Benford. All weights are illustrative.
# 300 entries per ledger, 400 ledgers per type, fixed seed.
import math
import random
P1 = [math.log10(1 + 1 / d) for d in range(1, 10)]
N, REPS = 300, 400
rng = random.Random(20261112)
def honest(n):
return [max(1, round(math.exp(rng.gauss(math.log(260), 1.2))))
for _ in range(n)]
def invent(n, w_benford):
probs = [(1 - w_benford) / 9 + w_benford * p for p in P1]
cum = [math.fsum(probs[:i + 1]) for i in range(9)]
seen, out = set(), []
while len(out) < n:
digits = [rng.choices(range(1, 10), cum_weights=cum)[0]]
size = rng.choices((2, 3, 4), weights=(3, 5, 2))[0]
for i in range(1, size):
w = [1.0] * 10
w[digits[-1]] *= 0.5
if i == size - 1:
w[0] *= 0.4
w[5] *= 0.4
digits.append(rng.choices(range(10), weights=w)[0])
v = int("".join(str(d) for d in digits))
if v not in seen:
seen.add(v)
out.append(v)
return out
def signals(xs):
n = len(xs)
cnt = [0] * 10
for x in xs:
cnt[int(str(x)[0])] += 1
mad = math.fsum(abs(cnt[d] / n - P1[d - 1]) for d in range(1, 10)) / 9
chi = math.fsum((cnt[d] - n * P1[d - 1]) ** 2 / (n * P1[d - 1])
for d in range(1, 10))
dup = (n - len(set(xs))) / n
tail = len([x for x in xs if x >= 10 and x % 5 == 0]) / n
pairs = same = 0
for x in xs:
s = str(x)
for a, b in zip(s, s[1:]):
pairs += 1
same += a == b
return mad, chi, dup, tail, same / pairs
def summary(make):
rows = [signals(make()) for _ in range(REPS)]
cols = list(zip(*rows))
means = [math.fsum(c) / REPS for c in cols]
sds = [math.sqrt(math.fsum((v - m) ** 2 for v in c) / (REPS - 1))
for c, m in zip(cols, means)]
return means, sds
res = {"honest": summary(lambda: honest(N)),
"naive": summary(lambda: invent(N, 0.4)),
"savvy": summary(lambda: invent(N, 1.0))}
names = ("first-digit MAD", "chi-square df 8", "repeat share",
"0/5 tail share", "doubled digits")
print("mean per ledger of %d entries, %d ledgers each" % (N, REPS))
print("%-16s %8s %8s %8s" % ("signal", "honest", "naive", "savvy"))
for i, nm in enumerate(names):
print("%-16s %8.4f %8.4f %8.4f" % (
nm, res["honest"][0][i], res["naive"][0][i], res["savvy"][0][i]))
print("standardized gap d = (fake - honest) / pooled sd")
for i, nm in enumerate(names):
ds = []
for k in ("naive", "savvy"):
sp = math.sqrt((res["honest"][1][i] ** 2 + res[k][1][i] ** 2) / 2)
ds.append((res[k][0][i] - res["honest"][0][i]) / sp)
print("%-16s %8s %8.2f %8.2f" % (nm, "", ds[0], ds[1]))Single source and citation
Fan, Y. (2026). Benford's First-Digit Law, Ledger Fraud Detection and Chi-Square Audits of Buying-Agent Cash Flows and Expense Claims (Version 1.0.0), Chapter 2: The Counterintuitive Claim: Invented Numbers Are Too Clean, and the Law Wrongs Honest Fixed-Price Shops. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 5DL-B-216 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026216,
author = {Fan, Yafu},
title = {Benford's First-Digit Law, Ledger Fraud Detection and Chi-Square Audits of Buying-Agent Cash Flows and Expense Claims},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}Other chapter answers in this book
- Chapter 1 · Where the First-Digit Law Comes From: Uniform Mantissae, Scale Invariance and Multiplicative Chains
- Chapter 3 · The Chi-Square Test: the Critical Value 15.507, the False Alarms of Nine z Tests and Certain Rejection in Large Samples
- Chapter 4 · The Mean Absolute Deviation: the Noise Floor, Nigrini's Bands and the First-Two-Digit Test
- Chapter 5 · The Precondition: How Many Decades, Fixed Prices and the Mixing of Price Points
- Chapter 6 · Beyond the First Digit: Last Digits, Repeated Amounts and Piling Up Below an Approval Limit
- Chapter 7 · Chinese and European Sources Weighed: the Four-Pillar Settlement, Newcomb's Logarithm Tables and Pacioli's Trial Balance
- Chapter 8 · Closing the Loop: Self-Audit of Buying-Agent Flows and Expense Claims, Red-Light Review and a Pre-Registered Plan