Benford's Law Explained: Fraud Detection & the First-Digit Rule — Vatsal Bakshi<br>Vatsal Bakshi Engineer · Apple
On this page
← Writing<br>What is the probability that a number, picked at random from the real world, begins with the digit 1?
The instinctive answer is one in nine — roughly 11%. There are nine non-zero digits. If they are equally likely, each gets an equal share. This is the classical probability argument, and it feels airtight.
It is wrong. Spectacularly, verifiably, universally wrong.
In almost any large dataset drawn from the real world — populations of cities, lengths of rivers, prices, earthquake depths, company revenues — the leading digit is not uniformly distributed. The digit 1 appears as the first digit about 30% of the time. Not 11%. Nearly three times the naive expectation. The digit 9 appears less than 5% of the time. And this is not some quirk of one particular dataset or one particular unit of measurement. It holds for river lengths measured in miles and in kilometres. It holds for populations counted in 1938 and in 2022. It holds for stock prices, for the surface areas of lakes, for the distances between stars. The same curve, over and over, in data that has no business agreeing with each other.
It gets stranger. The law applies to the Fibonacci sequence — a string of integers generated by pure arithmetic with no connection to the physical world. It applies to powers of 2. It applies to the constants of physics. There is something almost unreasonable about it: a single logarithmic formula that describes the leading digit of almost every number humanity has ever measured, counted, or computed.
This is Benford’s Law. The classical probability intuition fails because real-world numbers do not come from a uniform distribution over the digits — they come from processes that span many orders of magnitude, and on a logarithmic scale, the space between 1 and 2 is much larger than the space between 8 and 9.
In this post<br>1See it live — the Fibonacci sequence demonstrates the law in real time<br>2Origins — from worn logarithm tables to 20,000 data points<br>3The mathematics — the formula, and why scale invariance explains it<br>4Applications — fraud detection, real-world cases, and popular culture<br>5The dataset explorer — testing the law ourselves across eight real datasets<br>6Verify it yourself — raw data, collection scripts, and replication instructions
See it live
0 Fibonacci numbers streamed
replay
The histogram is filling in from the Fibonacci sequence in real time. Watch where the bars settle: digit 1 claims about 30% of the total, digit 9 barely registers. The dashed curve is the theoretical prediction. The data follows it almost exactly.
That this holds for a pure mathematical sequence — with no real-world data involved — is the first hint that something deeper than empirical coincidence is going on.
Origins
The law has an unusual history — discovered twice, named after the second discoverer, and eventually proven rigorously only sixty years after the first observation.
1881. Simon Newcomb, a Canadian-American astronomer and mathematician, notices something odd about his book of logarithm tables. The first pages — covering numbers beginning with 1 — are noticeably more worn and soiled than the later pages. People are looking up numbers starting with 1 far more often than numbers starting with 9. He publishes a short paper in the American Journal of Mathematics titled “Note on the Frequency of Use of the Different Digits in Natural Numbers.” In it he states the probability rule:
“The law of probability of the occurrence of numbers is such that the mantissae of their logarithms are equally probable.”
This is the insight. On a logarithmic scale, the space between 1.0 and 2.0 is the same size as the space between 4.0 and 8.0. So a uniformly distributed random variable on the log scale produces exactly this first-digit distribution. Newcomb’s paper is essentially ignored.
1938. Frank Benford, a physicist at General Electric, independently notices the same phenomenon in logarithm tables and runs a systematic study. He collects 20,229 data points spanning 20 different categories: river surface areas, population counts, physical constants, street addresses, molecular weights, newspaper front pages. In category after category, the leading-digit distribution matches the same curve. He publishes “The Law of Anomalous Numbers” in the Proceedings of the American Philosophical Society. The law takes his name — despite Newcomb’s priority by 57 years.
1995. Theodore Hill proves the result rigorously. He shows that if you repeatedly sample from a variety of different distributions and pool the results, the aggregate first-digit distribution converges to Benford’s Law. This “random samples from random distributions” theorem explains why the law applies so broadly: real-world datasets are mixtures of many different underlying processes, and that mixture converges to Benford regardless of the...