Benford's law


Benford's law, also called the Newcomb–Benford law, the law of anomalous numbers, or the first-digit law, is an observation about the frequency distribution of leading digits in many real-life sets of numerical data. The law states that in many naturally occurring collections of numbers, the leading significant digit is likely to be small. For example, in sets that obey the law, the number appears as the leading significant digit about 30% of the time, while appears as the leading significant digit less than 5% of the time. If the digits were distributed uniformly, they would each occur about 11.1% of the time. Benford's law also makes predictions about the distribution of second digits, third digits, digit combinations, and so on.
The graph to the right shows Benford's law for base 10. There is a generalization of the law to numbers expressed in other bases, and also a generalization from leading 1 digit to leading n digits.
It has been shown that this result applies to a wide variety of data sets, including electricity bills, street addresses, stock prices, house prices, population numbers, death rates, lengths of rivers, and physical and mathematical constants. Like other general principles about natural data—for example the fact that many data sets are well approximated by a normal distribution—there are illustrative examples and explanations that cover many of the cases where Benford's law applies, though there are many other cases where Benford's law applies that resist a simple explanation. It tends to be most accurate when values are distributed across multiple orders of magnitude, especially if the process generating the numbers is described by a power law.
The law is named after physicist Frank Benford, who stated it in 1938 in a paper titled "The Law of Anomalous Numbers", although it had been previously stated by Simon Newcomb in 1881.

Definition

A set of numbers is said to satisfy Benford's law if the leading digit occurs with probability
The leading digits in such a set thus have the following distribution:
Relative size of
1-
2-
3-
4-
5-
6-
7-
8-
9-

The quantity is proportional to the space between and on a logarithmic scale. Therefore, this is the distribution expected if the logarithms of the numbers are uniformly and randomly distributed.
For example, a number, constrained to lie between 1 and 10, starts with the digit 1 if, and starts with the digit 9 if. Therefore, starts with the digit 1 if, or starts with 9 if. The interval is much wider than the interval ; therefore if log is uniformly and randomly distributed, it is much more likely to fall into the wider interval than the narrower interval, i.e. more likely to start with 1 than with 9; the probabilities are proportional to the interval widths, giving the equation [|above].
Benford's law is sometimes stated in a stronger form, asserting that the fractional part of the logarithm of data is typically close to uniformly distributed between 0 and 1; from this, the main claim about the distribution of first digits can be derived.

Benford's law in other bases

An extension of Benford's law predicts the distribution of first digits in other bases besides decimal; in fact, any base. The general form is:
For number systems, Benford's law is true but trivial: All binary and unary numbers start with the digit 1.

Example

Examining a list of the heights of the 60 tallest structures in the world by category shows that 1 is by far the most common leading digit, irrespective of the unit of measurement :
Another example is the leading digit of :

History

The discovery of Benford's law goes back to 1881, when the Canadian-American astronomer Simon Newcomb noticed that in logarithm tables the earlier pages were much more worn than the other pages. Newcomb's published result is the first known instance of this observation and includes a distribution on the second digit, as well. Newcomb proposed a law that the probability of a single number N being the first digit of a number was equal to log − log.
The phenomenon was again noted in 1938 by the physicist Frank Benford, who tested it on data from 20 different domains and was credited for it. His data set included the surface areas of 335 rivers, the sizes of 3259 US populations, 104 physical constants, 1800 molecular weights, 5000 entries from a mathematical handbook, 308 numbers contained in an issue of Reader's Digest, the street addresses of the first 342 persons listed in American Men of Science and 418 death rates. The total number of observations used in the paper was 20,229. This discovery was later named after Benford.
In 1995, Ted Hill proved the result about mixed distributions mentioned [|below].

Explanations

Overview

