Not quite.<div><br></div><div>Random numbers are uniformly distributed, so the first digits of a set of random numbers should all appear equally.</div><div><br></div><div>Benford's Law most often applies to sets of naturally-occurring numbers that are scale-invariant. Consider the lengths of rivers, as Benford did. It doesn't matter whether the rivers are measured in miles or kilometers (scale-invariant). The first digits of the lengths of the rivers will conform to Benford's Law, as long as the set has enough elements.</div>
<div><br></div><div>Auditors use Benford's Law to find anomalous records. Apply Benford's Law to a list of the amounts of all checks written by a company in the last year. If you see too many checks that start with the digits 7, 8, or 9, there is a clear indication of fraud. The embezzler wrote checks that were slightly less than $1000, on the theory that small checks would more likely be ignored. But instead of writing checks for $263 or $347 or $519, he wrote checks for $838 or $922 to maximize his payout.</div>
<div><br></div><div>There was an external audit of the voting results in last year's Iranian elections. The audit clearly showed fraud, as there were far too many precinct tallies that started with the digits 8 or 9.<br>
<br></div><div>There is some considerable theory behind Benford's Law. Google is your friend. Or Shriram is lecturing on Benford's Law today -- perhaps he will share a reference or three.</div><div><br><div class="gmail_quote">
On Fri, Oct 15, 2010 at 6:33 AM, Jos Koot <span dir="ltr"><<a href="mailto:jos.koot@telefonica.net">jos.koot@telefonica.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
<br>
> -----Original Message-----<br>
> From: <a href="mailto:users-bounces@racket-lang.org">users-bounces@racket-lang.org</a><br>
> [mailto:<a href="mailto:users-bounces@racket-lang.org">users-bounces@racket-lang.org</a>] On Behalf Of Chris Stephenson<br>
> Sent: 15 October 2010 11:13<br>
> To: <a href="mailto:users@racket-lang.org">users@racket-lang.org</a><br>
> Subject: Re: [racket] a small programming exercise<br>
><br>
</div><div class="im">snip<br>
><br>
> Think about the decimal numbers in the range 1-200. How many<br>
> start with<br>
> 1?- More than half. The range 1-1000 is an exception. But<br>
<br>
</div>The exceptions are flat distributions of natural numbers in a range from 1<br>
to a power of the base, right?<br>
For example:<br>
(test 1000000 (expt 5 5) 5) -> (250490 249654 249630 250226)<br>
distribution of 1000000 natural numbers in the range 1 to (expt 5 5) and<br>
base 5.<br>
1000000/4=250000<br>
<div><div></div><div class="h5"><br>
> natural distributions are not uniform over a fixed range.<br>
> They are bell curves of one sort or another. If you have a<br>
> natural random distribution there will always be a skew<br>
> toward the smaller digits. It is quantified as Benford's law.<br>
><br>
> --<br>
> Chris Stephenson<br>
> <a href="mailto:cs@cs.bilgi.edu.tr">cs@cs.bilgi.edu.tr</a><br>
> _________________________________________________<br>
> For list-related administrative tasks:<br>
> <a href="http://lists.racket-lang.org/listinfo/users" target="_blank">http://lists.racket-lang.org/listinfo/users</a><br>
<br>
<br>
_________________________________________________<br>
For list-related administrative tasks:<br>
<a href="http://lists.racket-lang.org/listinfo/users" target="_blank">http://lists.racket-lang.org/listinfo/users</a><br>
</div></div></blockquote></div><br></div>