A Python program that loads numerical data from the dataset provided, records the frequency of occurrence of the first digits and the first two digits, compares these to Benford’s law using the chisquare test, and presents the comparison in both tabular and graphical form.
1. Benford’s first digit law
2. Benford’s first two digit law
benford.csv
-
First Digit Benford's law
MAD value : 0.004499874210189271 Chi Square test p value : 0.9999999999996592
-
First Two Digit Benford's law
MAD value : 0.0014317365523687318 Chi Square test p value : 1.0