a Python program that loads numerical data, records the frequency of occurrence of the first digits, compares these to Benford’s law using the chisquare goodnessoffit test, and presents the comparison in both tabular and graphical form.
A Python program that loads numerical data, reports the frequency of leading first digits and presents the comparison in both tabular and graphical form.
This is still a working project, with its final goal being an independent website into which anybody can input a correctly formatted csv and receive back a full Benford analysis.
Code written by me: Charles Beach
Also view this project on kaggle, where you can fork the notebook and directly edit it Kaggle: https://www.kaggle.com/a100186/aup-990
Live Website: https://beachc15.github.io/Benford_Analysis_AUP990/#/
With research credit to:
- Association of Certified Fraud Examiners; "Using Benford's Law to Detect Fraud." https://www.acfe.com/uploadedFiles/Shared_Content/Products/Self-Study_CPE/UsingBenfordsLaw_2018_final_extract.pdf
- Theodore P. Hill, "The Significant-Digit Phenomenon", The American Mathematical Monthly, Vol. 102, No. 4, (Apr., 1995), pp. 322–327. https://digitalcommons.calpoly.edu/cgi/viewcontent.cgi?referer=&httpsredir=1&article=1041&context=rgp_rsr
- Formann, A. K. (2010). Morris, Richard James (ed.). "The Newcomb–Benford Law in Its Relation to Some Common Distributions". PLoS ONE. 5 (5): e10541. https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0010541
- Nigrini, M. J. (2012) Benford's Law. Hoboken, NJ: John Wiley & Sons.
- Goodman, William (2016) "The promises and pitfalls of Benford's law" The Royal Statistical Society. https://rss.onlinelibrary.wiley.com/doi/full/10.1111/j.1740-9713.2016.00919.x