Randomness, binary numbers and floating-point arithmetic meet Mr. Benford


 
Suppose you’re looking for sources of random numbers. You choose numbers from a newspaper. How random will the numbers be? Answer: not very. This surprising result is called Benford’s Law. This law says that real-world numbers (measurements, populations, stock prices and so forth) are distributed logarithmically. More specifically, the leading digit of a given real-world value is 1 about 30% of the time (instead of 10% of the time, as you might expect), and leading digit is 9 less than than 5% of the time (again, not the expected 10%).
 
There are many fascinating things about Benford’s Law. For instance, even though the law was discovered in the late 1800s, it was only proven only 10 years ago. More interestingly, the IRS uses Benford’s Law to detect fraudulent tax returns.
 
Eric Lippert makes the case in his blog that Benford’s Law means that binary numbers are actually the best way the do accurate floating-point math calculations on real-world numbers.
 
I find the intersection between mathematics and the real-world to be absolutely fascinating.
 
Advertisements
This entry was posted in Game Programming. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s