## de Moivre-Laplace 定理與大數定律

$\displaystyle P_n(k)=\binom{n}{k}p^kq^{n-k}=\frac{n!}{k!\,(n-k)!}p^kq^{n-k}$

de Moivre-Laplace 定理

$npq\gg 1$$k$ 鄰近 $np$ (差距數量級為 $\sqrt{npq}$)，則

$\displaystyle P_n(k)=\binom{n}{k}p^kq^{n-k}\simeq\frac{1}{\sqrt{2\pi npq}}e^{-\frac{(k-np)^2}{2npq}}$

$\displaystyle P_n(k_1,\ldots,k_r)=\frac{n!}{k_1!\cdots k_r!}p_1^{k_1}\cdots p_r^{k_r}\simeq\frac{\exp\left(-\frac{1}{2}\left(\frac{(k_1-np_1)^2}{np_1}+\cdots+\frac{(k_r-np_r)^2}{np_r}\right)\right)}{\sqrt{(2\pi n)^{r-1}p_1\cdots p_r}}$

$r=2$，上式退化為 de Moivre-Laplace 定理。

$\displaystyle P_{10}(5)=\frac{10!}{5!\,5!}\frac{1}{2^{10}}=0.2461$

$\displaystyle P_{10}(5)\simeq\frac{1}{\sqrt{2\pi\cdot 2.5}}e^{-(5-10\cdot 0.5)^2/(2\cdot 2.5)}=\frac{1}{\sqrt{5\pi}}=0.2523$

\displaystyle\begin{aligned} P_{100}(50)&\simeq\frac{1}{\sqrt{50\pi}}=0.0798\\ P_{1000}(500)&\simeq\frac{1}{\sqrt{500\pi}}=0.0252. \end{aligned}

$\displaystyle g(x)=\frac{1}{\sqrt{2\pi}}e^{-\frac{x^2}{2}}$

$\displaystyle G(x)=\int_{-\infty}^x g(t)dt=\frac{1}{\sqrt{2\pi}}\int_{-\infty}^x e^{-\frac{t^2}{2}}dt$

$\displaystyle \binom{n}{k}p^kq^{n-k}\simeq \frac{1}{\sqrt{2\pi npq}}\,e^{-\frac{(k-np)^2}{2npq}}=\frac{1}{\sqrt{npq}}\,g\left(\frac{k-np}{\sqrt{npq}}\right)$

$\displaystyle g\left(\frac{k-np}{\sqrt{npq}}\right)\simeq \sqrt{npq}\left(G\left(\frac{k+0.5-np}{\sqrt{npq}}\right)-G\left(\frac{k-0.5-np}{\sqrt{npq}}\right)\right)$

$\displaystyle P_n(k)=\binom{n}{k}p^kq^{n-k}\simeq G\left(\frac{k+0.5-np}{\sqrt{npq}}\right)-G\left(\frac{k-0.5-np}{\sqrt{npq}}\right)$

\displaystyle\begin{aligned} P_n(k_1\le k\le k_2)&=\sum_{k=k_1}^{k_2}\binom{n}{k}p^kq^{n-k}\\ &\simeq \sum_{k=k_1}^{k_2}\left(G\left(\frac{k+0.5-np}{\sqrt{npq}}\right)-G\left(\frac{k-0.5-np}{\sqrt{npq}}\right)\right)\\ &=G\left(\frac{k_2+0.5-np}{\sqrt{npq}}\right)-G\left(\frac{k_1-0.5-np}{\sqrt{npq}}\right). \end{aligned}

$\displaystyle \hbox{erf}(x)=\frac{2}{\sqrt{\pi}}\int_0^xe^{-t^2}dt$

$\displaystyle G(x)=\frac{1}{\sqrt{2\pi}}\int_{-\infty}^xe^{-\frac{t^2}{2}}dt=\frac{1}{2}\left(1+\hbox{erf}\left(\frac{x}{\sqrt{2}}\right)\right)$

\displaystyle\begin{aligned} P_{100}(40\le k\le 60)&\simeq G\left(\frac{60+0.5-50}{\sqrt{25}}\right)-G\left(\frac{40-0.5-50}{\sqrt{25}}\right)\\ &=G(2.1)-G(-2.1)=2G(2.1)-1\\ &=\hbox{erf}\left(\frac{2.1}{\sqrt{2}}\right)=\hbox{erf}(1.4849)=0.9643. \end{aligned}

$\displaystyle P_n(np)\simeq\frac{1}{\sqrt{2\pi npq}}\to 0$

$\displaystyle P\left(\left|\frac{k}{n}-p\right|\le\epsilon\right)\to 1$

\displaystyle\begin{aligned} P\left(\left|\frac{k}{n}-p\right|\le\epsilon \right)&=P_n(k_1\le k\le k_2)\\ &=\sum_{k=k_1}^{k_2}\binom{n}{k}p^kq^{n-k}\\ &\simeq G\left(\frac{k_2+0.5-np}{\sqrt{npq}}\right)- G\left(\frac{k_1-0.5-np}{\sqrt{npq}}\right)\\ &=2G\left(\frac{\epsilon\sqrt{n}+0.5/\sqrt{n}}{\sqrt{pq}}\right)-1\\ &\simeq 2G\left( \epsilon \sqrt{\frac{n}{pq}}\right)-1. \end{aligned}

$\displaystyle P\left(\left|\frac{k}{n}-p\right|\le\epsilon \right)\simeq 2G\left(\epsilon\sqrt{\frac{n}{pq}}\right)-1\to 1$

\displaystyle\begin{aligned} P\left(\left|\frac{k}{n}-0.5\right|\le 0.01\right)&\simeq 2G\left(0.01\sqrt{\frac{n}{0.25}}\right)-1\\ &=\hbox{erf}\left(0.02\sqrt{\frac{n}{2}}\right)\ge 0.99. \end{aligned}

[1] 維基百科：De Moivre–Laplace theorem
[2] 誤差函數線上計算器：Error Function Calculator
[3] 本文所述的大數定律稱為弱大數定律，一般以隨機變數的形式陳述。定義隨機變數 $\mathbf{x}_i=1$ 若事件 $A$ 發生於第 $i$ 次試驗，否則 $\mathbf{x}_i=0$。當 $n$ 趨於無限大，樣本平均數

$\displaystyle \overline{\mathbf{x}}_n=\frac{\mathbf{x}_1+\cdots+\mathbf{x}_n}{n}$

$\displaystyle P\left(\vert\overline{\mathbf{x}}_n-p\vert\le\epsilon\right)\to 1$

This entry was posted in 機率統計 and tagged , , , . Bookmark the permalink.