Data analytics in auditing
Data analytics lets auditors test every transaction instead of a small sample. Simple techniques, such as Benford's law, duplicate checks and journal entry tests, find the unusual entries that deserve a closer look.
What it is
Traditional audits test samples. With today's data tools, auditors can run tests on the full population of transactions. Common tests:
- Benford's law: in many real-world data sets, the first digit 1 appears about 30% of the time and 9 only about 5%. Made-up numbers often don't follow this pattern.
- Duplicates: the same invoice number, amount and supplier paid twice.
- Approval limits: many payments just below the amount that needs a manager's approval.
- Journal entry testing: entries posted at weekends or night, by unusual users, with round amounts, or straight into revenue at year end.
- Three-way match: every payment matched to an order and a goods receipt.
The output is a list of exceptions to investigate, not proof of fraud.
The intuition
Benford's law sounds like magic but has a simple cause. Numbers that grow by percentages, like prices, populations or invoice amounts, spend longer between 1 and 2 than between 9 and 10. Going from 100 to 200 needs a 100% rise, from 900 to 1,000 only 11%. So more numbers start with 1.
People inventing numbers tend to spread first digits evenly. That difference can show up in the data.
The math
Where
- \(P(d)\)
- The expected share of numbers starting with digit d
- \(\hat p_d\)
- The observed share in the data
- \(\text{MAD}\)
- Mean absolute deviation between observed and expected shares
In words: Compare the observed first-digit shares with Benford's expected shares. A large average gap means the data deserves a closer look.
An example
An auditor tests 10,000 supplier invoices.
| Test | Finding | Next step |
|---|---|---|
| Benford, first digit 4 | 15% observed vs. 9.7% expected | Look at invoices starting with 4 |
| Approval limit $10,000 | Many invoices between $9,800 and $9,999 | Check whether purchases were split to avoid approval |
| Duplicates | 12 pairs with the same supplier, amount and date | Confirm with the suppliers |
In Python
A Benford test on simulated invoice amounts, and a duplicate check. Real audits run the same code on the full ledger.
import numpy as np import pandas as pd def benford_test(amounts): first = pd.Series(amounts).abs().astype(str).str.lstrip("0.").str[0] first = first[first.str.isdigit() & (first != "0")].astype(int) observed = first.value_counts(normalize=True).reindex(range(1, 10), fill_value=0) expected = pd.Series(np.log10(1 + 1 / np.arange(1, 10)), index=range(1, 10)) return pd.DataFrame({"observed": observed, "expected": expected}).round(3) rng = np.random.default_rng(1) amounts = rng.lognormal(mean=7, sigma=1.5, size=10_000) # invoice-like amounts print(benford_test(amounts)) invoices = pd.DataFrame({"supplier": ["A", "B", "A"], "amount": [500, 750, 500], "date": ["2026-03-01", "2026-03-02", "2026-03-01"]}) print(invoices[invoices.duplicated(keep=False)]) # possible double payments
Think about it
A Benford test on 50,000 expense claims shows far too many amounts that start with 4. What could explain it, and what would you do next?
Show a model answer
An innocent explanation: a common item that costs $40 to $49, such as a standard taxi fare or a daily allowance. A worrying one: an approval limit at $50, so people split claims or set them just below the limit. Next, list the claims that start with 4, look at who submitted them and for what, and compare with the policy limits. A Benford deviation is a lead, not a conclusion.
Reading the result
Analytics finds where to look. People still have to look.
Good signs
- Testing the full population, not just a sample
- Combining several tests, since each catches different things
- Following up every exception and recording the explanation
Watch out
- Using Benford's law on numbers that don't fit it: prices in a narrow band, assigned numbers, or small data sets
- Treating an exception as proof of fraud
- Drowning in false positives because thresholds are too tight
Remember
- Full-population testing beats sampling when the data is available.
- Benford's law: about 30% of first digits are 1.
- Exceptions are leads, not conclusions.
Check yourself
Question 1 of 2Under Benford's law, which first digit is most common?
About 30% of numbers start with 1, falling to under 5% for 9.
Question 2 of 2For which data is Benford's law a poor test?
Numbers in a narrow band can't spread across first digits, so they won't follow Benford's pattern even when nothing is wrong.
Read more
- Mark J. Nigrini, Benford's Law: Applications for Forensic Accounting, Auditing, and Fraud Detection
- Arens, Elder & Beasley, Auditing and Assurance Services: chapters on audit sampling and audit evidence
Spotted a mistake or have a wish?
Tell us in a line or two. The page name is sent along automatically.