二项分布
定义
二项分布的期望和方差
期望
\[EX = np
\]
证明
设 \(X \sim B(n,p)\), 求 \(EX\).
解
\[EX = \sum_{K = 0}^{n}x_kp_k = \sum_{k = 0}^{n}kC_n^kp^k(1 - p)^{n - k} = \sum_{k = 1}^{n}k\displaystyle\frac{n!}{k!(n - k)!}p^k(1 - p)^{n - k}
\]
\[= np\sum_{k = 1}^{n}C_{n - 1}^{k - 1}p^{k - 1}(1 - p)^{n - k} = np\sum_{k = 0}^{n - 1}C_{n - 1}^kp^k(1 - p)^{n - 1 - k}
\]
\[= np[p + (1 - p)]^{n - 1} = np, \qquad\qquad\qquad\qquad\qquad\qquad\quad
\]
即 \(EX = np\).
方差
\[DX = np(1 - p)
\]
证明
设 \(X \sim B(n, p)\), 求 \(DX\).
解
\[EX^2 = \sum_{k = 0}^{n}x_k^2p_k = \sum_{k = 0}^{n}k^2C_n^kp^k(1 - p)^{n - k} = \sum_{k = 1}^{n}k\displaystyle\frac{n!}{(k - 1)!(n - k)!}p^k(1 -p)^{n - k}
\]
\[= \sum_{k = 1}^{n}(k - 1)\displaystyle\frac{n!}{(k - 1)!(n - k)!}p^k(1 - p)^{n - k} + \sum_{k = 1}^{n}\displaystyle\frac{n!}{(k - 1)!(n - k)!}p^k(1 - p)^{n - k}
\]
\[= np[(n - 1)p + 1], \qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\quad
\]
记 \(1 - p = q\), 由 \(DX = EX^2 - (EX)^2\) 可得
\[DX = npq.
\]