HomeFinanceBenford's Law Fraud Detection: Chi-Square, MAD, Limits

Benford’s Law Fraud Detection: Chi-Square, MAD, Limits

Last updated: December 6, 2026 · Data: U.S. Census Bureau county estimates and City of Chicago payments, downloaded 6 December 2026. Thresholds checked against Nigrini’s published bands; legal references as of 6 December 2026. Simulations: DTF calculations (calc.py, fixed seed).

Benford’s law fraud detection compares the leading digits of a set of amounts with the expected pattern log10(1 + 1/d): about 30.1% of values start with 1 and only 4.6% with 9. Large deviations point to invented, duplicated or threshold-dodging numbers, but they are not proof of fraud. The test needs roughly 1,000 or more records that span several orders of magnitude, and it fails on capped, assigned or narrow-range numbers.

chi-square vs MADaudit analyticsapproval limitsPython

We ran a Benford test on every payment the City of Chicago recorded in 2025, all 115,597 of them at $10 or more. The chi-square statistic came out at 1,794. The pass mark at the usual 5% level is 15.5. Read naively, that is a city ledger a hundred times past the alarm line.

The same data, scored with the mean absolute deviation (MAD) test that auditors are taught to prefer, came out as “acceptable conformity”. Which verdict is right? Neither, and the reason is the most useful thing to know before you point Benford’s law at your own ledger. We’ll come back to Chicago once you have the tools.

What is Benford’s law, and why does it hold?

Benford’s law says that in many collections of naturally occurring numbers, the first significant digit d appears with probability P(d) = log10(1 + 1/d). The first-two-digit version works the same way for 10 to 99: P(dd) = log10(1 + 1/dd), so 10 should lead 4.14% of values and 99 only 0.44%.

First digit123456789
Expected share30.1%17.6%12.5%9.7%7.9%6.7%5.8%5.1%4.6%

The astronomer Simon Newcomb spotted it first, in a two-page note in the American Journal of Mathematics in 1881: he noticed “how much faster the first pages [of logarithmic tables] wear out than the last ones”. The physicist Frank Benford rediscovered it in 1938 and backed it with 20,229 observations from 20 lists, from river areas to baseball statistics, which is how his name stuck. There is an irony here for a fraud article: Hill notes that Persi Diaconis and David Freedman later offered “convincing evidence” that Benford manipulated round-off errors to get a better fit.

Why should digits care? One intuition is scale: a law about amounts ought to survive a switch from dollars to euros, and a logarithmic spacing of digits is what survives that. The more satisfying explanation is Theodore Hill’s 1995 theorem in Statistical Science: if you take random samples from many different distributions, mixed in an unbiased way, the significant digits of the combined sample converge to Benford’s distribution. An accounts-payable file is exactly such a mix. Rent, software, catering and construction each have their own scale. One kind of number with a narrow range, such as a monthly rent, is not a mixture and won’t follow the curve. (Zipf’s law is a different thing: it ranks how often items occur, not how digits are distributed.)

Benford’s law in accounting and audit: what it can flag

Mark Nigrini, who did more than anyone to bring the law into forensic accounting, lists the conditions in his 1999 Journal of Accountancy article. Data most likely to conform describe “the sizes of similar phenomena” and have no built-in maximum or minimum. Assigned numbers, like Social Security numbers, zip codes or bank account numbers, will not conform. The usual candidates are vendor payments, invoice lines, expense claims, journal entries and refunds.

The same article tells the case that made the method famous. In State of Arizona v. Wayne James Nelson (1993), a manager in the Arizona State Treasurer’s office was found guilty of trying to defraud the state of nearly $2 million. He had sent 23 checks to a bogus vendor, and his defense was that he was demonstrating the absence of safeguards in a new computer system. Nigrini looked at the digits. “Over 90% have 7, 8 or 9 as a first digit,” he wrote, almost the reverse of Benford. Hold on to one more detail from that case. Most of the amounts were just below $100,000.

