Tools › Finance and Business › Auditing › Benford's Law Test › Example

Benford's law, first digit: 1,200 made-up amounts whose first digits are equally frequent

ToolBenford's Law Test
Sourceoriginal
LevelUndergraduate

Problem

Someone writes down 1,200 amounts that look random: two to five digits before the decimal point, every leading digit as likely as any other. Test the first digit against Benford's law at the 5 % level.

Inputs to Enter

  • Amounts: 1,200 seeded illustrative amounts (one per line); smallest amount 10
  • Test in full: first digit; significance level 5 %; no approval limit
Open the Benford's Law Test tool

Answers

  • Benford proportion of the first digit 1 = log10(1 + 1/1) = 0.3010; expected count = 1,200 × 0.3010 = 361.2; observed 144, or 0.1200
  • z of digit 1 = 13.64 standard errors below the law; first digit 9 occurs 145 times (12.1 %) where the law puts 4.6 %
  • First digit: chi-square 485.96 on 8 degrees of freedom, p < 0.0001; mean absolute deviation 0.05601; 6 of 9 digits beyond ±1.96
  • First two digits: chi-square 600.74 on 89 degrees of freedom; 40 of 90 pairs beyond ±1.96

Notes

Open this case in the tool: /analysis-tools/business/audit/benfords-law-test/?try=made-up-numbers. Seeded illustrative data; checked against an independent numpy and scipy computation. Uniformly distributed random numbers do not follow Benford's law (Hill, 1995; Lesperance and others, 2016), so the gap shows how the numbers were generated and nothing else.

More Examples for This Tool