February 16, 2020

Explaining Benford’s Law

Filed under: Uncategorized — admin @ 10:57 am

When we look at collections of numbers that emerge from various things, statistical phenomena emerge. Often, they can be used that the original data was really sampled from a “naturally occurring” process, and not “faked”.

Many people have seen the Bell Curve of the Normal Distribution, that shows up when data from many different random variables is averaged together. This distribution shows up even if the random variables come from totally different processes with different statistical distributions, such as grades in a class, or the students’ heights. The Law of Large Numbers explains why this happens.

Other interesting patterns include the Golden Ratio, approximated by the Fibonacci sequence, which have been claimed to appear in many places in nature, although various examples have been disputed. The ratio might show up in spirals due to rotation and scale invariance.

But perhaps more intriguing are two statistical laws that show up in empirical data, and might at first be unexpected. One is Zipf’s Law, which establishes an inverse relationship between the frequency of a symbol and its rank in the frequency table. Thus, the most common word in a language appears 2x as often as the second most common word, 3x as often as the third most common one, and so on. There are some interesting analyses of this from the point of view of Shannon’s and Kolmogorov’s information theories.

Plot of the Zipf CDF for N=10

Benford’s Law

This is the other intriguing law, showing up in all kinds of numbers from stock market prices to baseball statistics. If the numbers are expressed in base 10, or indeed any base, the first digit does not have a uniform distribution. Rather, the digit 1 appears about 30% of the time, 2 appears 16% of the time, while 9 appears 5% of the time. Many people have wondered why this holds true across so many sets of numbers.

For numbers that are generated from scale-invariant processes, such as stock market prices, the law is relatively easy to explain. When you’re at 1000, it takes 100% growth to get to 2000, then then 50%. growth to get to 3000, and so on, until it takes only 10% to get to 10,000. Then, it once again takes 200% to get off the first digit being 1.

But, what’s more interesting is that Benford’s law also often applies when the numbers come from various uniform distribution! That is to say, the real-life process is not scale invariant, but rather, generates values evenly distributed between a and b. Why does the law apply then?

I wanted to write down an easy explanation that occurred to me today. Uniform distributions cannot span the entire number line, because then the total area under the curve would be infinite, violating that P(X) = 1 for the whole set X. Thus, uniform distribution lands between some two numbers a and b

PDF of the uniform probability distribution using the maximum convention at the transition points.

To keep things simple, let’s assume that a = 0, so we have a process that generates some non-negative numbers. It can be either a discrete process (generating whole numbers) or a continuous one (generating arbitrary real numbers in the range). There is some maximum number b that the process can generate, and the sampled results, represented by the random variable X, are evenly distributed between 0 and b.

Using basic Probability, we can calculate the chances of X starting with the digit 5 by summing over all integers N the following:

Σ P(N ≤ b < N+1) • P(first digit of X is 5 | given N ≤ b < N+1)

Now, breaking up the probabilities in this way, we can see why Benford’s law applies even in the case of uniformly distributed results. When b = 499, for instance, it’s true we have an equal chance of getting 10 ≤ X < 20 as we do for 80 ≤ X < 90, so if X consists of two digits (before the decimal point), it’s just as likely to start with a 1 as with an 8. However, for three-digit numbers X, we see that none of the sampled results can start with 5, 6, 7, 8 or 9. There are, in fact, hundreds of three-digit values (before the decimal point) that can result from the process X, ranging from 100 to 499. The range 100…499 is over four times larger than the range 10…100, so given the uniform distribution, X is far more likely to yield values there, with the first digit being between 1 and 4.

Similarly, if N was 399, or 350, you’re far more likely to get a 1, 2, or 3 as the leading digit, due to that larger range 100…N being included. In fact, given any you can even calculate the exact probability of how much more often the leading digit will be 1-4, but in true math teacher fashion, I will leave this as an exercise to the dear reader. The main thing I wanted to convey was the intuition.

Finally, remember that we are summing the probability over all N. Unless N is a power of 10, the first digit of X will simply not be uniformly distributed, since the possible values between N+1 and the next power of 10 are not going to come up in the sampling. Thus, for N = 200, slightly over half as many of our numbers will start with 1 (that is to say, all the numbers 10-20 and 100-200). As N increases to 300, the proportion of numbers starting with 2 starts to increase, until at N = 300 it is equally likely for a number to start with 1 or 2 (but not 3 or higher).