Benford's law tends to apply most accurately to data that span several orders of magnitude. As a rule of thumb, the more orders of magnitude that the data evenly covers, the more accurately Benford's law applies. For instance, one can expect that Benford's law would apply to a list of numbers representing the populations of UK settlements. But if a "settlement" is defined as a village with population between 300 and 999, then Benford's law will not apply.
Consider the probability distributions shown below, referenced to a log scale.
In each case, the total area in red is the relative probability that the first digit is 1, and the total area in blue is the relative probability that the first digit is 8.
For the first distribution, the size of the areas of red and blue are approximately proportional to the widths of each red and blue bar. Therefore, the numbers drawn from this distribution will approximately follow Benford's law. On the other hand, for the second distribution, the ratio of the areas of red and blue is very different from the ratio of the widths of each red and blue bar. Rather, the relative areas of red and blue are determined more by the height of the bars than the widths. Accordingly, the first digits in this distribution do not satisfy Benford's law at all.
Thus, real-world distributions that span several orders of magnitude rather uniformly, are likely to satisfy Benford's law to a very high accuracy. On the other hand, a distribution that is mostly or entirely within one order of magnitude is unlikely to satisfy Benford's law very accurately, or at all. However, it is not a sharp line: As the distribution gets narrower, the discrepancies from Benford's law typically increase gradually.
In terms of conventional probability density dx rather than P d), the equivalent criterion is that Benford's law will be very accurately satisfied when P is approximately proportional to 1/x over several orders-of-magnitude variation in x.
This discussion is not a full explanation of Benford's law, because we have not explained why we so often come across data-sets that, when plotted as a probability distribution of the logarithm of the variable, are relatively uniform over several orders of magnitude.

Multiplicative fluctuations

Many real-world examples of Benford's law arise from multiplicative fluctuations. For example, if a stock price starts at $100, and then each day it gets multiplied by a randomly chosen factor between 0.99 and 1.01, then over an extended period the probability distribution of its price satisfies Benford's law with higher and higher accuracy.
The reason is that the logarithm of the stock price is undergoing a random walk, so over time its probability distribution will get more and more broad and smooth. To be sure of approximate agreement with Benford's law, the distribution has to be approximately invariant when scaled up by any factor up to 10; a lognormally distributed data set with wide dispersion would have this approximate property.
Unlike multiplicative fluctuations, additive fluctuations do not lead to Benford's law: They lead instead to normal probability distributions, which do not satisfy Benford's law. For example, the "number of heartbeats that I experience on a given day" can be written as the sum of many random variables, so this quantity is unlikely to follow Benford's law. By contrast, that hypothetical stock price described above can be written as the product of many random variables, so is likely to follow Benford's law quite well.

Multiple probability distributions

provided an alternative explanation by directing attention to the interrelation between the distribution of the significant digits and the distribution of the observed variable. He showed in a simulation study that long right-tailed distributions of a random variable are compatible with the Newcomb–Benford law, and that for distributions of the ratio of two random variables the fit generally improves. For numbers drawn from certain distributions the Benford's law fails to hold because these variates obey a normal distribution which is known not to satisfy Benford's law, since normal distributions can't span several orders of magnitude and the mantissae of their logarithms will not be uniformly distributed.
However, if one "mixes" numbers from those distributions, for example by taking numbers from newspaper articles, Benford's law reappears. This can also be proven mathematically: if one repeatedly "randomly" chooses a probability distribution and then randomly chooses a number according to that distribution, the resulting list of numbers will obey Benford's law. A similar probabilistic explanation for the appearance of Benford's law in everyday-life numbers has been advanced by showing that it arises naturally when one considers mixtures of uniform distributions.

Scale invariance

If there is a list of lengths, the distribution of first digits of numbers in the list may be generally similar regardless of whether all the lengths are expressed in metres, or yards, or feet, or inches, etc.
This is not always the case. For example, the height of adult humans almost always starts with a 1 or 2 when measured in meters, and almost always starts with 4, 5, 6, or 7 when measured in feet.
But consider a list of lengths that is spread evenly over many orders of magnitude. For example, a list of 1000 lengths mentioned in scientific papers will include the measurements of molecules, bacteria, plants, and galaxies. If one writes all those lengths in meters, or writes them all in feet, it is reasonable to expect that the distribution of first digits should be the same on the two lists.
In these situations, where the distribution of first digits of a data set is scale invariant, the distribution of first digits is always given by Benford's law.
For example, the first digit on this list of lengths should have the same distribution whether the unit of measurement is feet or yards. But there are three feet in a yard, so the probability that the first digit of a length in yards is 1 must be the same as the probability that the first digit of a length in feet is 3, 4, or 5; similarly the probability that the first digit of a length in yards is 2 must be the same as the probability that the first digit of a length in feet is 6, 7, or 8. Applying this to all possible measurement scales gives the logarithmic distribution of Benford's law.

