The binomial distribution is, in essence, the probability distribution of the number of heads resulting from flipping a weighted coin multiple times. It is useful for analyzing the results of repeated independent trials, especially the probability of meeting a particular threshold given a specific error rate, and thus has applications to risk management. For this reason, the binomial distribution is also important in determining statistical significance.
A Bernoulli trial, or Bernoulli experiment, is an experiment satisfying two key properties:
- There are exactly two complementary outcomes, success and failure.
- The probability of success is the same every time the experiment is repeated.
A binomial experiment is a series of Bernoulli trials, whose outcomes are independent of each other. A random variable, , is defined as the number of successes in a binomial experiment. Finally, a binomial distribution is the probability distribution of .
For example, consider a fair coin. Flipping the coin once is a Bernoulli trial, since there are exactly two complementary outcomes (flipping a head and flipping a tail), and they are both no matter how many times the coin is flipped. Note that the fact that the coin is fair is not necessary; flipping a weighted coin is still a Bernoulli trial.
A binomial experiment might consist of flipping the coin 100 times, with the resulting number of heads being represented by the random variable . The binomial distribution of this experiment is the probability distribution of
Determining the binomial distribution is straightforward but computationally tedious. If there are Bernoulli trials, and each trial has a probability of success, then the probability of exactly successes is
This is written as , denoting the probability that the random variable is equal to , or as , denoting the binomial distribution with parameters and .
The above formula is derived from choosing exactly of the trials to result in successes, for which there are choices, then accounting for the fact that each of the trials marked for success has a probability of resulting in success, and each of the trials marked for failure has a probability of resulting in failure. The binomial coefficient lends its name to the binomial distribution.
Consider a weighted coin that flips heads with probability . If the coin is flipped 5 times, what is the resulting binomial distribution?
This binomial experiment consists of 5 trials, a -value of , and the number of successes is either 0, 1, 2, 3, 4, or 5. Therefore, the above formula applies directly:
It's worth noting that the most likely result is to flip one head, which is explored further below when discussing the mode of the distribution.
This can be represented pictorially, as in the following table:
There are several important values that give information about a particular probability distribution. The most important are as follows:
- The mean, or expected value, of a distribution gives useful information about what average one would expect from a large number of repeated trials.
- The median of a distribution is another measure of central tendency, useful when the distribution contains outliers (i.e. particularly large/small values) that make the mean misleading.
- The mode of a distribution is the value that has the highest probability of occurring.
- The variance of a distribution measures how "spread out" the data is. Related is the standard deviation, the square root of the variance, useful due to being in the same units as the data.
Three of these values--the mean, mode, and variance--are generally calculable for a binomial distribution. The median, however, is not generally determined.
The mean of a binomial distribution is intuitive:
The mean of is
In other words, if an unfair coin that flips heads with probability is flipped times, the expected result would be heads.
Let be random variables representing the Bernoulli trial with probability of success. Then , by definition. By linearity of expectation,
A similar strategy can be used to determine the variance:
The variance of is .
Since variance is additive, a similar proof to the above can be used:
since the variance of a single Bernoulli trial is .
The mode, however, is slightly more complicated. In most cases the mode is , but if is an integer, both and are modes. Additionally, in the trivial cases of and , the modes are 0 and respectively.
The mode of is
Daniel has a weighted coin that flips heads of the time and tails of the time. If he flips it times, the probability that it will show heads exactly times is greater than or equal to the probability that it will show heads exactly times, for all .
If the probability that the coin will show heads exactly times in flips is for positive coprime integers and , then find the last three digits of .
The binomial distribution is applicable to most situations in which a specific target result is known, by designating the target as "success" and anything other than the target as "failure." Here is an example:
A die is rolled 3 times. What is the probability that no sixes occur?
In this binomial experiment, rolling anything other than a 6 is a success and rolling a 6 is failure. Since there are three trials, the desired probability is
This could also be done by designating rolling a 6 as a success, and rolling anything else as failure. Then the desired probability would be
just as before.
The binomial distribution is also useful in analyzing a range of potential results, rather than just the probability of a specific one:
A manufacturer of widgets knows that 20% of the widgets he produces are defective. If he produces 10 widgets per day, what is the probability that at most two of them are defective?
In this binomial experiment, manufacturing a working widget is a success and manufacturing a defective widget is a failure. The manufacturer needs at least 8 successes, making the probability
This example also illustrates an important clash with intuition: generally, one would expect that an 80% success rate is appropriate when requiring 8 of 10 widgets to not be defective. However, the above calculation shows that an 80% success rate only results in at least 8 successes less than 68% of the time!
This calculation is especially important for a related reason: since the manufacturer knows his error rate and his quota, he can use the binomial distribution to determine how many widgets he must produce in order to earn a sufficiently high probability of meeting his quota of non-defective widgets.
Related to the final note of the last section, the binomial test is a method of testing for statistical significance. Most commonly, it is used to reject the null hypothesis of uniformity; for example, it can be used to show that a coin or die is unfair. In other words, it is used to show that the given data is unlikely under the assumption of fairness, so that the assumption is likely false.
A coin is flipped 100 times, and the results are 61 heads and 39 tails. Is the coin fair?
The null hypothesis is that the coin is fair, in which case the probability of flipping at least 61 heads is
Determining whether this result is statistically significant depends on the desired confidence level; this would be enough to reject the null hypothesis at the 5% level, but not the 1% one. As the most commonly used confidence level is the 5% one, this would generally be considered sufficient to conclude that the coin is unfair.