31
$\begingroup$

If $\mathrm P(X=k)=\binom nkp^k(1-p)^{n-k}$ for a binomial distribution, then from the definition of the expected value $$\mathrm E(X) = \sum^n_{k=0}k\mathrm P(X=k)=\sum^n_{k=0}k\binom nkp^k(1-p)^{n-k}$$ but the expected value of a Binomal distribution is $np$, so how is

$$\sum^n_{k=0}k\binom nkp^k(1-p)^{n-k}=np$$

$\endgroup$
  • 6
    $\begingroup$ Differentiating the binomial expansion for $(p+q)^n$ with respect to $p$ gives you the result very quickly. $\endgroup$ – wj32 Nov 1 '12 at 0:54
39
$\begingroup$

The main idea is to factor out $np$. I believe we can rewrite:

$$\sum^n_{k=0}k\binom nkp^k(1-p)^{n-k}= \sum^n_{k=1} k\binom nkp^k(1-p)^{n-k}$$

Factoring out an $np$, this gives (and cancelling the $k$'s):

$$\sum^n_{k=1} k\binom nkp^k(1-p)^{n-k} = np \sum^n_{k=1} \dfrac{(n-1)!}{(n-k)!(k-1)!}p^{k-1}(1-p)^{n-k}$$

Notice that the RHS is:

$$np \sum^n_{k=1} \dfrac{(n-1)!}{(n-k)!(k-1)!}p^{k-1}(1-p)^{n-k} = np \sum^n_{k=1} \binom {n-1}{k-1}p^{k-1}(1-p)^{n-k},$$

and since $\displaystyle \sum^n_{k=1} \binom {n-1}{k-1}p^{k-1}(1-p)^{n-k} = (p + (1-p))^{n-1} = 1$, we therefore indeed have

$$\sum^n_{k=0}k\binom nkp^k(1-p)^{n-k} = np$$.

$\endgroup$
  • 1
    $\begingroup$ How do you know that $\displaystyle \sum^n_{k=1} \binom {n-1}{k-1}p^{k-1}(1-p)^{n-k} = (p + (1-p))^{n-1}$? Is there a resource one can study in order to understand equations like that, related to the binomial coefficient? $\endgroup$ – user56834 Jul 9 '17 at 14:04
  • 2
    $\begingroup$ That is an application of the binomial theorem: that $(x+y)^n = \sum_{k = 0}^n \binom{n}{k} x^k y^{n - k}$, where I have modified the summation index to range over $1, ..., n$ rather than $0, ..., n - 1$. Correspondingly, I have to subtract one from the summation index. $\endgroup$ – notes Jul 9 '17 at 18:49
  • $\begingroup$ As far as resources go, I remember learning things like this variously from "Art and Craft of Problem Solving", Art of Problem Solving's "Introduction to" and "Intermediate Counting and Probability". Depending on your goals, there may better sources for this stuff. For instance, the Wikipedia page on binomial coefficients is moderately comprehensive. $\endgroup$ – notes Jul 9 '17 at 18:54
31
$\begingroup$

Let $B_i=1$ if we have a success on the $i$-th trial, and $0$ otherwise. Then the number $X$ of successes is $B_1+B_2+\cdots +B_n$. But then by the linearity of expectation, we have $$E(X)=E(B_1+B_2+\cdots+B_n)=E(B_1)+E(B_2)+\cdots +E(B_n).$$ It is easy to verify that $E(B_i)=p$, so $E(X)=np$.

You wrote down another expression for the mean. So the above argument shows that the combinatorial identity of your problem is correct. You can think of it as a mean proof of a combinatorial identity.

Remark: A very similar argument to the one above can be used to compute the variance of the binomial.

The linearity of expectation holds even when the random variables are not independent. Suppose we take a sample of size $n$, without replacement, from a box that has $N$ objects, of which $G$ are good. The same argument shows that the expected number of good objects in the sample is $n\dfrac{G}{N}$. This is somewhat unpleasant to prove using combinatorial manipulation.

$\endgroup$
  • 1
    $\begingroup$ +1 for a simple and clear explanation using Linearity of Expectation. $\endgroup$ – buruzaemon May 25 '16 at 23:27
12
$\begingroup$

Use the fact that $$k\binom{n}k=\frac{kn!}{k!(n-k)!}=\frac{n!}{(k-1)!(n-k)!}=\frac{n(n-1)!}{(k-1)!(n-k)!}=n\binom{n-1}{k-1}\;:$$

$$\begin{align*} \sum^n_{k=0}k\binom nkp^k(1-p)^{n-k}&=\sum_{k=0}^nn\binom{n-1}{k-1}p^k(1-p)^{n-k}\\ &=n\sum_{k=0}^n\binom{n-1}{k-1}p^k(1-p)^{n-k}\\ &=n\sum_{k=0}^{n-1}\binom{n-1}kp^{k+1}(1-p)^{n-k-1}\\ &=np\sum_{k=0}^{n-1}\binom{n-1}kp^k(1-p)^{n-k-1}\\ &=np\Big(p+(1-p)\Big)^{n-1}&&\text{binomial theorem}\\ &=np\;. \end{align*}$$

$\endgroup$
  • $\begingroup$ Thank you, I still don't know why i didn't see it. $\endgroup$ – user31280 Oct 31 '12 at 19:10
8
$\begingroup$

Note that $$k \dbinom{n}{k} = n \dbinom{n-1}{k-1}$$ Hence, $$\mathbb{E}(X) = \sum_{k=1}^{n}n \dbinom{n-1}{k-1} p^k (1-p)^{n-k} = np \left(\sum_{r=0}^{n-1} \dbinom{n-1}{r} p^r (1-p)^{n-1-r} \right) = np$$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy