<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>统计思维 on LeoDreamer</title>
        <link>https://LeoDreamer2004.github.io/categories/%E7%BB%9F%E8%AE%A1%E6%80%9D%E7%BB%B4/</link>
        <description>Recent content in 统计思维 on LeoDreamer</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>zh-cn</language>
        <lastBuildDate>Wed, 11 Mar 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://LeoDreamer2004.github.io/categories/%E7%BB%9F%E8%AE%A1%E6%80%9D%E7%BB%B4/index.xml" rel="self" type="application/rss+xml" /><item>
            <title>统计思维(3) —— Benford 定律</title>
            <link>https://LeoDreamer2004.github.io/p/statistical-thinking/benford-law/</link>
            <pubDate>Wed, 11 Mar 2026 00:00:00 +0000</pubDate>
            <guid>https://LeoDreamer2004.github.io/p/statistical-thinking/benford-law/</guid>
            <description>&lt;h2 id=&#34;benford-定律&#34;&gt;Benford 定律&#xA;&lt;/h2&gt;&lt;p&gt;Benford 从对数表中发现, 在自然界中, 数字 1 作为首位数字出现的概率远远大于其他数字. 例如, 在一个包含大量数据的集合中, 大约有 30% 的数以 1 开头, 而以 9 开头的数只有不到 5%. 这个现象被称为 Benford 定律.&lt;/p&gt;&#xA;&lt;div class=&#34;math-block math-thm&#34;&gt;&#xA;    &lt;p class=&#34;math-title&#34;&gt;定理&lt;span class=&#34;math-subtitle&#34;&gt;Benford 定律&lt;/span&gt;&lt;/p&gt;&#xA;&lt;p&gt;若 $\log_{10} x$ 的小数部分 $U(x) = \{ \log_{10} x \}$ 服从 $(0,1)$ 均匀分布, $x$ 的首位数字 $d=D(x)$ 出现的概率 $P(d)$ 可以用以下公式计算:&#xA;&lt;/p&gt;&#xA;$$P(d) = \log_{10}\left(1 + \frac{1}{d}\right)$$&lt;p&gt;&#xA;其中 d 是 1 到 9 之间的整数.&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;&lt;div class=&#34;math-block math-thm&#34;&gt;&#xA;    &lt;p class=&#34;math-title&#34;&gt;定理&lt;span class=&#34;math-subtitle&#34;&gt;尺度不变性&lt;/span&gt;&lt;/p&gt;&#xA;&lt;p&gt;若对任意 $c&gt;0$, $U(x)$ 和 $U(cx)$ 的分布相同, 则 $X$ 服从 Benford 定律.&lt;/p&gt;&#xA;&lt;p class=&#34;math-prf&#34;&gt;证明&lt;/p&gt;&#xA;$$&#xA;U(cx) = \left\{\log_{10} (cx) \right\} = \left\{\log_{10} c + \log_{10} x\right\} = \left\{U(x) + a\right\}&#xA;$$  &#xA;$U(x)$ 和 $\left\{U(x) + a\right\}$ 同分布, 对任意 $a$ 都成立.&#xA;因此 $U(x)$ 服从 $(0,1)$ 均匀分布, $X$ 服从 Benford 定律.&#xA;&lt;/div&gt;&#xA;&lt;h2 id=&#34;常返&#34;&gt;常返&#xA;&lt;/h2&gt;&lt;p&gt;$(x_n)$ 是正数数列, 定义 $U_n = U(x_n) = \left\{ \log_{10} x_n \right\} \in (0,1)$. 首位数字 $d$ 对应 $I_d = \left[ \log_{10}d, \log_{10}(d+1) \right) $，则 $D(x_n)=d \Leftrightarrow U_n \in I_d$.&lt;/p&gt;&#xA;&lt;div class=&#34;math-block&#34;&gt;&lt;span class=&#34;math-title math-exp&#34;&gt;示例 &lt;span class=&#34;math-subtitle&#34;&gt;等比数列&lt;/span&gt;&lt;/span&gt;&#xA;&lt;p&gt;考虑数列 $x_n = a^n$.&lt;/p&gt;&#xA;$$U(n) = \left\{ n \log_{10} a \right\} = \left\{ n \alpha \right\}$$&lt;p&gt;换言之, &lt;/p&gt;&#xA;$$u_{n+1} = u_n + \alpha \mod 1$$&lt;ul&gt;&#xA;&lt;li&gt;若 $\alpha \in \mathbb{Q}$, 则数列 $(u_n)$ 是周期数列, 不满足 Benford 定律.&lt;/li&gt;&#xA;&lt;li&gt;若 $\alpha \in \mathbb{R} \setminus \mathbb{Q}$, 则数列 $(u_n)$ 在 $(0,1)$ 上均匀分布, 满足 Benford 定律.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;这里用到了 Weyl 等分布定理: 设 $\alpha$ 是无理数, 那么序列 $x_n = \{n\alpha\}$ 在 $[0,1)$ 上均匀分布.&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;&lt;div class=&#34;math-block&#34;&gt;&lt;span class=&#34;math-title math-exp&#34;&gt;示例 &lt;span class=&#34;math-subtitle&#34;&gt;Benford 不充要&lt;/span&gt;&lt;/span&gt;&#xA;&lt;p&gt;考虑 $W \sim \text{Triangler} (0,1,2)$, 即:&#xA;&lt;/p&gt;&#xA;$$&#xA;f(W) = \begin{cases}&#xA;W, &amp; 0 &lt; W &lt; 1 \\&#xA;2-W, &amp; 1 \leq W &lt; 2 \\&#xA;\end{cases}&#xA;$$&lt;p&gt;&#xA;$X = 10^W$, 则 $U(X) = \{W\}$. 不难计算 $\{W\}$ 是均匀分布, 即便 $W$ 不是. 然而, $X$ 服从 Benford 定律.&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;&lt;div class=&#34;math-block&#34;&gt;&lt;span class=&#34;math-title math-exp&#34;&gt;示例 &lt;span class=&#34;math-subtitle&#34;&gt;Fibonacci 数列&lt;/span&gt;&lt;/span&gt;&#xA;$$F_n = \frac{\phi^n - \psi^n}{\sqrt{5}}$$&lt;p&gt;其中 $\phi = (1+\sqrt{5})/2$, $\psi = (1-\sqrt{5})/2$.&lt;/p&gt;&#xA;&lt;p&gt;则 $U(F_n) = \{ n \log_{10} \phi - \log_{10} \sqrt{5} + o(1) \}$. 因为 $\log_{10} \phi$ 是无理数, 所以 $U(F_n)$ 在 $(0,1)$ 上均匀分布, 满足 Benford 定律.&lt;/p&gt;&#xA;&lt;p&gt;这就是乘法过程中的常返, $X_{n+1}=A_nX_n$.&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;</description>
        </item></channel>
</rss>