A digit test is a screen run over a population. It tells you where to pull documents, never which invoice is fake. Nigrini and Steven Miller (2009) showed digit tests also catch duller problems: botched data downloads, rounded data, numbers produced by statistical procedures. A spike can be fraud, or it can be your export script.

Chi-square or MAD: which should an auditor use?

The short answer: use both, and read each one in light of the number of records. They fail in opposite directions.

The chi-square test sums (observed − expected)² / expected over the nine digits and compares it with a chi-square distribution on 8 degrees of freedom (89 for first-two digits). The critical values at 5% are 15.51 and 112.02. Its weakness, surveyed by Roy Cerqueti and Claudio Lupi in 2022, is “excess power”: with enough records it rejects conformity over deviations too small to matter.

The MAD test is Nigrini’s answer: average the absolute gaps between observed and expected shares. He presents it as “a test that ignores the number of records” (quoted by Cerqueti and Lupi from his 2012 book). The conformity bands, from Nigrini (2012, Table 7.1) and coded the same way in the R package benford.analysis, are:

VerdictFirst digit MADFirst-two digits MAD
Close conformity0.000–0.0060.0000–0.0012
Acceptable conformity0.006–0.0120.0012–0.0018
Marginally acceptable0.012–0.0150.0018–0.0022
Nonconformityabove 0.015above 0.0022

Cerqueti and Lupi point out that these bands rest on Nigrini’s “personal experience and experimentation” rather than on a derived critical value. You can see the problem by drawing random subsamples from Chicago’s 2025 payments: same ledger, different sizes.

Records sampledChi-square rejects (p < 0.05)Median MADMAD of a perfect Benford sample
10012% of draws0.0256 (nonconformity)0.0235
30024%0.0162 (nonconformity)0.0136
1,00083%0.0117 (acceptable)0.0074
3,00099.7%0.00980.0043
30,000100%0.00910.0014

Chi-square’s verdict on one population swings from “fine” to “certain rejection” as n grows. MAD has the mirror flaw: even a perfect Benford sample of 100 records has an expected MAD of about 0.0235, deep in “nonconformity”. Its promise to ignore sample size only holds from a few thousand rows.

Worked example: 2,400 invoices and a $5,000 approval limit

Say you audit 2,400 invoices for a year, and anything from $5,000 up needs a second signature. Someone has slipped in 72 fake invoices (3%), each between $4,500 and $4,999.99. The genuine ones in our simulation follow a lognormal spread with a $900 median. The first-digit test sees this:

DigitObservedExpected (2,400 × P)Chi-square part|Observed − Benford| share
1709722.50.250.0056
2410422.60.380.0053
3276299.91.900.0099
4315232.629.200.0343
5182190.00.340.0033
6174160.71.110.0056
7135139.20.130.0017
8103122.83.180.0082
996109.81.740.0058

Chi-square totals 38.2, far above 15.51 (p ≈ 0.000007), and digit 4 alone contributes 29.2. MAD averages the right-hand column: 0.0089, “acceptable conformity”. The headline MAD would have let this ledger through. Drop to the first two digits and the spikes appear exactly where the fraud is: 47 holds 2.00% of invoices against an expected 0.91%, with 45 and 49 close behind. That test’s MAD lands at 0.00195, “marginally acceptable”, and its chi-square of 156.8 clears the 112.02 bar.

Then the targeted check, possible only if you know the limit: 110 invoices sit between $4,500 and $4,999.99 and 24 between $5,000 and $5,499.99, where the genuine distribution puts about 55% below the line. A one-sided binomial test gives p ≈ 2 × 10−11.

If you see…Then…
Fewer than ~1,000 recordsSkip MAD bands; use chi-square only as a weak screen and test samples of documents instead.
Chi-square rejects, MAD acceptable, n in the tens of thousandsLook at the first-two-digit spikes and the most repeated exact amounts before calling it anything.
Chi-square rejects, MAD acceptable, n of a few thousandTake it seriously: find which digit drives the statistic (here digit 4) and pull those invoices.
Excess just below a known limitRun the window test below vs above the limit, then group by vendor and approver.
Spike on one exact amountAsk what fixed fee, refund or program pays that amount before suspecting anyone.

