What does Benford's Law and Ledger Audits conclude, in numbers, about “The Precondition: How Many Decades, Fixed Prices and the Mixing of Price Points”?
Answer: Chapter 5 turns the precondition into a measurable gate: a worst-case MAD below 0.015 needs a span of 1.57 decades, and no single amount may take a tenth of the rows.
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.015, 1.57
| honest shape | span | MAD | worst |
|---|---|---|---|
| lognormal s=0.3 | 0.61 | 0.0961 | 0.1056 |
| lognormal s=0.5 | 1.01 | 0.0460 | 0.0559 |
| lognormal s=0.7 | 1.41 | 0.0187 | 0.0228 |
| lognormal s=0.9 | 1.82 | 0.0057 | 0.0069 |
| lognormal s=1.0 | 2.02 | 0.0028 | 0.0034 |
| lognormal s=1.2 | 2.42 | 0.0005 | 0.0007 |
| lognormal s=1.5 | 3.03 | 0.0000 | 0.0000 |
| uniform 15 to 80 | 0.71 | 0.0763 | - |
| uniform 100 to 1000 | 0.96 | 0.0597 | - |
| uniform 1 to 10000 | 1.99 | 0.0597 | - |
| meals, cap 200 | 0.52 | 0.1142 | - |
| worst-case MAD below 0.015 needs s >= 0.776, span 1.57 decades | |||
| worst-case MAD below 0.006 needs s >= 0.921, span 1.86 decades |
Show the full program
# Chapter 5. p51: the precondition, measured as spread over decades.
# Exact first-digit shares (no sampling) for honest data of known shape:
# lognormal with log-sd s (median 260; worst case over the median also
# shown), uniform ranges, and a capped lognormal. Span = log10(P99/P1),
# the number of decades holding the central 98 percent of amounts.
# MAD here is the population value: what an infinitely long honest
# ledger of that shape would show. Shapes are illustrative.
import math
P1 = [math.log10(1 + 1 / d) for d in range(1, 10)]
Z99 = 2.3263478740
def phi(z):
return 0.5 * (1 + math.erf(z / math.sqrt(2)))
def lognormal_cdf(x, mu, s):
return phi((math.log(x) - mu) / s) if x > 0 else 0.0
def digits_from_cdf(cdf):
return [math.fsum(cdf((d + 1) * 10 ** k) - cdf(d * 10 ** k)
for k in range(-6, 12)) for d in range(1, 10)]
def mad(q):
return math.fsum(abs(a - b) for a, b in zip(q, P1)) / 9
def worst_mad(s):
return max(mad(digits_from_cdf(
lambda x, m=math.log(100) + i * math.log(10) / 50:
lognormal_cdf(x, m, s))) for i in range(50))
print("%-22s %7s %8s %8s" % ("honest shape", "span", "MAD", "worst"))
for s in (0.3, 0.5, 0.7, 0.9, 1.0, 1.2, 1.5):
q = digits_from_cdf(lambda x: lognormal_cdf(x, math.log(260), s))
span = 2 * Z99 * s / math.log(10)
print("%-22s %7.2f %8.4f %8.4f" % (
"lognormal s=%.1f" % s, span, mad(q), worst_mad(s)))
for lo, hi in ((15, 80), (100, 1000), (1, 10000)):
q = digits_from_cdf(lambda x: min(max((x - lo) / (hi - lo), 0.0), 1.0))
span = math.log10((lo + 0.99 * (hi - lo)) / (lo + 0.01 * (hi - lo)))
print("%-22s %7.2f %8.4f %8s" % (
"uniform %d to %d" % (lo, hi), span, mad(q), "-"))
mu, s, cap = math.log(120), 0.3, 200.0
q = digits_from_cdf(
lambda x: 1.0 if x >= cap else lognormal_cdf(x, mu, s))
p01 = math.exp(mu - Z99 * s)
p99 = min(cap, math.exp(mu + Z99 * s))
print("%-22s %7.2f %8.4f %8s" % (
"meals, cap 200", math.log10(p99 / p01), mad(q), "-"))
for target in (0.015, 0.006):
lo, hi = 0.3, 2.0
for _ in range(60):
mid = (lo + hi) / 2
if worst_mad(mid) > target:
lo = mid
else:
hi = mid
print("worst-case MAD below %.3f needs s >= %.3f, span %.2f decades"
% (target, hi, 2 * Z99 * hi / math.log(10)))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 5: The Precondition: How Many Decades, Fixed Prices and the Mixing of Price Points. 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 2 · The Counterintuitive Claim: Invented Numbers Are Too Clean, and the Law Wrongs Honest Fixed-Price Shops
- 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 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