Benford Law and accounting fraud detection
//////////////////////////////////////
 Benford Law is also called the First-Digit Law which gives different frequencies 
    for 9 first digits from 1 to 9.  Convention wisdom would conclude that each 
    (first) digit would have roughly the same frequency, i.e., 1/9=0.1111=11%.  
    
 However, according to the Benford Law, the lower is the value of a digit, 
    the higher is its probability. In other words, we will see more values 
    with leading digit of 1 than with the leading digit of 2. The probability 
    of each digit is given by the following formula. 

    Prob(d)=log10((d+1)/d)                          (1)

   where Prob() is the probability (frequency), d is the digit, and log10() 
      is the log function with a base of 10. For Excel, log10() is the same as log(). 

    Digit   Formula    probability
    ----    ----        ----
    1     =log10(2/1)   0.301
    2     =log(3/2)     0.176
    3     =log(4/3)     0.125
    4     =log(5/4)     0.097
    5     =log(6/5)     0.079
    6     =log(7/6)     0.067
    7     =log(8/7)     0.058
    8     =log(9/8)     0.051
    9     =log(10/9)    0.046
          ------------  -----
           Total        100%

 Objectives:
     1) understand Benford Law
     2) download about a dozen companies  annual reports
     3) estimate the distributions of the 1st digits
     4) report your results and discuss

 Procedure:
    To download annual financial statements.
       Step 1: go to Yahoo!Finance  http://finance.yahoo.com/  
       Step 2: enter a ticker, such as IBM
       Step 3: find three types of financial statements. 
       Step 4: download those financial statements

   Note 1: the function to get the first digit is =left(cell, 1)
   Note 2: you could use the Excel countif() function. 

 References
    Accounting Web, 20 Ways You Can Detect Fraud, 2014, 
        http://www.accountingweb.com/aa/law-and-enforcement/20-ways-you-can-detect-fraud

    Sharma, Anuj, Prabin Kumar Panigrahi, 2012, A Review of Financial Accounting Fraud 
        Detection based on Data Mining Techniques, INternationla Journal of Computer 
        Aplication 39, 1, https://arxiv.org/ftp/arxiv/papers/1309/1309.3944.pdf

    MCGINTY, JO CRAVEN, 2014, Accountants Increasingly Use Data Analysis to Catch 
        Fraud, Auditors Wield Mathematical  Weapons to Detect Cheating,                 http://www.wsj.com/articles/accountants-increasingly-use-data-analysis-to-catch-fraud-1417804886

    Testing Benford Law, http://testingbenfordslaw.com/

    What is Benford Law,  https://en.wikipedia.org/wiki/Benford%27s_law#cite_note-Nigrini-19

//////////////////////////////////////