Does Benford’s law work on invoices below an approval limit?

Partly, and badly at low volumes. We simulated 400 ledgers at each size, with 5% of invoices fabricated just under a $5,000 limit:

Which test catches invoices kept just under an approval limit?Share of 400 simulated ledgers flagged, by ledger size 100 to 10,000. Fraud ledger: 5% of invoices fabricated between $4,500 and $4,999.99 under a $5,000 approval limit. window test below the limit: 34%, 96%, 100%, 100%, 100%; chi-square, first digit: 14%, 41%, 96%, 100%, 100%; MAD > 0.015, fraud ledger: 96%, 77%, 18%, 0%, 0%; MAD > 0.015, clean ledger: 94%, 33%, 0%, 0%, 0%.Which test catches invoices kept just under an approval limit?DecodeTheFuture.orgbenford-law-fraud-detectionChartimage/svg+xml© DecodeTheFuture.orgwindow test below the limitchi-square, first digitMAD > 0.015, fraud ledgerMAD > 0.015, clean ledger0%25%50%75%100%1003001,0003,00010,000invoices in the ledger (log scale)
Share of simulated ledgers flagged. The window test (invoices $4,500–$4,999.99 vs $5,000–$5,499.99) wins at every size. MAD’s high flag rate on small ledgers is mostly false alarms, as the dashed line for clean ledgers shows; chi-square’s false-alarm rate on clean ledgers stayed between 4% and 6%. Source: DTF calculation (calc.py, seed 42).

With 2% fake invoices, the first-digit chi-square caught 21% of 1,000-invoice ledgers and 61% at 3,000. The window test caught 91% and 100%. MAD never crossed into “nonconformity” for any ledger of 1,000 or more at that contamination. At 10%, every test catches it from 1,000 invoices. Benford tests a whole population against a curve; when you know where the incentive sits, testing that spot is far stronger.

Money laundering has the same shape. U.S. banks must report cash transactions of more than $10,000 (31 CFR 1010.311), and 31 U.S.C. 5324 makes it a crime to “structure” transactions to evade that report. Structured cash would pile up just under $10,000: a first-two-digit spike at 95–99 and a window test waiting to happen. Nelson’s checks, sitting mostly just under $100,000, were the same pattern with an extra zero.

How many records do I need for a Benford test?

For a first-digit MAD verdict, plan on at least 1,000 records. For the first-two-digit MAD, about 3,000. Below that the bands misfire on clean data:

Clean recordsMedian first-digit MADLabeled “nonconformity”Chi-square false alarms
500.032499%5%
1000.023491%5%
3000.013435%6%
1,0000.00730.2%6%

The first-two-digit test is hungrier: a perfect Benford sample of 1,000 has an expected MAD of 0.0025, already over the 0.0022 line. Tommie Singleton (ISACA Journal, 2011) recommends 1,000 records or more and calls sets of 500 or fewer transactions unsuitable; our numbers agree. Nelson’s 23 checks were never a statistical test, just a pattern extreme enough to see by eye.

When the test lies: capped, assigned and narrow-range numbers

Here is Chicago again. The first-two-digit view shows where the 1,794 came from:

