rleeap / Benfords-Law

Benford's Law states that for large data sets, the most common leading digit of the data points is most likely 1. This app takes in a CSV file of numerical data and determines if it reflects this phenomenon.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Benfords-Law

Benford's Law states that for certain large datasets, the most common leading digit of any data point is 1. This app takes in a CSV file of numerical data and determines if it reflects this phenomenon. Visit https://en.wikipedia.org/wiki/Benford%27s_law for more info.

How to Run The Program

Compile the Java file named BenfordsLaw.java with the following command: javac BenfordsLaw.java

Then when prompted, enter the CSV file of your choice. Unfortunately there is no extensive handling of different formats of the CSV file, so make sure that each data value is separated by a new line, with no extra characters.

The repository includes a CSV file called uscities2.csv that serves as an example of a data set that does reflect Benford's Law.

About

Benford's Law states that for large data sets, the most common leading digit of the data points is most likely 1. This app takes in a CSV file of numerical data and determines if it reflects this phenomenon.


Languages

Language:Java 100.0%