Applications

Accounting fraud detection

In 1972, Hal Varian suggested that the law could be used to detect possible fraud in lists of socio-economic data submitted in support of public planning decisions. Based on the plausible assumption that people who fabricate figures tend to distribute their digits fairly uniformly, a simple comparison of first-digit frequency distribution from the data with the expected distribution according to Benford's law ought to show up any anomalous results.
In the 2016 movie The Accountant, Ben Affleck's character uses Benford's law to expose the theft of funds from a robotics company.
In the Netflix series Ozark, the protagonist Marty Byrde uses Benford's law to analyse a cartel member's financial statements. Several of the statements violate the law which Byrde suggests means that the cartel member is being defrauded.

Legal status

In the United States, evidence based on Benford's law has been admitted in criminal cases at the federal, state, and local levels.

Election data

Benford's law has been invoked as evidence of fraud in the 2009 Iranian elections, and also used to analyze other election results. However, other experts consider Benford's law essentially useless as a statistical indicator of election fraud in general.

Macroeconomic data

Similarly, the macroeconomic data the Greek government reported to the European Union before entering the eurozone was shown to be probably fraudulent using Benford's law, albeit years after the country joined.

Price digit analysis

Benford's law as a benchmark for the investigation of price digits has been successfully introduced into the context of pricing research. The importance of this benchmark for detecting irregularities in prices was first demonstrated in a Europe-wide study which investigated consumer price digits before and after the euro introduction for price adjustments. The introduction of the euro in 2002, with its various exchange rates, distorted existing nominal price patterns while at the same time retaining real prices. While the first digits of nominal prices distributed according to Benford's law, the study showed a clear deviation from this benchmark for the second and third digits in nominal market prices with a clear trend towards psychological pricing after the nominal shock of the euro introduction.

Genome data

The number of open reading frames and their relationship to genome size differs between eukaryotes and prokaryotes with the former showing a log-linear relationship and the latter a linear relationship. Benford's law has been used to test this observation with an excellent fit to the data in both cases.

Scientific fraud detection

A test of regression coefficients in published papers showed agreement with Benford's law. As a comparison group subjects were asked to fabricate statistical estimates. The fabricated results failed to obey Benford's law.

Statistical tests

Although the chi-squared test has been used to test for compliance with Benford's law it has low statistical power when used with small samples.
The Kolmogorov–Smirnov test and the Kuiper test are more powerful when the sample size is small particularly when Stephens's corrective factor is used. These tests may be overly conservative when applied to discrete distributions. Values for the Benford test have been generated by Morrow. The critical values of the test statistics are shown below:
0.100.050.01
Kuiper1.1911.3211.579
Kolmogorov–Smirnov1.0121.1481.420

These critical values provide the minimum test statistic values required to reject the hypothesis of compliance with Benford's law at the given significance levels.
Two alternative tests specific to this law have been published: first, the max statistic is given by
and secondly, the distance statistic is given by
where FSD is the first significant digit and is the sample size. Morrow has determined the critical values for both these statistics, which are shown below:
0.100.050.01
Leemis's m0.8510.9671.212
Cho–Gaines's d1.2121.3301.569

Morrow has also shown that for any random variable X divided by its standard deviation, a value A can be found such that the probability of the distribution of the first significant digit of the random variable A will differ from Benford's law by less than ε > 0. The value of A depends on the value of ε and the distribution of the random variable.
A method of accounting fraud detection based on bootstrapping and regression has been proposed.
If the goal is to conclude agreement with the Benford's law rather than disagreement, then the goodness-of-fit tests mentioned above are inappropriate. In this case the specific tests for equivalence should be applied. An empirical distribution is called equivalent to the Benford's law if a distance between the probability mass functions is sufficiently small. This method of testing with application to Benford's law is described in Ostrovski.

Generalization to digits beyond the first