The six biggest first-two-digit spikes in Chicago’s 2025 paymentsfirst two digits 50: observed 4.45% vs Benford 0.86%, driven by $50 (2,971 payments) and $500 (1,124 payments); first two digits 15: observed 4.00% vs Benford 2.80%, driven by $1,550 (930 payments) and $1,500 (831 payments); first two digits 77: observed 1.40% vs Benford 0.56%, driven by $775 (1,072 payments); first two digits 75: observed 1.27% vs Benford 0.58%, driven by $750 (817 payments); first two digits 25: observed 2.39% vs Benford 1.70%, driven by $250 (525 payments) and $2,500 (180 payments); first two digits 20: observed 2.53% vs Benford 2.12%, driven by $200 (438 payments) and $2,000 (179 payments).The six biggest first-two-digit spikes in Chicago’s 2025 paymentsDecodeTheFuture.orgbenford-law-fraud-detectionChartimage/svg+xml© DecodeTheFuture.orgobserved shareBenford expectedfirst two digits, and the repeated amounts behind each spike0%1%2%3%4%5%50 $50 ×2,971, $500 ×1,1244.5%15 $1,550 ×930, $1,500 ×8314.0%77 $775 ×1,0721.4%75 $750 ×8171.3%25 $250 ×525, $2,500 ×1802.4%20 $200 ×438, $2,000 ×1792.5%
Largest excesses over Benford among first-two digits, City of Chicago payments dated 2025 (115,597 payments of $10 or more). Each spike traces back to one or two exact amounts paid hundreds or thousands of times. Source: DTF calculation on City of Chicago open data, downloaded 6 December 2026.

There were 2,971 payments of exactly $50.00, and 2,913 of them sit in a single voucher-number series. There were 1,072 payments of $775 and 930 of $1,550, almost all in another series. The dataset doesn’t say what these programs are, and we won’t guess. What we can say: the ten most repeated amounts make up 8.88% of payments. Remove them and the first-digit MAD falls from 0.0090 to 0.0047, and the first-two-digit MAD from 0.00221, a hair over the nonconformity line, to 0.00108. Both become “close conformity”. Chi-square still rejects (259.8 on 105,328 records), which by now should not surprise you.

First digits in two real public datasets vs Benford’s lawFirst-digit shares. digit 1: Benford 30.1%, U.S. counties 30.0%, Chicago payments 28.8%; digit 2: Benford 17.6%, U.S. counties 18.8%, Chicago payments 17.2%; digit 3: Benford 12.5%, U.S. counties 12.3%, Chicago payments 11.8%; digit 4: Benford 9.7%, U.S. counties 9.2%, Chicago payments 9.7%; digit 5: Benford 7.9%, U.S. counties 7.8%, Chicago payments 10.8%; digit 6: Benford 6.7%, U.S. counties 6.3%, Chicago payments 6.3%; digit 7: Benford 5.8%, U.S. counties 5.5%, Chicago payments 6.9%; digit 8: Benford 5.1%, U.S. counties 5.2%, Chicago payments 4.5%; digit 9: Benford 4.6%, U.S. counties 4.9%, Chicago payments 3.9%.First digits in two real public datasets vs Benford’s lawDecodeTheFuture.orgbenford-law-fraud-detectionChartimage/svg+xml© DecodeTheFuture.org3,144 U.S. counties115,597 Chicago paymentsBenford’s law, log10(1 + 1/d)0%10%20%30%123456789digit 5: $50, $500first significant digit
First-digit shares in two public datasets. U.S. county populations (Census Bureau, Vintage 2024) fit Benford closely: chi-square 5.75, p = 0.68, MAD 0.0037. Chicago’s 2025 payments overshoot at digit 5 because of repeated $50 and $500 payments. Source: DTF calculation.

County populations are the textbook control, and they still pass: Hill’s 1995 paper cites Nigrini and Wood’s finding that the 1990 populations of 3,141 counties “follow Benford’s Law very closely”, and our rerun on 3,144 counties in 2024 says the same. Then we simulated 5,000 clean records of three kinds that should not conform. All three were flagged:

  • Capped amounts (meal claims up to $75): nothing can start with 8 or 9. MAD 0.052.
  • Narrow range (rents around $1,450): 89% start with 1. MAD 0.132.
  • Assigned numbers (invoice numbers 10001–15000): 100% start with 1. MAD 0.155.

