Discovering Data
  • Home
  • Blog

Benford's Law

11/5/2016

0 Comments

 
According to Wikipedia:

Benford's law, also called the first-digit law, is an observation about the frequency distribution of leading digits in many real-life sets of numerical data. Graphically:
Picture
To test this I used a dataset containing country populations of all countries. The distribution of first digits is:

1    72
2    36
5    32
3    30
4    16
7    14
8    13
6    13
9    12

Plotting this data gives:
Picture
It is very close to the theoretical graph bove. Benford's law is admissible in US courts and has been used to show that financial data submitted by the Greek government to the EU was probably false.

How does it work? Think about what happens when you double numbers:

start with: 1,2,3,4,5,6,7,8,9
then double: 2,4,6,8,10,12,14,16,18
then again: 4,8,12,16,20,24,28,32,36
and son on, If you count up the first digits: 1:8, 2:5, 3:3, 4:2, 5:1 ..... ones are more common than twos etc. The same conclusion is reached if you just write down the numbers 1,2,3,4,....and continue until you are too bored to go on, then count the number of ones, two, threes....

The code used to generate the above graphic is in my code blog.
0 Comments



Leave a Reply.

    Archives

    June 2018
    December 2017
    August 2017
    July 2017
    June 2017
    May 2017
    April 2017
    March 2017
    February 2017
    January 2017
    December 2016
    November 2016
    October 2016
    September 2016
    August 2016
    July 2016
    June 2016

    RSS Feed

Proudly powered by Weebly
  • Home
  • Blog