# Relating two proofs of binomial distribution mean

There are two ways of calculating the mean of the binomial distribution. One is to observe that the distribution measures the number of successes in a sample size $n$ drawn from space of size $N$. Then if the pr of each sample being a success is $p$, by linearity of expectation, the mean of the distribution is $np$.

The other is to write the formula for the expectation explicitly and proceed as follows - $$E[X] = \sum_{x=0}^n x\binom{n}{x}p^x(1-p)^{n-x}=\sum_{x=1}^nn\binom{n-1}{x-1}p^x(1-p)^{n-x}$$

$$=np\sum_{x=1}^{n-1}\binom{n-1}{x-1}p^{x-1}(1-p)^{n-1-(x-1)}=np$$

However I don't quite understand how to relate these two derivations. For instance, something like what part in the second proof corresponds to making the linearity of expectation step, etc. would be very helpful.

-
There is quite a number of situations in which we do not know any calculation of expectation through the distribution, while a linearity argument works smoothly. So there seems to be no "automatic" machinery for translating from the second to the first. – André Nicolas Jun 14 '13 at 21:20

In the first argument, to conclude that the expectation is $np$, you make use of the fact that the binomial distribution $\text{Binomial}(n,p)$ is nothing but the sum of $n$ bernoulli random numbers each having a probability of showing $1$ as $p$ i.e. $$X_{\text{binomial}} = Z_1 + Z_2 + \cdots + Z_n$$ where $Z_k \sim \text{Bernoulli}(p)$. Now we make use of linearity of expectation and the fact that $\mathbb{E}(Z_k) = p$, we conclude that $$\mathbb{E}(X_{\text{binomial}}) = np$$

In the other argument, you compute the distribution of the sum of the $n$ bernoulli random variables i.e. you find the distribution of $X_{\text{binomial}}$. This is the binomial random variable. Now you compute the expectation.

To summarize, in the first method, you compute expectation directly without computing the probability mass function, while in the second method, you have the probability mass function and make use of it to compute expectation.

-

There is no direct such correspondence. Both approaches operate on different probability spaces. In the first case, you use a theorem that you saw in class: when you repeat an experiment under the same conditions, you can average as is intuitive (=linearity of expectation). But this works only nicely for expectations (and variances in the case of independence). Hence, you want a compact description of the experiment of doing this n times (this is a little as if you distinguish between a set $S$ and {$S$}). The result will be the experiment described by the probability density for the binomial distribution, and I assume you went over its derivation in class. The expectation of a discrete random variable is always the sum of the weighted realizations (weighted by probability mass), as in your second formula, as also in the formula for only one Bernoulli trial ($p = p 1 + (1-p) 0$). But as you summarized the n trials into a new random variable, there is no need to use linearity of the expectation of repeated experiments: it has been transformed into a single experiment which calculates a weighted average, which is the closest analogue to the unweighted average in the first case (but it is an analogue, no more).

Note finally that "linearity of expectation" is no assumption as you write towards the end. This holds always - have a look at your notes.

-
"Note finally that "linearity of expectation" is no assumption as you write towards the end. This holds always - have a look at your notes." Wrong choice of words. Oops! Thanks for the correction – user55408 Jan 7 '13 at 4:00