by EGreg · 6y ago · 0 comments
So the probability that the number starts with a 5 (in decimal representation) is sort of like the probability of the sum over all N of:
(Maximum > N) (Number starts with 5 given that Maximum is N)
The thing is that when N is anything less than 9,999 etc. the second probability IS NOT 1/10. It is skewed towards the lower numbers due to the most significant digit being less than 9 more frequently!!!
So this is the real explanation. And I just came up with it on the spot while writing this. Yay!
Hehe
Look at: https://news.ycombinator.com/item?id=22340018 from elsewhere in this thread or https://news.ycombinator.com/item?id=21541264 of mine from a couple of months ago.
http://magarshak.com/blog/?p=318
Your script only tests samples which are from ranges where the max is a power of 10.
I’m sorry to tell you this, but you inadvertently misled people with that empirical test. This just goes to show that we have to check our assumptions, as scientists or mathematicians trying to prove a statement. (Even with empirical tests :)
Hopefully this message will fix that at least for those people that are reading this thread! The rest will be confused. But that’s what happens in science all the time.
PS: I edited the original Wikipedia page with the explanation :)
But let us accept your very limited range for a moment and go along with it. Then you say that the numbers in this range follow Benford's law. But clearly, it doesn't. None of the probabilities in this range obey the probabilities in Benford's law.
Someone needs to revert the dubious edit (https://en.wikipedia.org/w/index.php?title=Benford%27s_law&d...) you have made in Wikipedia.
It is trivial to see that literally any range with min = 0 and max = any number other than a power of 10 makes it LESS likely that a 9 will come up as the first digit. For example the range 0-300 has 1 and 2 come up as the first digit way more than the rest. Don’t you think the same is true of 0-30000 and 0-300000000000000000000000? The size of the range doesn’t make your assertion any more true, that for large ranges every leading digit begins to have an equal chance of appearing.
My point is that, given a uniform distribution from 0 to a max, it has to have a max somewhere. If we assume that max itself is uniformly distributed then we derive the proportions you find in Benford’s law.
Look to put it another way, Benford’s law comes from the numbers which are the same number of digits as the max. The rest are evenly distributed but those numbers are the most numerous at that point and they contribute the phenomenon. Ok?
Are you convinced?
PS: There has got to be someone who figured this out before 2020. Come on. Someone post a link to this derivation.
I wrote: > The leading digits of a uniform distribution does not follow Benford's law.
And @EGreg wrote: > I’m sorry to tell you this, but you inadvertently misled people with that empirical test. This just goes to show that we have to check our assumptions, as scientists or mathematicians trying to prove a statement. (Even with empirical tests :)
So, what specific range of the uniform distribution yields leading digits that follows Benford's law?