Then what I need to do is use the formula to find the leading digit for each number.
So, for 129.30, the leading digit's 1, for
315.46 the leading digit is 3.
One that I want to show you is down here.
There's a number that's 0.51, we can't have 0 as our leading digit, so
we wanna pull the 5 as the leading digit.
So we got all the leading digits from all these numbers and
then we want to count everything up.
So, I've got a formula where I count up the number of times 1 is the leading
digit, the number of times 2 is the leading digit, then we add that up.
So, there were a 122 leading digits.
We can divide each count by the percent to see that in this example,
1's were the leading digit 31% of the time, 2's 13% of the time and so on.
Then I've got the expected distribution based on Benford's Law.
And what I calculate is what's called the cumulative difference.
So, for number one it's simple, it's just the difference between the actual and
expected distribution for one.
For two, the cumulative differences, I have to add up the distribution for
one and two, and compare that to the expected distribution for one and two, and
I find the difference is 2.6%.
For three, I add up 31%, 13.9%, 20.5%, and compare that to 30.1, 17.6, 12.5 and
they're off by 5 and so forth and so on.
So, the KS statistic is the maximum the difference which would be 5.4,
the cutoff is this formula of 1.36 divided by the square root of 122,
which is the number of items.
We can see that the KS statistic is way below the cut off.
So, we have no concerns in this case that there's
manipulation based on a deviation from Benford's law.
It conforms to Benford's law pretty closely.