The purpose of this project is to verify whether a given data set follows the distribution of Benford's Law
Benford's Law is an observation about the frequency distribution of the leading digits of a number from a table of physical constants or statistical data where the probability of digit 1
to occur is about 30.1% rather than 10% as one might expects if all digits were equally likely.
This implies that a number in a statistical data or a table of physical constants is more likely to begin with smaller digit than larger ones.
This project consists of only one Java class called Benford
that contains the Main()
method and five additional methods that work together to determine whether the data in the dataset follows Benford's Law.
The dataset to be analyzed named data.txt
is located in the same directory as Benford.java
source code.
For more information about the class methods and fields, please go to the Wiki section of this project.
One of the best visualization effort for this law can be found at Testing Benford's Law