大数定律与中心极限定理

学习目标: Be able to use the central limit theorem to approximate probabilities of averages and sums of independent identically-distributed random variables.

Sample Mean

Suppose X1,X2,,Xn are independent random variables with the same underlying distribution. In this case, we say that the Xi are independent and identically-distributed, or i.i.d. In particular, the Xi all have the same mean μ and standard deviation σ. Sample Mean 定义如下:

X¯n=X1+X2++Xnn=1ni=1nXi

为了更好地理解 sample mean,下面我来举例说明一下。现在让我们进行投硬币实验,如果我们投的次数越多,出现正反面的次数会接近相同,这不难理解。在这个实验中,每个随机变量 Xi 就是一次独立的投掷,因此 XiBernoulli(0.5),如果我们一共投掷100次,那么n=100, sample mean X¯100 = (在100次的投掷中,出现正面的概率)。

Randomness being what it is, this is not guaranteed; for example we could get 100 heads in 100 flips, though the probability of this occurring is very small. So our intuition translates to: with high probability the sample mean X¯n is close to the mean 0.5 for large n.

由于 Xi 本身就是随机变量,因此 X¯n 也是随机变量,那么它的分布是怎样的呢?下文中介绍的中心极限定理会告诉我们:随着 n 逐渐增大时, X¯n 最终会收敛到正态分布。

The law of large numbers

大数定律告诉我们:The average of many independent samples is (with high probability) close to the mean of the underlying distribution. 举个例子说明一下大数定律所表达的含义。如下图所示,当我们投掷一个骰子的次数超过400次时,我们观察到的 sample mean 会非常接近于理论上的期望值(期望不是随机变量,而是一个确定的值)。因此,大数定律告诉我们:当实验的数目足够大时,sample mean 会等于真正的 mean.

大数定律与中心极限定理

接下来,我给出大数定律准确的数学定义

Suppose X1,X2,,Xn, are i.i.d. random variables with mean μ and variance σ2. For each n, let X¯n be the average of the first n variables. Then for any ϵ > 0, we have

limnP(|X¯nμ|<ϵ)=1

Think of ϵ as a small tolerance of error from the true mean μ.

在证明大数定律之前,我们需要先了解一下 Markov inequalities, Chebyshev inequalities, and convergence in probability.

Markov inequalities

Markov 不等式把概率与期望关联起来,定义如下:

If X is a nonnegative random variable and a>0, then the probability that X is no less than a is no greater than the expectation of X divided by a: P(Xa)E[X]a

关于这个不等式的证明参考 Lecture 19 中的 5:40 处开始。

Chebyshev inequalities

切比雪夫不等式定义:Let X (integrable) be a random variable with finite expected value μ and finite non-zero variance σ2 :

P(|Xμ|c)σ2c2

c=kσ,对于任何实数 k>0,上述公式可以变成如下形式:

P(|Xμ|kσ)1k2

关于它的证明如下图所示:

大数定律与中心极限定理

Convergence in probability

如果你学过微积分,你一定知道什么是序列(sequence)收敛吧。关于序列收敛的数学定义为:对于任何的 ϵ>0,都会存在一个 n0 ,使得每个 n>n0|ana|ϵ. 正如下图所示,当 n>n0 时,an 的值都在误差范围之内。

大数定律与中心极限定理

Convergence in probability 与上面的收敛类似。假设 Y1,Y2,Yn 是一系列的随机变量, convergence in probability 的定义如下图:

大数定律与中心极限定理

那么如何来理解上面的定义呢?其实也与序列的收敛类似,序列中是一系列的实数,而这是一系列的随机变量,每个随机变量都有相应的分布。假设 Yn 是正态分布,随着n的增大,|Yna|ϵ 的概率越来越小,逐渐趋向于0; 或者你可以说|Yna|<ϵ 的概率越来越大,逐渐趋向于1. 正如下图所示,随着n越来越大,落到误差外的概率越来越小。

大数定律与中心极限定理

为了验证大家的理解,让我们用 Convergence in probability 来解释一下大数定律。上面我已经说过了,sample mean X¯n 本身就是一个随机变量,不同的n对应着不同形状的分布。假设上图中的 a 就是实际的 mean 值,拿抛硬币的例子来说:

1、当n=10时,即抛了10次硬币,我们会得到1个 sample mean X¯10; 我们把抛了10次硬币这个实验做无数次,就会得到无数个 sample mean X¯10,假设它的分布是上图中最左面的分布。

2、当n=1000时,我们同样也会得到1个 sample mean X¯1000; 同样地,把这个实验重复无数次,就会得到无数个 sample mean X¯1000,假设它的分布是上图中间的分布。

3、当 n 时,大数定律告诉我们,sample mean X¯n 的分布会 converges to actual mean in probability.

大数定律的证明

假设 X1,X2,,Xn are i.i.d. random variables with mean μ and variance σ2, sample mean 为 Mn=X1++Xnn. 证明过程如下图所示:

大数定律与中心极限定理

The Central Limit Theorem

中心极限定理说明,在适当的条件下,大量相互独立随机变量的均值经标准化后依分布收敛于正态分布。关于详细的一些公式参考下面2幅图。这里我解释一下下图红框中的公式:当 n 时,Zn 就是一个标准正态分布了,因此它的 cdf 将与标准正态分布的 cdf 一致。

大数定律与中心极限定理
大数定律与中心极限定理

为了让大家更好地理解中心极限定理,这里我给大家举一个投票的例子。美国在确定下一界总统是谁之前,社会上通常做一些民意调查,然后来预测哪个候选人会更有可能当选。假设有2个候选人 A 和 B,进一步假设在整个美国的人口中,支持 A 的比例为 p0 (true mean),即当你随机选一个人时,这个人告诉你他支持 A 的概率为 p0.

假设我们在这次民调中,一共随机选择了 n 个人,因此我们可以把这次调查看作是连续 n 次的 Bernoulli (p0) 实验,X1,,Xn 其中 Xi=1 如果第 i 个人支持 A,否则是 Xi=0. 因此 sample mean 可以表示成 X¯=X1++Xnn,即支持 A 的人所占的比例。我们知道每个人 XiBernoulli(p0),因此:

E[Xi]=p0andσXi=p0(1p0)

已知上面这些条件,结合中心极限定理可得:

X¯N(p0,σ/n),whereσ=p0(1p0)

如果解读上面的分布呢?在正态分布中,95% 的概率都落入了 mean 的2个标准差之内。这意味着,95% 的 sample mean X¯ 会落入到 true mean p0 的2个标准差(2σ/n)之内。比如说,你做了100个民意调查(每次调查包含20000个人),你就会得到100个 sample mean,其中 95% 的 sample mean,即95个,会落入到 true mean p0 的2个标准差(2σ/n)之内。

Since the probabilities in the above examples can be computed exactly using the binomial distribution, you may be wondering what is the point of finding an approximate answer using the CLT. In fact, we were only able to compute these probabilities exactly because the Xi were Bernoulli and so the sum S was binomial. In general, the distribution of the S will not be familiar, so you will not be able to compute the probabilities for S exactly; it can also happen that the exact computation is possible in theory but too computationally intensive in practice, even for a computer. The power of the CLT is that it applies when Xi has almost any distribution.

参考资料

https://ocw.mit.edu/courses/mathematics/18-05-introduction-to-probability-and-statistics-spring-2014/readings/MIT18_05S14_Reading6b.pdf

https://engineering.purdue.edu/~ipollak/ece302/SPRING12/notes/26_Limit_Theorems_1_WLLN_packed.pdf