Mean and Variance of the Binomial Distribution
Formulas
$\displaystyle X \sim \text{Bin} (n,p)$ Surface $$ E(X)=np \\ \operatorname{Var}(X)=npq $$
- Where $q : = 1-p$ stands.
Derivation
Strategy: Directly unravel the combinations. The expression might be quite messy, but it’s entirely digestible at the high school level. It’s worth trying out at least once. Upon encountering mathematical statistics, one can prove it using a much shorter and simpler method. Be it the mean or variance, start with the following probability mass function of the binomial distribution.
Definition of Binomial Distribution: A discrete probability distribution $\text{Bin}(n,p)$ with the following probability mass function for $n \in \mathbb{N}$ and $p \in [0,1]$ is called the binomial distribution. $$ p(x) = \binom{n}{x} p^{x} (1-p)^{n-x} \qquad , x= 0, 1 , \cdots , n $$
Mean
Since the probability mass function of the binomial distribution $\text{Bin} (n,p)$ is $p( k ) = { _n {C} _k } p^{ k } (1-p)^{n-k}$, $$ E(X)=\sum _{ k=0 }^{ n }{ k{ _n {C} _k }{ p ^ k }{ q ^ { n - k } } } $$ when $\displaystyle k=0$, then $k{ _n {C} _k }{ p ^ k }{ q ^ { n - k } }=0$ so $$ \begin{align*} E(X) =& \sum _{ k=1 }^{ n }{ k{ _n {C} _k }{ p ^ k }{ q ^ { n - k } } } \\ =& \sum _{ k=1 }^{ n }{ k\frac { n! }{ (n-k)!k! }{ p ^ k }{ q ^ { n - k } } } \\ =& np\sum _{ k=1 }^{ n }{ \frac { (n-1)! }{ (n-k)!(k-1)! }{ p ^ { k - 1 } }{ q ^ { n - k } } } \end{align*} $$ If $(n-1)=m, (k-1)=s$ is defined as, $$ \begin{align*} E(X) =& np\sum _{ s=0 }^{ m }{ \frac { m! }{ (m-s)!s! }{ p ^ s }{ q ^ { m - s } } } \\ =& np\cdot 1 \\ =& np \end{align*} $$
■
Variance
From the properties of variance, $\operatorname{Var} (X)=E({ X ^ 2 })- { {E(X)} }^{ 2 } = E(X^{ 2 })- { (np) }^{ 2 }$ $$ \begin{align*} E({ X ^ 2 }) =& \sum _{ k=1 }^{ n }{ { k }^{ 2 } \frac { n! }{ (n-k)!k! }{ p ^ k }{ q ^ { n - k } } } \\ =& np\sum _{ k=1 }^{ n }{ k\frac { (n-1)! }{ (n-k)!(k-1)! }{ p ^ { k - 1 } }{ q ^ { n - k } } } \end{align*} $$ If defining $\displaystyle (n-1)=m, (k-1)=s$ as, $$ \begin{align*} E({ X ^ 2 }) =& np\sum _{ s=0 }^{ m }{ (s+1)\frac { m! }{ (m-s)!s! }{ p ^ s }{ q ^ { m - s } } } \\ =& np\left( \sum _{ s=0 }^{ m }{ s\frac { m! }{ (m-s)!s! }{ p ^ s }{ q ^ { m - s } } }+\sum _{ s=0 }^{ m }{ \frac { m! }{ (m-s)!s! }{ p ^ s }{ q ^ { m - s } } } \right) \\ =& np\left( \sum _{ s=0 }^{ m }{ s\frac { m! }{ (m-s)!s! }{ p ^ s }{ q ^ { m - s } } }+ 1 \right) \end{align*} $$ The expected value of $S \sim \text{Bin} (m,p)$ is $\displaystyle \sum _{ s=0 }^{ m }{ s\frac { m! }{ (m-s)!s! }{ p ^ s }{ q ^ { m - s } } }=mp$, therefore $$ \begin{align*} E({ X ^ 2 }) =& np(mp+1) \\ =& np{(n-1)p+1} \\ =& np(np-p+1) \\ =& np(np+q) \\ =& { (np) ^ 2 }+npq \end{align*} $$ Thus, $$ \begin{align*} \operatorname{Var} (X) =& E(X^{ 2 })-{ (np) ^ 2 } \\ =& { (np) ^ 2 }+npq-{ (np) ^ 2 } \\ =& npq \end{align*} $$
■