Section 11.4 Binomial distribution
We will end with a particular distribution that you are extremely well-equipped to understand: the binomial distribution. Its name should give you a clue as to the basic idea, but first let's talk about distributions. A random variable's distribution is its support (remember: the values it can take) together with the probability of each of those values. Some distributions are not special, but others appear often enough and have suitable βreal worldβ interpretations that they receive their own names. Some other discrete distributions you may encounter are the uniform distribution, the hypergeometric distribution, and the Poisson distribution. Let's start with the simplest possible context: counting the heads in a sequence of a fixed number ofExample 11.4.1.
Let \(X\) count the number of heads in a sequence of 5 flips of a fair coin.
In order for there to be 0 heads there must be 5 tails. The probability of this occurring, according to the multiplication principle, is
because each flip is independent.
In order for there to be 1 heads there must be 4 tails. You might say, okay, that's \(0.5\) (the probability of a heads) times \(0.5^4\) (the probability of four tails), right? Well, here is a wrinkle: there are five different coins that could be the heads! In other words we may see the strings \(HTTTT\text{,}\) \(THTTT\text{,}\) \(TTHTT\text{,}\) \(TTTHT\text{,}\) or \(TTTTH\text{.}\)
Because one of these strings or the other must occur, we use the addition principle, so
What about when \(X=2\text{?}\) Now we must count the number of ways that a sequence of 5 coin flips can have 2 heads. However, you just spent two chapters learning about binomial coefficients, so you may remember that this number is just \({{5}\choose{2}}\text{.}\) Therefore,
From here we can figure out \(P[X=x]\) for the other values of \(X\text{.}\)
Definition 11.4.2.
Let
Theorem 11.4.3.
The pmf of the binomial distribution is a valid pmf, ie., its sum over the support is 1.
Proof.
Let \(X \sim Bin(n,p)\text{.}\) The support of \(X\) is \(\{0,1,2,\ldots,n\}\text{.}\) The sum of the pmf over the support is
by the binomial theorem. Since \(p+(1-p)=1\) and \(1^n=1\text{,}\) the proof is complete.
Example 11.4.4.
Suppose that among likers of ice cream, \(14\%\) like chocolate ice cream the best. A random sample of \(27\) ice cream likers is taken. What is the probability that \(4\) of the sample likes chocolate the best? How about \(10\text{?}\)
Let \(Y\) be the number of people in the sample whose favorite flavor is chocolate. We are basically told that \(Y\sim Bin(27, 0.14)\text{.}\) Then,
This number is actually pretty high since \(14\%\) of \(27\) is \(3.78\text{.}\) Notice how the number decreases as we ask for a higher number of chocolate ice cream lovers:
Theorem 11.4.5.
If
Example 11.4.6.
Suppose it is known that \(1.3\%\) of a particular computer part fail. Furthermore the failure of one part on the assembly line does not suggest that the next part will fail, i.e., they are independent. In a batch of \(600\) parts, how many defective parts do we expect?
The number of defective parts is binomial: there are \(600\) independent trials with a fixed probability of \(0.013\) that result in either defective or functional equipment. Therefore, the average number of defective parts in a batch of \(600\) is
parts.
Proof.
Let \(X \sim Bin(n,p)\text{.}\) Then the expected value of \(X\) is
by definition.
Observe that when \(x=0\text{,}\) the entire term of the sum is 0. So we lose nothing by instead writing
The fact that we have a sum involving binomial coefficients suggests the binomial theorem, but the binomial theorem requires us to start at \(x=0\text{.}\) Also, that \(x\) in the sum is going to be a problem. Rewrite the sum as follows:
We have gotten rid of the \(x\text{,}\) but now the factorial quotient is no longer a binomial coefficient because \(x-1+n-x\) is not \(n\text{.}\) However, it is \(n-1\text{.}\) We can continue rewriting the sum to work with this.
(because \(n\) is constant with respect to the sum). We are closer to a binomial expansion now, but we still need to start at \(x=0\text{.}\) Let's do this by replacing every occurrence of \(x\) in the sum with \(x+1\text{.}\) Then, \(x\) will run from \(0\) to \(n-1\text{.}\) When \(x=0\text{,}\) \(x+1=1\text{,}\) and when \(x=n-1\text{,}\) \(x+1=n\text{,}\) so the sum still runs over the same set of values. We are re-indexing the sum to make it easier to manipulate.
Doing this put an extra \(p\) in the sum, but we can pull it through just like we did with the \(n\) a moment ago.
Next, observe that the function
is the pmf of a random variable that follows a \(Bin(n-1,p)\) distribution. No matter the parameters, the sum of a pmf over its support must equal 1! Therefore, we can skip calculating this sum by making this observation:
This completes the proof.