When you sum all of this up, you see that the digit 1 gets a big boost as N goes from 100 to 200, and retains that boost as 2 starts to experience that initial boost, and so on. By the time you get to N = 1000, the digit 1 got 10 of these boosts, while the digit 9 got just one of them. Moreover, each boost a digit finally received had to be shared with the previous digits, so the boost for the digit 1 was about 1/2, while the boost for digits 1 and 2 was evenly split, thus an extra 1/3 for each, etc.

Summing all this up, we see that by the time N reached 1000, the digit 1 was first in roughly the following frequency:

1/10 + 1/2 + 1/3 + 1/4 + 1/5 + 1/6 + 1/7 + 1/8 + 1/9 ≈ 1.92

while the digit 9 was first in toughly the following frequency:

1/10 + 1/9 ≈ 0.2

So we see that if 1 appears roughly 50% of the time, 9 would appear about 5% of the time, 10x less.


  1. Keep up the excellent work, I read few blog posts on this website and I think that your website is real interesting and has got sets of great info.

    Comment by brujos — November 23, 2020 @ 12:13 pm

  2. Can I just say what a relief to uncover someone that genuinely knows what they’re talking about online. You actually realize how to bring a problem to light and make it important. More people need to read this and understand this side of your story. It’s surprising you’re not more popular since you most certainly possess the gift.

    Comment by Rocco Therurer — November 23, 2020 @ 2:10 pm

  3. viagra for men online
    viagra cheap
    generic for viagra

    Comment by buy real viagra online — November 23, 2020 @ 2:41 pm

  4. This is one awesome blog.Thanks Again. Much obliged.

    Comment by ���� �����24 — November 23, 2020 @ 3:03 pm

  5. There is definately a lot to know about this issue. I really like all of the points you have made.

    Comment by Moses Hoyland — November 23, 2020 @ 4:10 pm

  6. Way cool! Some extremely valid points! I appreciate you writing this post and the rest of the site is extremely good.

    Comment by t shirt design maker free — November 23, 2020 @ 5:56 pm

  7. I wanted to thank you for this great read!! I certainly enjoyed every little bit of it. I’ve got you book marked to look at new things you post…

    Comment by Blake Balagtas — November 23, 2020 @ 5:57 pm

  8. that it can easily likewise remedy additional eye mark complications to ensure you can certainly get one

    Comment by check them out — November 23, 2020 @ 7:21 pm

  9. Sweet blog! I found it while surfing around on Yahoo News. Do you have any suggestions on how to get listed in Yahoo News? I ave been trying for a while but I never seem to get there! Thank you

    Comment by Silicone chew toys — November 24, 2020 @ 5:01 am

  10. what is the maximum dosage for viagra viagra interactions types of viagra viagra email splitting viagra

    Comment by us viagra — November 24, 2020 @ 7:32 am

  11. Very nice post. I just stumbled upon your blog and wanted to say that I ave truly enjoyed browsing your blog posts. In any case I all be subscribing to your feed and I hope you write again very soon!

    Comment by tuzla — November 24, 2020 @ 8:04 am

  12. digoxin order

    Comment by JaneDah — November 24, 2020 @ 8:17 am

  13. hydroxychloroquine buy online uk

    Comment by JaneDah — November 24, 2020 @ 8:46 am

  14. Right now it sounds like Expression Engine is the top blogging platform out there right now. (from what I ave read) Is that what you are using on your blog?

    Comment by Tattoo Designs — November 24, 2020 @ 9:49 am

  15. I truly appreciate this blog post.Thanks Again. Will read on

    Comment by Hot Online Game — November 24, 2020 @ 12:52 pm

  16. loan

    Comment by Loan — November 24, 2020 @ 1:09 pm

  17. nala9w Thank you ever so for you blog article.Really looking forward to read more. Want more.

    Comment by washington dc cbd — November 24, 2020 @ 1:14 pm

  18. cialis effective time generic everyday cialis cialis 5mg directions

    Comment by fixcialen — November 24, 2020 @ 1:29 pm

  19. would cialis do women female cialis online many doses cialis

    Comment by fixcialen — November 24, 2020 @ 1:35 pm

  20. tizanidine 40 mg

    Comment by EvaDah — November 24, 2020 @ 2:52 pm

  21. Major thankies for the article post.Thanks Again. Really Cool.

    Comment by trainer empresas — November 24, 2020 @ 4:29 pm

  22. Way cool! Some very valid points! I appreciate you writing this post and also the rest of the website is also really good.

    Comment by stomatologija — November 24, 2020 @ 4:58 pm

  23. Way cool! Some very valid points! I appreciate you penning this article and the rest of the website is extremely good.

    Comment by Ron Pershing — November 24, 2020 @ 6:26 pm

  24. generic viagra australia reviews buy generic viagra paypal cipla viagra

    Comment by FnrdRuize — November 24, 2020 @ 6:26 pm

  25. buy sildenafil india online

    Comment by LisaDah — November 24, 2020 @ 7:48 pm

  26. metlife auto

    Comment by usaa car insurance — November 24, 2020 @ 9:39 pm

  27. I really wanted to write down a word to be able to express gratitude to you for these nice solutions you are sharing on this website. My rather long internet lookup has at the end been paid with good quality knowledge to go over with my contacts. I ‘d say that many of us site visitors are very lucky to live in a useful website with many brilliant individuals with useful solutions. I feel extremely privileged to have come across your webpage and look forward to some more entertaining times reading here. Thanks once more for all the details.

    Comment by supreme clothing — November 25, 2020 @ 1:03 am

  28. car insurance in florida

    Comment by erie auto insurance — November 25, 2020 @ 1:13 am

  29. imuran medication

    Comment by AmyDah — November 25, 2020 @ 1:58 am

  30. schon mal viagra ausprobiert do you need prescription for viagra australia comprar viagra super active

    Comment by FbsbRuize — November 25, 2020 @ 2:12 am

  31. generic flomax online

    Comment by EvaDah — November 25, 2020 @ 2:37 am

  32. sildenafil 100mg generic mexico viagra medicine sildenafil citrate tablets

    Comment by JsweHeand — November 25, 2020 @ 3:01 am

  33. tegretol 200mg price in india

    Comment by KimDah — November 25, 2020 @ 3:46 am

  34. hydroxychloroquine 25 mg

    Comment by JaneDah — November 25, 2020 @ 8:45 am

  35. You are so interesting! I do not think I’ve truly read a single thing like that before. So nice to find somebody with a few genuine thoughts on this issue. Really.. thanks for starting this up. This site is one thing that is required on the web, someone with a bit of originality!

    liquid cialis viagra meme walgreens over the counter viagra

    Comment by RobertEtedo — November 25, 2020 @ 9:13 am

  36. cash now

    Comment by Payday Loan — November 25, 2020 @ 10:38 am

  37. can you buy lithium over the counter

    Comment by KimDah — November 25, 2020 @ 10:58 am

  38. sildenafil 50

    Comment by EvaDah — November 25, 2020 @ 12:28 pm

  39. buy cialis in the uk order cheap cialis online using cialis fun

    Comment by fixcialen — November 25, 2020 @ 1:01 pm

  40. generic cialis information order cialis online generic cialis vs cialis generic

    Comment by fixcialen — November 25, 2020 @ 1:07 pm

  41. I was recommended this website by my cousin. I am not sure whether this post is written by him as no one else know such detailed about my problem. You are wonderful! Thanks!

    Comment by ������ ��� ����� �������� � ����� — November 25, 2020 @ 1:31 pm

  42. Thanks for sharing, this is a fantastic article.Much thanks again. Really Cool.

    Comment by go to store — November 25, 2020 @ 2:30 pm

  43. Thanks for such a good blog. It was what I looked for.

    Comment by visit website — November 25, 2020 @ 3:27 pm

  44. precio viagra farmacias mexico
    generic viagra mastercard accepted
    generic viagra vs brand viagra her zen

    Comment by best online pharmacy for viagra — November 25, 2020 @ 3:33 pm

  45. I value the blog.Really thank you! Will read on

    Comment by for more details — November 25, 2020 @ 4:32 pm

  46. can you buy sildenafil otc price of sildenafil in canada cost of 100mg viagra

    Comment by Kbrglona — November 25, 2020 @ 6:05 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment