The binomial probability model offers a simple but very useful model. An example of this model is the number of heads on 20 flips of a coin. This is certainly simple, but how about: The number of people answering yes to the question, "Do you like the way the president is doing his job?" Both of these are binomial. The second is of interest monthly (if not daily) in the US.
A binomial model is characterized by trials which either end in success (heads) or failure (tails). These are sometimes called Bernoulli trials .
Suppose we have n Bernoulli trials and p is the probability of success on a trial. Then this is a binomial model if
The binomial random variable , X, is just the number of successes in the n trials. Over the n trials, there could be one success, two successes, etc., up to n successes. So the range of X is the set {0, 1, 2, ... , n}. We will often write X is bin(n,p) , which is read "X is binomial n, p". We can determine (obtain an explicit formula) for the probability model of X.
For this class, we have written some class code to obtain these probabilities. An example will demonstrate it. Suppose we want the probability of getting 7 heads in ten flips of a fair coin. That is, X is bin(10,.5) and we want P( X = 7). In class code the input is:
P( X = k) P( X <= k) 0.1171875 0.9453125Hence, the probability of getting 7 heads in 10 flips of a fair coin is .1171875. Also, the probability of getting at most 7 heads in 10 flips of a fair coin is .9453125. At most 7 heads in 10 flips is the same event as 7 or less heads. These later probabilities will be useful.
As another example, suppose we have a fair spinner with the numbers 1 through 10 on it. Suppose success is a 1 or 2 or 3, while 4 through 10 are failures; i.e., we win if 3 or less is spun. Now suppose the spinner is spun six times. Let X be the number of times we win. Then X is bin(6,.3). Lets determine the distribution of X by using the probability module. It's easy. Our input is n=6, p = .3 and we let k vary from 0 through 6. Try it! You'll get (rounded to 4 places):
range: x 0 1 2 3 4 5 6 p(x) 0.1176 .3025 .3241 .1852 .0595 .0102 .0072Notice how the distribution peaks around 2 and then decreases. This will always happen for a binomial.
In general, for a bin(n,p) the probabilities of a binomial will increase until np and then decrease. The probability distribution will be symmetric if p = 1/2, skewed right if p < 1/2 and skewed left if p > 1/2. See the exercises for examples.
Further, the mean of a bin(n,p) is
and the variance is
.