Random Variables · Linearity of Mathematical Expectation
Lesson 1
Let the random variable \(\alpha\) be binomially distributed: \(\alpha \sim \operatorname{Binomial}(n, p)\). Let's find its expected value. \[\begin{align*} \operatorname{E}[\alpha]&=\sum_{k=0}^{n}k\Pr[\alpha=k]=\\&=\sum_{k=0}^{n}k\binom{n}{k}p^{k}(1-p)^{n-k}=\\&=\sum_{k=1}^{n}k\cdot \frac{n!}{k!(n-k)!}p^{k}(1-p)^{n-k}=\\&=np\sum_{k=1}^{n}\frac{(n-1)!}{(k-1)!((n-1)-(k-1))!}p^{k-1}(1-p)^{(n-1)-(k-1)}=\\&=np(p+(1-p))^{n-1}=\\&=np .\end{align*}\] As we will see below, this answer could have been found much more easily using the linearity of expectation. We will prove this property below and use it many times in the future.