Outside accounting the stakes get political. Rauch and co-authors tested the deficit-related data that EU members reported to Eurostat and found Greece’s deviated most among euro states. Elections went the other way. Joseph Deckert, Mikhail Myagkov and Peter Ordeshook simulated fair and rigged contests and checked real ones, and they found Benford’s “success rate” was “essentially equivalent to a toss of a coin”.

Can fraudsters beat Benford’s law?

Yes, if they know it exists. In our simulation, a fraudster who copied the shape of the genuine ledger triggered the chi-square test about as often as clean data did, around 5% of ledgers at every size. Even naive fakery is weaker than you’d hope. Amounts invented uniformly between $1,000 and $9,999 and rounded to $50 made up 5% of a ledger and were still caught in only 17% of 3,000-invoice ledgers.

And people are not as bad at inventing numbers as the folklore says. Hill’s 1988 study of six-digit numbers that people “guessed” at random found first digit 1 much more often than expected and 8 or 9 much less: partly Benford-like already. Andreas Diekmann had people fabricate regression coefficients and found their first digits also declined smoothly. His paper’s title is the advice: “Not the First Digit!” Later digits gave the fabrications away more clearly. Nelson tried the same thing in his own way: no repeated amounts, no round numbers, cents on every check. He just didn’t know which digits to fake.

Benford’s law in Python and Excel

This function reproduces our Chicago and county numbers exactly (115,597 records, chi-square 1,794.07, MAD 0.00898; 3,144 counties, 5.75 and 0.00365):

import numpy as np
from scipy.stats import chisquare

def benford_test(amounts):
    x = np.asarray(amounts, dtype=float)
    x = x[x >= 10]                         # test values of 10 and above
    first = (x / 10 ** np.floor(np.log10(x))).astype(int)
    n = len(first)
    observed = np.bincount(first, minlength=10)[1:]
    expected = np.log10(1 + 1 / np.arange(1, 10))
    chi2, p = chisquare(observed, n * expected)    # df = 8
    mad = np.abs(observed / n - expected).mean()   # compare with 0.006 / 0.012 / 0.015
    return n, chi2, p, mad

In Excel: expected share =LOG10(1+1/D2) for digits 1–9 in column D, first digit =VALUE(LEFT(INT(A2),1)) for amounts of 10 or more, counts with COUNTIF, and =CHISQ.TEST(observed, expected_counts) for the p-value. MAD is the AVERAGE of the nine absolute share gaps.

Benford’s law for anomaly detection and machine learning

A Benford result belongs to a population, not a transaction. Compute it per vendor, approver or cost center each month, and feed the MAD, chi-square and largest first-two-digit excess into an anomaly model as features; an Isolation Forest will rank unusual digit profiles alongside other signals. Our guide to machine learning for fraud detection shows where such rules sit next to supervised models. Benford is blind to synthetic identity fraud, where the amounts look normal and the fake part is the person. Commercial platforms are covered in our review of AI fraud detection tools.

How we calculated this

Real data: the U.S. Census Bureau’s Vintage 2024 county population file (POPESTIMATE2024, 3,144 counties) and the City of Chicago’s “Payments” dataset (s4vu-giwb), keeping the 116,141 individual payments with a 2025 check date. We dropped 203 zero or negative amounts and 341 below $10, following Nigrini’s convention, which leaves 115,597. Both were downloaded on 6 December 2026; the Chicago file updates daily, so we kept SHA-256 hashes of the exact downloads. Simulations: genuine invoices are lognormal with a $900 median (σ = 1.4 on the log scale), fakes are planted as described in each section, 400 ledgers per cell (1,000 for the clean-sample table), seed 42. Limits: real ledgers are lumpier than a lognormal, real fraudsters are not uniform random number generators, and the window test needs a baseline share below the limit; we used the true simulated distribution, where you would use last year’s ledger. None of this is legal advice.

FAQ

Is Benford’s law evidence accepted in court?

It has been used, but as support for an investigation, not as proof. The ISACA Journal (Singleton, 2011) states it is legally admissible in U.S. criminal cases, and Hill (1995) reports a 1995 Wall Street Journal account of the Brooklyn District Attorney’s office using Nigrini’s tests to charge groups at seven companies. We could not verify a court ruling that rests on a Benford test alone.

