# 无意识统计学家定律

无意识统计学家定律（LOTUS）是概率论的一个定理，它指出：随机变量 \( X \) 的函数 \( g(X) \) 的期望值，可以直接由 \( X \) 的分布算出，而不必先求出 \( g(X) \) 的分布。<sup>[1](https://mathworld.wolfram.com/LawoftheUnconsciousStatistician.html)</sup> 其最一般的形式为

\[ \mathbb{E}[g(X)] = \int_{-\infty}^{\infty} g(x)\,\mathrm{d}F_X(x), \]

其中 \( F_X \) 是 \( X \) 的分布函数，前提是该期望存在。<sup>[1](https://mathworld.wolfram.com/LawoftheUnconsciousStatistician.html)</sup>

| 关键事实 | 细节 |
|---|---|
| 陈述 | \( \mathbb{E}[g(X)] \) 仅由 \( X \) 的分布算出；无需先求出 \( g(X) \) 的分布<sup>[1](https://mathworld.wolfram.com/LawoftheUnconsciousStatistician.html)</sup> |
| 离散形式 | \( \mathbb{E}[g(X)] = \sum_x g(x)\,p_X(x) \)<sup>[1](https://mathworld.wolfram.com/LawoftheUnconsciousStatistician.html)</sup> |
| 连续形式 | \( \mathbb{E}[g(X)] = \int_{-\infty}^{\infty} g(x)\,f_X(x)\,\mathrm{d}x \)<sup>[1](https://mathworld.wolfram.com/LawoftheUnconsciousStatistician.html)</sup> |
| 测度论名称 | 变量替换公式，\( \mathbb{E}[h(X)] = \int_{\mathbb{R}} h(x)\,\mu_X(\mathrm{d}x) \)，当 \( h \) 非负或 \( \mu_X \)-可积时成立<sup>[2](https://www.tropp.caltech.edu/notes/Tro24-Probability-Theory-LN.pdf)</sup> |
| 常见用途 | 矩（\( g(x)=x^r \)）、方差（\( g(x)=[x-\mathbb{E}[X]]^2 \)）以及矩母函数（\( g(x)=e^{tx} \)）<sup>[1](https://mathworld.wolfram.com/LawoftheUnconsciousStatistician.html)</sup> |
| 注意 | 一般而言 \( \mathbb{E}[g(X)] \neq g(\mathbb{E}[X]) \)；该定律并不允许将期望运算移入非线性函数<sup>[3](https://dlsun.github.io/probability/lotus.html)</sup><sup> • </sup><sup>[4](https://watanabe.you/wiki/Law%20of%20the%20Unconscious%20Statistician)</sup> |
| 名称由来 | 1965年，希利尔与利伯曼已在出版物中使用“无意识统计学家的定理”这一说法；罗斯（1980）使用了“定律”一词，并在脚注中给出了戏谑的解释<sup>[1](https://mathworld.wolfram.com/LawoftheUnconsciousStatistician.html)</sup> |

## 陈述与形式

对于以概率 \( p_X(x) \) 取值 \( x \) 的离散随机变量，该定律变为

\[ \mathbb{E}[g(X)] = \sum_x g(x)\,p_X(x), \]

而对于具有概率密度函数 \( f_X \) 的连续随机变量，

\[ \mathbb{E}[g(X)] = \int_{-\infty}^{\infty} g(x)\,f_X(x)\,\mathrm{d}x. \]<sup>[1](https://mathworld.wolfram.com/LawoftheUnconsciousStatistician.html)</sup>

两个公式的要点在于：权重来自 \( X \) 的分布，而非来自变换后变量 \( Y = g(X) \) 的分布。直接套用期望的定义会要求 \( \mathbb{E}[Y] = \int y\,f_Y(y)\,\mathrm{d}y \)，而这需要 \( Y \) 的密度；LOTUS 则表明，将 \( g \) 对 \( X \) 的已知分布积分，得到的是同一个数。<sup>[5](https://agdenadel.github.io/Law-of-the-unconscious-statistician/)</sup> 这一结果是精确的，而非近似：它等价于从变换后的分布计算均值。<sup>[6](https://strimmerlab.github.io/publications/lecture-notes/probability-distribution-refresher/02-probability.html)</sup>

## 名称的由来

这个名字是在调侃那些“无意识”的统计学家：他们把该公式当作 \( \mathbb{E}[g(X)] \) 的定义来用，既不曾有意识地去推导 \( g(X) \) 的分布，也不曾注意到该公式其实是一个定理。<sup>[1](https://mathworld.wolfram.com/LawoftheUnconsciousStatistician.html)</sup> 早在1965年，希利尔与利伯曼的著作中就已出现“无意识统计学家的定理”这一印行说法；谢尔登·M·罗斯于1980年使用了“无意识统计学家定律”一词，并在脚注中给出了戏谑的解释。<sup>[1](https://mathworld.wolfram.com/LawoftheUnconsciousStatistician.html)</sup> 科学史与数学史 Stack Exchange 上的一则记述称，据埃利奥特所说，概率学家保罗·哈尔莫斯早在1946年就称之为“无意识统计学家的基本定理”，而希利尔1965年的《运筹学技术导论》使用的是“定律”这一措辞。<sup>[7](https://hsm.stackexchange.com/questions/7517/law-of-the-unconscious-statistician-history-of-the-term)</sup>

这个玩笑有其技术上的锋芒。在连续情形下，它是把期望的定义应用于变换后变量所得出的一个非平凡推论。<sup>[8](https://hutter1.net/publ/uaibook2.pdf)</sup>

## 证明与测度论形式

在离散情形下，证明只是对求和作一次简短的重新排列。记 \( Y = g(X) \)，则

\[ \mathbb{E}[Y] = \sum_y y\,\mathbb{P}(g(X)=y) = \sum_y \sum_x y\,\mathbb{P}(X=x)\,[g(x)=y] = \sum_x g(x)\,\mathbb{P}(X=x), \]

因为内层求和仅在 \( y = g(x) \) 时非零。<sup>[9](https://math.stackexchange.com/a/1622319)</sup> 卡内基梅隆大学伦纳德·J·萨维奇统计学与社会科学荣休讲席教授约瑟夫·B·卡丹 在其《概率原理》一书中，用指示函数的期望证明了同一定理。<sup>[10](https://www.stat.cmu.edu/~kadane/principles-2.pdf)</sup>

在完全一般的情形下，该定律就是测度论中的变量替换公式。加州理工学院计算与数学科学教授乔尔·特罗普 将其表述如下：设实随机变量 \( X \) 的分布为 \( \mu_X \)（即底层概率测度的推前测度），\( h:\mathbb{R}\to\mathbb{R} \) 可测，则

\[ \mathbb{E}[h(X)] = \int_{\mathbb{R}} h(x)\,\mu_X(\mathrm{d}x), \]

前提是 \( h \) 非负或 \( \mu_X \)-可积；有符号的情形可将 \( h \) 拆成正部和负部来处理。<sup>[2](https://www.tropp.caltech.edu/notes/Tro24-Probability-Theory-LN.pdf)</sup> 推前恒等式也说明了为何 \( X \) 的分布已经足够：它决定了每一个单变量期望，但并不决定 \( X \) 如何与其他变量耦合——后者体现在联合分布之中。<sup>[11](https://qft.org/mathematical-methods/probability-stochastic-processes/probability-random-variables-conditional-expectation/)</sup>

## 例子

**在 [0,1] 上均匀分布。** 若 \( X \) 在 \( [0,1] \) 上均匀分布，则 \( \mathbb{E}[X^2] = \int_0^1 x^2\,\mathrm{d}x = 1/3 \)，全程无需找出 \( X^2 \) 的分布。<sup>[1](https://mathworld.wolfram.com/LawoftheUnconsciousStatistician.html)</sup>

**一个随机圆。** 将一枚正反面出现概率相等的硬币掷两次，令 \( X \) 为正面出现的次数，于是 \( X \) 以概率 0.25、0.50、0.25 取 0、1、2。半径为 \( X \) 英尺的圆面积为 \( A = \pi X^2 \)，由 LOTUS 得 \( \mathbb{E}[\pi X^2] = 1.5\pi \) 平方英尺。若改算 \( \pi\,\mathbb{E}[X]^2 \)，只得到 \( \pi \)：平均的圆并不是半径为平均值的圆。<sup>[3](https://dlsun.github.io/probability/lotus.html)</sup>

**圣彼得堡悖论。** 设 \( N \) 服从 \( p = 0.5 \) 的几何分布，即 \( f_N(n) = 0.5^n \)。收益 \( 2^{N-1} \) 满足

\[ \mathbb{E}[2^{N-1}] = \sum_{n=1}^{\infty} 2^{n-1}\cdot 0.5^n = \sum_{n=1}^{\infty} 0.5 = \infty, \]

这直接从 \( N \) 的分布再现了圣彼得堡悖论中的无穷期望。<sup>[3](https://dlsun.github.io/probability/lotus.html)</sup>

## 推广与用途

**多个变量。** 对于联合概率质量函数为 \( f(x,y) \) 的两个随机变量 \( X \) 与 \( Y \)，二维版本为

\[ \mathbb{E}[g(X,Y)] = \sum_x \sum_y g(x,y)\,f(x,y), \]

连续情形下有相应的二重积分；诸如 \( \mathbb{E}[X+Y] \) 与 \( \mathbb{E}[XY] \) 这样的量即由此计算。<sup>[12](https://dlsun.github.io/probability/lotus2d.html)</sup> 多变量版本可推广到随机向量 \( X = (X_1,\ldots,X_n) \) 与满足 \( g(X) \in L^1 \) 的实值函数 \( g \)。<sup>[13](https://albert-rapp.de/begleiter/07_zusammenhang_zv)</sup>

**矩与变换。** 取 \( g(x) = x^r \) 得 \( r \) 阶矩，取 \( g(x) = [x-\mathbb{E}[X]]^2 \) 得方差，取 \( g(x) = e^{tx} \) 得矩母函数；期望损失、成本与收益也以同样的方式计算。<sup>[1](https://mathworld.wolfram.com/LawoftheUnconsciousStatistician.html)</sup>

**概率作为期望。** 将 LOTUS 应用于事件 \( A \) 的指示函数，得到 \( \mathbb{E}[\mathbf{1}_{\{x\in A\}}] = \Pr(A) \)，这有时被称为概率与期望之间的“基本桥梁”；整个概率论都可以从这个视角建立起来。<sup>[6](https://strimmerlab.github.io/publications/lecture-notes/probability-distribution-refresher/02-probability.html)</sup>

**条件形式。** 该定律可推广到条件期望：当给定 sigma-代数 \( \mathscr{G} \) 时 \( X \) 的正则条件分布 \( \mu(\cdot,\omega) \) 存在，则在 \( \omega \) 处取值的条件期望可写为 \( \mathbb{E}[g(X)\mid\mathscr{G}](\omega) = \int_{\mathbb{R}} g(x)\,\mu(\mathrm{d}x,\omega) \)，与无条件公式形式一致。<sup>[14](https://stats.stackexchange.com/questions/647498/law-of-the-unconscious-statistician-for-conditional-expectation-and-pushforward)</sup>

## 该定律没有说的话

LOTUS 并不主张期望与非线性函数可交换：一般而言 \( \mathbb{E}[g(X)] \) 与 \( g(\mathbb{E}[X]) \) 是不同的量，而只有前者由该定律给出。<sup>[4](https://watanabe.you/wiki/Law%20of%20the%20Unconscious%20Statistician)</sup> 上面的圆的例子使这一差距变得具体：\( \mathbb{E}[\pi X^2] = 1.5\pi \)，而 \( \pi\,\mathbb{E}[X]^2 = \pi \)。<sup>[3](https://dlsun.github.io/probability/lotus.html)</sup> 一个相关的不等式——詹森不等式——对凸函数 \( g \) 给出了这一差距的界：\( \mathbb{E}[g(X)] \geq g(\mathbb{E}[X]) \)，其中 \( \mathbb{E}[X^2] \geq \mathbb{E}[X]^2 \) 是标准的实例。<sup>[6](https://strimmerlab.github.io/publications/lecture-notes/probability-distribution-refresher/02-probability.html)</sup>

## References

1. [Law of the Unconscious Statistician, Wolfram MathWorld](https://mathworld.wolfram.com/LawoftheUnconsciousStatistician.html)
2. [Joel Tropp, Probability Theory & Stochastic Processes, Caltech CMS 117 lecture notes](https://www.tropp.caltech.edu/notes/Tro24-Probability-Theory-LN.pdf)
3. [Lesson 24: LOTUS, Introduction to Probability (D. Sun)](https://dlsun.github.io/probability/lotus.html)
4. [Law of the Unconscious Statistician, Watanabe wiki](https://watanabe.you/wiki/Law%20of%20the%20Unconscious%20Statistician)
5. [Alan DenAdel, Law of the Unconscious Statistician](https://agdenadel.github.io/Law-of-the-unconscious-statistician/)
6. [Probability and Distribution Refresher, §2 (K. Strimmer)](https://strimmerlab.github.io/publications/lecture-notes/probability-distribution-refresher/02-probability.html)
7. [Law of the Unconscious Statistician: history of the term, History of Science and Mathematics Stack Exchange](https://hsm.stackexchange.com/questions/7517/law-of-the-unconscious-statistician-history-of-the-term)
8. [M. Hutter, Universal Artificial Intelligence, §2.2](https://hutter1.net/publ/uaibook2.pdf)
9. [Proving the Law of the Unconscious Statistician, Mathematics Stack Exchange](https://math.stackexchange.com/a/1622319)
10. [Joseph B. Kadane, Principles of Probability (draft), Carnegie Mellon University](https://www.stat.cmu.edu/~kadane/principles-2.pdf)
11. [Probability Spaces, Random Variables, and Conditional Expectation, QFT.org](https://qft.org/mathematical-methods/probability-stochastic-processes/probability-random-variables-conditional-expectation/)
12. [Lesson 25: 2D LOTUS, Introduction to Probability (D. Sun)](https://dlsun.github.io/probability/lotus2d.html)
13. [Albert Rapp, Übungsbegleiter, Kapitel 7: Zusammenhang von Zufallsvariablen](https://albert-rapp.de/begleiter/07_zusammenhang_zv)
14. [LOTUS for conditional expectation and pushforward measure, Cross Validated](https://stats.stackexchange.com/questions/647498/law-of-the-unconscious-statistician-for-conditional-expectation-and-pushforward)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 17, 2026; Oct 15, 2026 · Edited: Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 统计学与概率论 › Probability theory › Expectation, moments, and inequalities › Expectation of random variables

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/law-of-the-unconscious-statistician

English original: https://www.edgepedia.org/law-of-the-unconscious-statistician
