E-Learning
BackStatistics - The binomial distribution
Contents
Introduction
Consider the toss of a coin n times, we are interested to know how many heads we might get when the probability of getting heads in one toss is with (note that for or there is no game).
The binomial setting
To have a reference, we know that when , i.e., when there is only one trial the resulting distribution function must be:- Probability for heads:
- Probability for tails:
Now lets consider an experiment of (we toss a coin n times) where the probability for heads is and this probability remains constant through the experiment. We are interested in the probability of getting heads after the coin is tossed n times.
After each trial we will obtain a sequence of the form (heads, tails, heads, heads,...) where in each trial
- P(heads) = p
- P(tails) = 1 - p = q
As an guide to build the distribution lets consider 3 particular sequences for a 3 trials experiment:
- Sequence 1: (heads, heads, heads)
- Sequence 2: (heads, heads, tails)
- Sequence 3: (heads, tails, tails)
Because the trials are independent, the probability of getting these sequences are:
- P(3,3) = p·p·p = p3 = p3·q0
- P(3,2) = p·p·(1-p) = p2·(1-p) = p2·q1
- P(3,1) = p·(1-p)·(1-p) = p·(1-p)2 = p1·q2
Thus, the probability of a particular sequence is:
This probability depends only on the number of heads (or tails) in the sequence.
But there more than one sequences that contain the same number of heads (or tails) as can be seen when considering possible outcomes from our example as (heads, heads, tails), (heads, tails, heads), etc. All of these sequences belong to the same result, two heads and one tail. In general, the number of sequences that belong to one particular result (to obtain k heads after n tosses) is:

Where and
Therefore, the probability for all the sequences containing k heads after n tosses is equal to the total number of sequences with k heads after n tosses times the probability of obtaining k heads after n tosses of a coin:

Examples
Example 1. Here the numeric values and a histogram for the binomial distribution with and probability of heads :
| Number of heads (k) | Probability |
|---|---|
| 0 | 0.000104858 |
| 1 | 0.001572864 |
| 2 | 0.010616832 |
| 3 | 0.042467328 |
| 4 | 0.111476736 |
| 5 | 0.200658125 |
| 6 | 0.250822656 |
| 7 | 0.214990848 |
| 8 | 0.120932352 |
| 9 | 0.040310784 |
| 10 | 0.006046618 |
Example 2. Genetics says that an offspring independently receive genes from their parents. If both parents carry genes for the O and A blood types, each offspring has probability 0.25 of getting two O genes and so of having blood type O. The number N of O blood types among 5 children of these parents equal to the number of successes in 5 independent trials with probability 0.25. Therefore, N has the binomial distribution
| Offsprings with O blood type (k) | Probability |
|---|---|
| 0 | 0.2373046875 |
| 1 | 0.3955078125 |
| 2 | 0.2636718753 |
| 3 | 0.0878906250 |
| 4 | 0.0146484375 |
| 5 | 0.0009765625 |
Exercises
Exercise 1. Calculate the mean value of the binomial distribution .
By definition of main value, we want to calculate:

In order to calculate the main value (or average) for the binomial distribution we will use the following helper function:

Where the second equals sign comes from Newton's binomial theorem. We will proceed by calculating the derivative of H(s):

, but the derivative of H at s = 1 is the number we are looking for:

Therefore,

If we toss a coin 10 times when the probability of heads is , then we are expected to obtain a number of heads. How much the actual number would differ from 6 will be given by the standard deviation. It is left to the student to calculate this value (tip: use the second derivative of the helper function also called moment-generating function).