What does Benford’s law help detect in fraud?

Invented amounts, amounts pushed under approval or reporting thresholds, duplicated payments and rounding. It points to digit ranges worth examining; the fraud itself is found in the documents.

What is a good MAD score for Benford’s law?

For first digits, below 0.006 is close conformity and above 0.015 is nonconformity (Nigrini, 2012). The bands only behave from about 1,000 records.

Does Benford’s law apply to money laundering?

Yes, mainly through thresholds. U.S. cash transactions above $10,000 must be reported, and structuring deposits to avoid that is a federal crime, so structured deposits would pile up just under $10,000, a spike at 95–99 in a first-two-digit test. A window test just below $10,000 is more direct.

Why doesn’t my data follow Benford’s law?

Usually because it is capped, assigned, narrow in range or dominated by a few fixed amounts. Check the most repeated exact values first; in Chicago’s 2025 payments, ten amounts explained most of the deviation.

Before you run it on your own payables, write down the approval limits and the fixed fees your organization pays. Those are the two places a Benford chart will light up first, and only one of them is interesting.

Sources

  1. Newcomb, S. (1881). Note on the Frequency of Use of the Different Digits in Natural Numbers. American Journal of Mathematics 4(1), 39–40.
  2. Benford, F. (1938). The Law of Anomalous Numbers. Proceedings of the American Philosophical Society 78(4), 551–572 (JSTOR).
  3. Hill, T. P. (1995). A Statistical Derivation of the Significant-Digit Law. Statistical Science 10(4), 354–363.
  4. Hill, T. P. A Statistical Derivation of the Significant-Digit Law, author manuscript (MIT OpenCourseWare, PDF).
  5. Hill, T. P. (1988). Random-Number Guessing and the First Digit Phenomenon. Psychological Reports 62(3), 967–971.
  6. Nigrini, M. J. (1999). I’ve Got Your Number. Journal of Accountancy, May 1999.
  7. Nigrini, M. J. (2012). Benford’s Law: Applications for Forensic Accounting, Auditing, and Fraud Detection. Wiley.
  8. Nigrini, M. J. and Miller, S. J. (2009). Data Diagnostics Using Second-Order Tests of Benford’s Law. Auditing: A Journal of Practice & Theory 28(2), 305–324.
  9. benford.analysis R package source: MAD.conformity bands after Nigrini (2012) (GitHub).
  10. Cerqueti, R. and Lupi, C. (2022). Severe Testing of Benford’s Law. arXiv:2202.05237.
  11. Diekmann, A. (2007). Not the First Digit! Using Benford’s Law to Detect Fraudulent Scientific Data. Journal of Applied Statistics 34(3), 321–329.
  12. Rauch, B., Göttsche, M., Brähler, G. and Engel, S. (2011). Fact and Fiction in EU-Governmental Economic Data. German Economic Review 12(3), 243–255.
  13. Deckert, J., Myagkov, M. and Ordeshook, P. C. (2011). Benford’s Law and the Detection of Election Fraud. Political Analysis 19(3), 245–268.
  14. Singleton, T. W. (2011). Understanding and Applying Benford’s Law. ISACA Journal.
  15. U.S. Census Bureau. County Population Totals: 2020–2024 (Vintage 2024 datasets).
  16. City of Chicago Data Portal. Payments (dataset s4vu-giwb).
  17. 31 CFR § 1010.311, Filing obligations for reports of transactions in currency (Cornell LII).
  18. 31 U.S. Code § 5324, Structuring transactions to evade reporting requirement prohibited (Cornell LII).

Papers, datasets and legal texts checked on 6 December 2026; DOIs resolved at api.crossref.org. Calculations are DTF’s own (calc.py and calc.json, seed 42) on public data downloaded the same day.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -

Most Popular

Recent Comments