## More on Benford’s Law

In connection with an earlier post on Benford’s Law, i.e. the probability that the first digit of a random variable X is$1\le k\le 9$is approximately$\log\{(k+1)/k\}$—you can easily check that the sum of those probabilities is 1—, I want to signal a recent entry on Terry Tiao’s impressive blog. Terry points out that Benford’s Law is the Haar measure in that setting, but he also highlights a very peculiar absorbing property which is that, if$X$follows Benford’s Law, then$XY$also follows Benford’s Law for any random variable$Y$that is independent from$X$… Now, the funny thing is that, if you take a normal sample$x_1,\ldots,x_n$and check whether or not Benford’s Law applies to this sample, it does not. But if you take a second normal sample$y_1,\ldots,y_n$and consider the product sample$x_1\times y_1,\ldots,x_n\times y_n$, then Benford’s Law applies almost exactly. If you repeat the process one more time, it is difficult to spot the difference. Here is the [rudimentary—there must be a more elegant way to get the first significant digit!] R code to check this:

x=abs(rnorm(10^6))
b=trunc(log10(x)) -(log(x)<0)
plot(hist(trunc(x/10^b),breaks=(0:9)+.5)$den,log10((2:10)/(1:9)), xlab="Frequency",ylab="Benford's Law",pch=19,col="steelblue") abline(a=0,b=1,col="tomato",lwd=2) x=abs(rnorm(10^6)*x) b=trunc(log10(x)) -(log(x)<0) points(hist(trunc(x/10^b),breaks=(0:9)+.5,plot=F)$den,log10((2:10)/(1:9)),
pch=19,col="steelblue2")
x=abs(rnorm(10^6)*x)
b=trunc(log10(x)) -(log(x)<0)
points(hist(trunc(x/10^b),breaks=(0:9)+.5,plot=F)\$den,log10((2:10)/(1:9)),
pch=19,col="steelblue3")

Even better, if you change rnorm to another generator like rcauchy or rexp at any of the three stages, the same pattern occurs.

### 3 Responses to “More on Benford’s Law”

1. […] uninformative interview with Le Monde, Xavier Gabaix focused on the Zipf laws (connected with the Benford law I mentioned a while ago about the Iranian […]

2. […] probability introduction] Feller’s Introduction to Probability Theory (volume 2) gets Benford’s Law “wrong”. While my interest in Benford’s Law is rather superficial, I find the […]

3. […] evidenced by the analyses of the Iranian election. Christian Robert, in his wonderful blog, has an entry describing a fascinating property of Benford’s law. In some ways it calls into question the […]