假定隨機變數$X$服從二項分佈,即$X \sim B(n, p)$,則有機率質量函數
$$P(X = k) = {n \choose k} p^k (1 - p)^{n - k}, k = 0, 1, 2, \cdots, n.$$
$X$的期望值計算如下:
\begin{align*} E(X) &= \sum_{k = 0}^n k \cdot {n \choose k} p^k (1 - p)^{n - k} \\ &= \sum_{k = 1}^n k \cdot {n \choose k} p^k (1 - p)^{n - k} \\ &= \sum_{k = 1}^n k \cdot \frac{n!}{k! (n - k)!} p^k (1 - p)^{n - k} \\ &= \sum_{k = 1}^n \frac{n!}{(k - 1)! (n - k)!} p^k (1 - p)^{n - k} \\ &= \sum_{k = 1}^n \frac{n \cdot (n - 1)!}{(k - 1)! [(n - 1) - (k - 1)]!} p \cdot p^{k - 1} (1 - p)^{(n - 1) - (k - 1)} \\ &= np \sum_{k = 1}^n \frac{(n - 1)!}{(k - 1)! [(n - 1) - (k - 1)]!} \cdot p^{k - 1} (1 - p)^{(n - 1) - (k - 1)} \\ &= np \sum_{k = 1}^n {{n - 1} \choose {k - 1}} \cdot p^{k - 1} (1 - p)^{(n - 1) - (k - 1)} \\ &= np \sum_{k = 0}^{n - 1} {{n - 1} \choose k} \cdot p^k (1 - p)^{(n - 1) - k} \\ &= np \, [p + (1 - p)]^{n-1} \\ &= np.\end{align*}
沒有留言:
張貼留言