# An illustration of Benford's Law

*Benford's law*, also known as the *Newcomb-Benford law* or the *first digit law*,
states that in sets of numbers from many real-life sources of data,
the first digits follow a logarithmic distribution.
More specifically,
the probability that the first digit is \(n\) is given by
$$\log_{10}\left( 1 + \frac{1}{n} \right).$$
Such distributions can arise for different reasons,
including exponential growth processes, or as properties of finite sets of rational numbers representing results of physical measurements.

Here we focus on exponential growth.
In the application below,
you can define a sequence of numbers by giving initial value(s) and a rule.
The diagram on the left shows the distribution of first digits in the sequence.
The Benford distribution is shown in the background.
The diagram on the right shows a plot of the sequence.
The dark areas correspond to numbers starting with 1.

Click *Run* to see the distribution
of first digits evolve.
Observe how, as the exponential curve gets steeper and steeper,
it spends more time in lower first-digit areas than in higher first-digit areas,
at any order of magnitude.

Some sequences to try:

- Simple exponential growth: \(f(0)=1, f(n)=f(n-1) * 1.1\)
- Fibonacci numbers: \(f(0)=0, f(1)=1, f(n)=f(n-1)+f(n-2)\)
- Linear growth: \(f(0)=0, f(n)=f(n-1) + 1\)

Linearly growing sequences don't follow Benford's law,
but lower first digits are still more probable than higher first digits "most of the time".
This explains why lower first digits can also be more frequent in data like
street numbers.
## Try it out!

First-digit distribution

50%

100%

1

2

3

4

5

6

7

8

9

Author: Arnaud Fietzke

Last modified: February 21, 2011