Average of a Binomial Distro

Now we're going to analyze an important example a couple of different ways: what's the average value for a variable distributed according to the binomial distribution?

Where does the binomial distribution come from? Flipping a coin $n$ times and saying that the probability of a head is $p$, and a tail is $1-p$. You can assign a variable $x_i$ to the ith flip, saying that if it lands tails, $x_i = 0$, you make nothing but if it lands heads, $x_i = 1$, that is you make $1. So the sum of the variables $x_i$ is just the number of times it landed heads. Earlier we called that sum $X$, see eqn 1.14. We know the distribution P(X) is the binomial distribution, eqn. 1.9. So

$\displaystyle \langle X \rangle = \sum_{X=0}^n X P(X)
= \sum_{X=0}^n X
\left(\!\!\!
\begin{array}{c}
n \\
X
\end{array}\!\!\!\right)
(p)^X (1-p)^{n-X}
=$     (1.37)
$\displaystyle \sum_{X=0}^n X {n!\over (n-X)!X!}
(p)^X (1-p)^{n-X}$      

You can do this sum using some differentiation trick, but this is not the best way to find out the average. Let's think about going back to our earlier approach.

First consider just one trial, say $x_5$. You flip a coin. What's the probability of it coming up heads? That's just the definition of $p$. So what's the average value of $x_5$? It's $p$ too, if you want to see this more mathematically just start with the definition of an average eqn. 1.16. In this case you have its $0 P(0) + 1 P(1) = 0 P(0) + 1 p = p$. This is how much you expect to make in one trial. Now we're interested in the total amount you make after $n$ trials. Well as we reasoned before, you can just multiply the result for one toss by $n$, so the answer is $np$. Saying this in mathematical notation:

\begin{displaymath}
\langle X \rangle =
\langle \sum_{i=1}^n x_i \rangle =
\sum_{i=1}^n \langle x_i \rangle =
\sum_{i=1}^n p = n p
\end{displaymath} (1.38)

This uses the fact that the average of the sum is the sum of the average as we discovered before. So now we know the mean for the binomial distribution. It's just (number of trials) $\times$ (the mean for one trial).

Now some of you probably wish I'd done it the longer way using the calculus trick. Try it out if you're so inclined, it's not that bad. However it's always best to try to come up with the most elegant and intuitive derivations of answers that you can. You understand the nature of the problem much better that way. Once you can do that you'll have a shot and understanding and solving really hard problems, something that you won't be able to do if you don't follow this advice.

Josh Deutsch 2009-03-05