Problems solved in full
-
Expected count and chi-square contribution for 24 of 200 expense claims 6 steps
An auditor pulls 200 expense claims and finds that 24 of them begin with the digit 1. Is that consistent with Benford's law? Work out the expected count, the contribution to chi-square from that digit alone, and what the whole test would need before you could act.
-
Start with what the law expects. The probability of a leading 1 is log₁₀(1 + 1/1) = log₁₀ 2 = 0.30103, so out of 200 claims the expected count is 0.30103 × 200.
-
That is 60.2 claims. The auditor found 24. The shortfall is 36.2 claims, and it is a shortfall in the digit the law says should be commonest by a wide margin.
-
Chi-square adds one term per digit, each of them (observed − expected)² ÷ expected. For the leading 1 that term is (24 − 60.21)² ÷ 60.21.
-
(−36.21)² is 1,310.9, and dividing by 60.21 gives 21.77. The whole test has eight degrees of freedom and its 5% critical value is 15.507, so this single digit has already pushed the statistic past rejection on its own.
-
Which means the arithmetic is finished and the inference is not. Chi-square grows with the sample: the same proportions in 2,000 claims would give a term ten times larger, and a large honest dataset can fail the test on a deviation nobody would call fraud. That is the reason auditors quote mean absolute deviation instead, which does not grow with n.
-
So the honest reading is that these 200 claims do not have the leading-digit distribution Benford's law predicts. What it is evidence of is a question the digits cannot answer: a company with a £999 approval threshold produces a wall of leading nines for a completely innocent reason, and so does one that reimburses a fixed daily rate.
Answer
Expect 60.2 claims starting with 1; 24 were found; that digit alone contributes 21.77 to a statistic whose 5% critical value is 15.507. The test rejects, and rejecting is not the same as detecting. Benford's law is a screen that tells an auditor where to look, and every published use of it in that role — from Mark Nigrini's tax work in the 1990s onward — treats a failure as a reason to open the file rather than a finding about it. The tool prints mean absolute deviation beside chi-square for exactly this reason: switch to a dataset of 5,000 and watch chi-square climb while the deviation barely moves.
-
-
A chi-square of 0.2, and why that is the suspicious one 6 steps
Load the Fibonacci preset. Chi-square reads 0.2 against a 5% critical value of 15.507, so the sequence passes comfortably. Work out how likely a fit that good is, then decide what a very small chi-square should tell an auditor.
-
Compare the counts first. A thousand Fibonacci numbers put 301 values in the leading-1 bin against the law's 301.03, and the largest disagreement in any of the nine bins is on the digit 7: 56 observed against 57.99 expected. That is not close. It is nearly exact.
-
Chi-square on eight degrees of freedom has a mean of 8 and a standard deviation of 4. The card rounds to 0.2 and the value behind it is 0.1695, which sits two standard deviations below the mean of a statistic that cannot go below zero.
-
The lower tail has a closed form here, because eight degrees of freedom makes the incomplete gamma collapse to four terms. No table is needed.
-
Putting 0.1695 in returns 2.0 × 10⁻⁶. About one sample in half a million fits the law this well. Switch the dataset to the log-uniform sample at the same size, which is the mechanism itself drawn at random, and the card reads 5.6.
-
The explanation is that the Fibonacci numbers were never a sample. log₁₀ Fₖ is k log₁₀ φ minus a constant, so the leading digits are decided by the fractional parts of the multiples of 0.2089876…, and that number is irrational. Weyl proved in 1916 that such a sequence spreads out evenly.
-
It also spreads more evenly than randomness manages. The gaps left by a rotation of this kind shrink like log N over N, while N random draws leave gaps of order 1/√N, and chi-square goes as N times the square of that gap. A thousand deterministic terms therefore beat a thousand random ones by a wide margin, and 0.17 is what the margin looks like.
Answer
About one in 500,000 under any random model, which makes the fit evidence that this data was not sampled at all. A chi-square test asks one question: is the data further from the law than chance allows? It has no way of saying that data is too close, and the verdict line reads the same for 0.17 as it does for 8.
For an auditor that inverts the usual reading. A ledger matching Benford to two decimal places has a problem, and it is the problem R. A. Fisher raised about Mendel's pea data in 1936, where the agreement with theory was closer than sampling could produce. Someone who has read about Benford's law and generates digits from it leaves this signature, and it is easier to see than the fraud the test was built for: honest accounts arrive with the ragged edges of a real sample, and a thousand Fibonacci numbers do not. -
References (3)
- The observation, made fifty-seven years before the law was named after somebody else: S. Newcomb, "Note on the Frequency of Use of the Different Digits in Natural Numbers." American Journal of Mathematics 4 (1881), p. 39.
- Why the law is scale-invariant, which is the property the unit switch on this page tests: T. P. Hill, "A Statistical Derivation of the Significant-Digit Law." Statistical Science 10 (1995).
- The paper the law is named for, and the one that first checked it against real data: F. Benford, "The Law of Anomalous Numbers." Proceedings of the American Philosophical Society 78 (1938), 551-572.