It is possible to extend the law to digits beyond the first. In particular, for any given number of digits, the probability of encountering a number starting with the string of digits n of that length – discarding leading zeros – is given by:
For example, the probability that a number starts with the digits 3, 1, 4 is, as in the figure on the right. Numbers satisfying this include 3.14159..., 314285.7... and 0.00314465... .
This result can be used to find the probability that a particular digit occurs at a given position within a number. For instance, the probability that a "2" is encountered as the second digit is
And the probability that d is encountered as the n-th digit is
The distribution of the n-th digit, as n increases, rapidly approaches a uniform distribution with 10% for each of the ten digits, as shown below. Four digits is often enough to assume a uniform distribution of 10% as '0' appears 10.0176% of the time in the fourth digit while '9' appears 9.9824% of the time.
Digit0123456789
1st30.1%17.6%12.5%9.7%7.9%6.7%5.8%5.1%4.6%
2nd12.0%11.4%10.9%10.4%10.0%9.7%9.3%9.0%8.8%8.5%
3rd10.2%10.1%10.1%10.1%10.0%10.0%9.9%9.9%9.9%9.8%

Tests with common distributions

Benford's law was empirically tested against the numbers generated by a number of important distributions, including the uniform distribution, the exponential distribution, the half-normal distribution, the right-truncated normal, the normal distribution, the chi-squared distribution and the log-normal distribution. In addition to these the ratio distribution of two uniform distributions, the ratio distribution of two exponential distributions, the ratio distribution of two half-normal distributions, the ratio distribution of two right-truncated normal distributions, the ratio distribution of two chi-square distributions and the log-normal distribution were tested.
The uniform distribution as might be expected does not obey Benford's law. In contrast, the ratio distribution of two uniform distributions is well described by Benford's law. Benford's law also describes the exponential distribution and the ratio distribution of two exponential distributions well. Although the half-normal distribution does not obey Benford's law, the ratio distribution of two half-normal distributions does. Neither the right-truncated normal distribution nor the ratio distribution of two right-truncated normal distributions are well described by Benford's law. This is not surprising as this distribution is weighted towards larger numbers. Neither the normal distribution nor the ratio distribution of two normal distributions obey Benford's law. The fit of chi-squared distribution depends on the degrees of freedom with good agreement with df = 1 and decreasing agreement as the df increases. The F-distribution is fitted well for low degrees of freedom. With increasing dfs the fit decreases but much more slowly than the chi-squared distribution. The fit of the log-normal distribution depends on the mean and the variance of the distribution. The variance has a much greater effect on the fit than does the mean. Larger values of both parameters result in better agreement with the law. The ratio of two log normal distributions is a log normal so this distribution was not examined.
Other distributions that have been examined include the Muth distribution, Gompertz distribution, Weibull distribution, gamma distribution, log-logistic distribution and the exponential power distribution all of which show reasonable agreement with the law. The Gumbel distribution – a density increases with increasing value of the random variable – does not show agreement with this law.

Distributions known to obey Benford's law

Some well-known infinite integer sequences satisfy Benford's law exactly. Among these are the Fibonacci numbers, the factorials, the powers of 2, and the powers of almost any other number.
Likewise, some continuous processes satisfy Benford's law exactly. One is an exponential growth or decay process: If a quantity is exponentially increasing or decreasing in time, then the percentage of time that it has each first digit satisfies Benford's law asymptotically.

Distributions known to disobey Benford's law

The square roots and reciprocals of successive natural numbers do not obey this law. Telephone directories violate Benford's law because the numbers have a mostly fixed length and do not start with the long-distance prefix. Benford's law is violated by the populations of all places with population at least 2500 from five US states according to the 1960 and 1970 censuses, where only 19% began with digit 1 but 20% began with digit 2, for the simple reason that the truncation at 2500 introduces statistical bias. The terminal digits in pathology reports violate Benford's law due to rounding.

Criteria for distributions expected and not expected to obey Benford's law

A number of criteria – applicable particularly to accounting data – have been suggested where Benford's law can be expected to apply and not to apply.
;Distributions that can be expected to obey Benford's law:
;Distributions that would not be expected to obey Benford's law:
Moments of random variables for the digits 1 to 9 following this law have been calculated:
For the first and second digit distribution these values are also known:
A table of the exact probabilities for the joint occurrence of the first two digits according to Benford's law is available, as is the population correlation between the first and second digits:.

General audience