Leustad / Benfords-law

Experimenting with Benford's Law. This experimentation doesn't determine any fraud, it simply finds out if the data set exhibits Benford's Law - Python only

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Benford's Law

Benford's law, also called the Newcomb–Benford law, the law of anomalous numbers, or the first-digit law, is an observation about the frequency distribution of leading digits in many real-life sets of numerical data.

For More information: https://en.wikipedia.org/wiki/Benford%27s_law

To run

Simply place your numbers in a txt file inside the source folder, one number per line and call main()

After activating your virtual environment
$ pip install -r requirements.txt
$ python main.py

Results will be saved at output folder as .jgp format.

Left some examples in the source and output directories

Some Usage examples of Benford's Law

Benford’s Law can recognize the probabilities of highly likely or highly unlikely frequencies of numbers in a data set. The probabilities are based on mathematical logarithms of the occurrence of digits in randomly generated numbers in large data sets. Those who are not aware of this theory and intentionally manipulate numbers (e.g., in a fraud) are susceptible to getting caught by the application of Benford’s Law. The IT auditor can also apply Benford’s Law in tests of controls and other IT-related tests of data sets. However, the IT auditor needs to remember to make sure that the constraints (mathematical assumptions of the theory) are compatible with the data set to be tested *

*https://www.isaca.org/

About

Experimenting with Benford's Law. This experimentation doesn't determine any fraud, it simply finds out if the data set exhibits Benford's Law - Python only


Languages

Language:Python 100.0%