Probability: proving $E(X)=np$

2.5k Views Asked by At

This was the proof that user T_M kindly submitted to me about why the expected number of times a result comes up when you are, say, rolling a die is equal to $P(\text{result}) \times\text{Number of trials}=np$.

\begin{align} \mathbb{E}(X) &= \sum_{k=0}^n \binom{n}{k}p^k(1-p)^{n-k} k \\ &= n p\sum_{k=1}^n \frac{(n-1)!}{(k-1)!(n-k)!}p^{k-1}(1-p)^{n-k} \\ &= n p\sum_{j=0}^{n-1} \binom{n-1}{j}p^{j}(1-p)^{n-1 -j} \\ &= n p\bigl(p + (1-p)\bigr)^{n-1} \\ &= np. \end{align}

And here is what I responded with in the comments:

Thanks for responding. I don't quite understand your answer. So when you used $j$ instead of $k$ in your proof, presumably $j=k-1$, right? Also, could you please justify going from the second line to the third line (I don't know why the top number on the sigma symbol changes from $n$ to $n-1$.)

Additionally, I am a little confused by the justification for going from the third line to the fourth line. I'm not sure I understand how to simplify $\binom{n-1}{j}$.

2

There are 2 best solutions below

3
On BEST ANSWER

Yes, from the second to third line, the user shifts indices by setting $j = k - 1$. They change the summation variable to make it clear. This is a common technique when evaluating summations.

The top of the summation changes because, as you pointed out, we are setting $j = k - 1$. When $k = n$, we require $j = n - 1$. Note that the bottom index changes in a similar manner.

Essentially, we are just "shifting" our indices.

If you are familiar with integration, you can think of this as being analogous to a $u$-substitution (the bounds of integration change when you perform a $u$-substitution as well).

0
On

Maybe this line of argumentation is a litte more detailed:

Definition of Binomial Distribution, with $p+q=1$: $$ \mathrm{E}(X)=\sum_{k=0}^{n} k\cdot P(X=k)=\sum_{k=0}^{n} k\left(\begin{array}{l}n \\ k\end{array}\right) p^{k} q^{n-k} $$ since for $k=0, k\left(\begin{array}{l}n \\ k\end{array}\right) p^{k} q^{n-k}=0$, we get $$ \sum_{k=1}^{n} k\left(\begin{array}{l}n \\ k\end{array}\right) p^{k} q^{n-k} $$ Factors of Binomial Coefficient: $k\left(\begin{array}{l}n \\ k\end{array}\right)=n\left(\begin{array}{l}n-1 \\ k-1\end{array}\right)$ with which we get $$ \sum_{k=1}^{n} n\left(\begin{array}{c}n-1 \\ k-1\end{array}\right) p^{k} q^{n-k} $$ taking out $n p$ and using $(n-1)-(k-1)=n-k,$ we receive $$ n p \sum_{k=1}^{n}\left(\begin{array}{c}n-1 \\ k-1\end{array}\right) p^{k-1} q^{(n-1)-(k-1)} $$ putting $m=n-1, j=k-1$ $$ n p \sum_{j=0}^{m}\left(\begin{array}{c}m \\ j\end{array}\right) p^{j} q^{m-j} $$ Binomial Theorem and $p+q=1$ $$ np $$