Skip to content

Python Implementation of first and first two-digit Benford's law.

Notifications You must be signed in to change notification settings

AyanPahari/Benford-s-Law-Implementation-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Benford's Law Implementation(Python)

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.

Implementation:

1. Benford’s first digit law
2. Benford’s first two digit law

Dataset

benford.csv

Results

  • 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
    

Screenshots(First digit Benford)

Output Screenshot

Output Screenshot

Screenshots(First two digit Benford)

Output Screenshot

Output Screenshot

About

Python Implementation of first and first two-digit Benford's law.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages