World's Leading Assignment Library
ITECH1400 - Programming
Benford’s law, also known as Benford-Newcomb’s law is a law of anomalous numbers. It is about the pattern followed by the distributions of leading digits in numbers. The law states that the frequency distribution of the leading digits follows the following formula:
The values we get after applying the formula on all the digits are plotted below:
Figure 1: Predicted Benford's law frequencies
Our goal is to investigate the application of this law in two data set, specifically in the Fibonacci series and the length of rivers in the world.
The Fibonacci series begins with two numbers 1 and 1 and these two numbers are added to continue the series giving rise to an interesting series.
In order to implement and test the law we used Microsoft Excel and Python. With these tools we can easily generate the Fibonacci series up to any numbers. First we used Excel to generate the Fibonacci series up to 24 terms and we calculated the frequency of the leading digits. Then Chi-square test for goodness of fit is used to test the law. Then we repeated the same for the first 50 terms of Fibonacci series. We also recreated this study using Python. In order to implement this in python the following pseudocode is used.
- Generate the Firs