When you flip a coin, there are two possible results: heads and tails. Each result has a fixed probability, the same from test to test. In the case of coins, heads and tails have the same probability of 1/2. More generally, there are situations where the coin is biased, so that heads and tails have different probabilities. In this section, we consider the probability distributions for which there are only two possible outcomes with fixed probabilities added to one. These distributions are called binomial distributions.
A simple example
The four possible results that could occur if you flip a coin twice are listed in Table 1. Note that the four results are equally likely: each has a probability of 1/4. To see this, note that coin flips are independent (neither affects the other). So, the probability of a head on flip 1 and a head on flip 2 is the product of P(H) and P(H), which is 1/2 x 1/2 = 1/4. This calculation applies to the probability of a head on Flip 1 and a tail on Flip 2. Each is 1/2 x 1/2 = 1/4.
Table 1. Four possible results.
|Outcome||First Flip||Second Flip|
First Flip First Flip First Flip Second Flip Result
1 Heads Heads
2 Tail Heads
3 Tail heads
The four possible results can be classified in terms of the number of heads that emerge. The number can be two (Result 1), one (Results 2 and 3) or 0 (Result 4). The probabilities of these possibilities are shown in Table 2 and Figure 1. Since two of the results represent the case where only one head appears in the two throws, the probability of this event is 1/4 + 1/4 = 1/2. Table 2 summarizes the situation.
Table 2. Probability of getting 0, 1 or 2 heads.
Getting 0, 1, or 2 Heads.
|Number of Heads||Probability|
Probability of the number of heads
Figure 1. Probability of 0, 1 and 2 heads.
Figure 1 shows a discrete probability distribution: it shows the probability for each of the values on the X-axis. By defining a head as “success”, Figure 1 shows the probability of 0, 1, and 2 successes for two tests (flips) for an event that has a probability of 0.5 to be a success on each test. Making Figure 1 a binomial distribution example.
The formula for binomial probabilities
The binomial distribution consists of the probability of each of the possible success numbers on N tests for independent events that each have a probability of occurrence π (the Greek letter pi). For the example of the coin toss, N = 2 and π = 0.5. The formula for the binomial distribution is shown below:
where P(x) is the probability of x successes of N trials, N is the number of trials, and π is the probability of success of a given trial. Applying this to the example of the coin toss,
If you flip a coin twice, what is the probability of getting one or more heads? Since the probability of getting exactly one head is 0.50 and the probability of getting exactly two heads is 0.25, the probability of getting one or more heads is 0.50 + 0.25 = 0.75.
Now let’s suppose the coin is biased. The probability of heads is only 0.4. What is the probability of getting heads at least once in two flips? Replacing the general formula above, you should get the answer .64.
We flip a coin 12 times. What is the probability of getting 0 to 3 heads? The answer is found by calculating the probability of getting exactly 0 heads, exactly 1 head, exactly 2 heads and exactly 3 heads. The probability of getting from 0 to 3 heads is then the sum of these probabilities. The probabilities are: 0.0002, 0.0029, 0.0161 and 0.0537. The sum of the probabilities is 0.073. The calculation of cumulative binomial probabilities can be rather boring. For this reason we have provided a binomial calculator to facilitate the calculation of these probabilities.
Mean and standard deviation of binomial distributions
Let’s consider a coin toss experiment in which you toss a coin 12 times and record the number of heads. If you perform this experiment over and over again, what would be the average number of heads? On average, you would expect half of the coin flips to come up with heads. So the average number of heads would be 6. In general, the average of a binomial distribution with the parameters N (the number of tests) and π (the probability of success of each test) is:
μ = Nπ
where μ is the average of the binomial distribution. The variance of the binomial distribution is:
σ2 = Nπ(1-π)
where σ2 is the variance of the binomial distribution.
Let’s go back to the coin-tossing experiment. The coin was flipped 12 times, so N = 12. A coin has a 0.5 chance of coming to terms. So, π = 0.5. The average and the variance can then be calculated as follows:
μ = Nπ = (12)(0.5) = 6
σ2 = Nπ(1-π) = (12)(0.5)(1.0 – 0.5) = 3.0.
Of course, the standard deviation (σ) is the square root of the variance (σ2).