= Benford law from logarithmic uniformity
{c}
{title2=$\mathbb P(D=i)=\log_{10}(1+1/i)$}
For a positive <random variable> $X$, write its base-ten <logarithm> as an <integer> part plus a <fractional part>:
$$
K=\lfloor\log_{10}X\rfloor,\qquad Z=\{\log_{10}X\}=\log_{10}X-K\in[0,1),\qquad X=10^K10^Z.
$$
The <floor function> handles values below one as well: for $X=0.0042$, $K=-3$ and the <decimal significand> is $10^Z=4.2$. Since $10^Z\in[1,10)$, the first nonzero decimal digit is $D=\lfloor10^Z\rfloor$. The monotonicity of the <logarithm> gives the exact event equivalence
$$
D=d\quad\Longleftrightarrow\quad d\leq10^Z<d+1\quad\Longleftrightarrow\quad\log_{10}d\leq Z<\log_{10}(d+1).
$$
If $Z$ has the <uniform distribution> on $[0,1)$, the <probability> of this interval is its length. Consequently $\mathbb P(D=d)=\log_{10}(d+1)-\log_{10}d$, proving the <Benford law>. This argument assumes uniformity of the <fractional part> of the <logarithm>, rather than uniformity of $X$ itself. See the logarithmic-coordinate explanation in https://pdodds.w3.uvm.edu/pocs/docs/2025-2026pocsverse-benfordslaw-freeze-dried.pdf[Peter Sheridan Dodds, Benford's Law, essential story].
\Image[/benford-logarithmic-mantissa.png]
{title=Leading-digit intervals have unequal lengths in the fractional logarithm and equal lengths in the original number}
An exact constructed example is the <log-uniform distribution> on $[1,10)$, with <probability density function> $f_X(x)=1/(x\ln10)$ there and zero elsewhere. Its total mass is $\int_1^{10}dx/(x\ln10)=1$. The <change of variables formula> with $x=10^z$ gives $f_Z(z)=f_X(10^z)(\ln10)10^z=1$ for $0\leq z<1$. Equivalently, integrating directly gives
$$
\mathbb P(D=d)=\int_d^{d+1}\frac{dx}{x\ln10}=\frac{\ln(d+1)-\ln d}{\ln10}=\log_{10}\!\left(\frac{d+1}{d}\right).
$$
For example, the <probability> of first digit four is $\log_{10}(5/4)\approx0.096910013$. By contrast, an ordinary <uniform distribution> for $X$ on $[1,10)$ has <probability density function> $1/9$ there, so $\mathbb P(D=d)=\int_d^{d+1}dx/9=1/9$ for every digit. This is a concrete counterexample to any claim that the <Benford law> holds for every positive <random variable>.
More generally, a <log-uniform distribution> on $[A,B)$ with $0<A<B$ has uniform $Y=\log_{10}X$ on $[\log_{10}A,\log_{10}B)$. If its logarithmic span $\log_{10}(B/A)=m$ is a positive <integer>, reduction to the <fractional part> wraps an interval of length $m$ around the unit interval exactly $m$ times, making $Z$ uniform even when $A$ is not a power of ten. Arbitrary partial-decade truncations generally do not have this property: for a <log-uniform distribution> on $[1,2)$, the first digit is always one.
Under the uniform fractional-logarithm assumption, multiplication by any constant $c>0$ replaces $Z$ by $Z'=\{Z+\log_{10}c\}$. This is a rotation modulo one, which preserves the <uniform distribution> and therefore preserves the <Benford law>; see <scale invariance of decimal significands>. For the constructed $[1,10)$ example, multiplying by $0.001$ gives a <log-uniform distribution> on $[0.001,0.01)$ with the same digit <probabilities>. The claim concerns the <decimal significand> law: there is no proper <probability density function> proportional to $1/x$ over all of $(0,\infty)$, since its integral diverges. The existing <scale-invariant prior> describes that unnormalizable measure, while a finite <log-uniform distribution> is normalizable.
Back to article page