## 8.2: Bernoulli Trials and Binomial Random Variables

Based on Section 8.2 in Finite Mathematics and Finite Mathematics and Applied Calculus ### Goodies ### The Binomial Random Variable

Note: To follow this tutorial, you need to know what a random variable is. Go to the previous tutorial to review that, if necessary.

In many experiments there are only two outcomes. For instance:

• Flip a coin.
• Take a penalty shot on goal.
• Test a randomly selected circuit to see whether it is defective.
• Roll a die and determine whether it is a 6 or not.
• Determine whether there was flooding this year at Laguna Beach.

We call such an experiment a Bernoulli trial, and refer to the two outcomes -- often arbitrarily -- as success and failure. We will be interested in what happens when we perform a sequence of independent Bernoulli trials. For our random variable X we will count the number of successes. For instance:

• Flip a coin 10 times; X = number of heads.
• Test 50 randomly selected circuits from an assembly line; X = number of defective circuits.
• Roll a die 100 times; X = number of sixes you throw.
• Provide a property in Laguna Beach with flood insurance for 20 years; X is the number of years, during the 20-year period, during which the property is flooded.
Such a random variable X is called a binomial random variable:

Q What about the shots on goal example?
A That depends. If the shooter is improving (or getting worse), then the probability of success is changing, and X is not a binomial random variable. For X to be a binomial random variable, we require that the probability of success for each trial be fixed and independent of what happened before.

Binomial Random Variable

A binomial random variable is a random variable that counts the number of successes in a sequence of independent Bernoulli trials with fixed probability of success. Examples include the ones listed above.

Now decide which of the following is a binomial random variable.

Throw two dice 10 times; X = the number of doubles. X is  binomial not binomial
A bag of marbles contains 10 red ones and 10 blue ones.
You draw 10 of them; X = the number of red ones. X is
 binomial not binomial

Q OK. Now I know what a binomial random variable is. How do we calculate its probability distribution?
A Calculating the probability distribution of X means calculating the following probabilities:

Probability Distribution of Binomial Random Variable

If X is the number of successes in a sequence of n independent Bernoulli trials, then

P(X = x) = C(n,x) pxqn-x
where
n = number of trials
p = probability of success
q = probability of failure = 1-p
Examples

1. What is the probability of getting heads exactly twice if you flip a fair coin 6 times?

x = number of successes = 2
n = number of trials = 6
p = probability of success = .5
q = probability of failure = 1-p = 1 - .5 = .5

Probability of getting 2 heads = P(X = 2) = C(6, 2) (.5)2(.5)6-2 = 15 .25 .0625 = .2344.

2. What is the probability of getting heads exactly 3 times if you flip a fair coin 6 times?

x = number of successes = 3
n = number of trials = 6
p = probability of success = .5
q = probability of failure = 1-p = 1 - .5 = .5

Probability of getting 3 heads = P(X = 3) = C(6, 3) (.5)3(.5)6-3 = 20 .125 .125 = .3125.

3. You are a telemarketer with a 10% chance of persuading a randomly selected person to switch to your long-distance company. You make 8 calls. What is the probability that exactly one is sucessful? (All answers should be accurate to 4 decimal places.)

 x = number of successes = n = number of trials = p = probability of success = q = probability of failure = 1-p = Probability of one success = P(X = 1) =

Using On-line Technology
To compute this and other probabilities using technology, try our On-line Binomial Distribution Utility.. To use to compute, say, P(X = 3), enter it as a range by tryping "3" in both slots:

P(  3 X 3
)

Top of Page

### The Binomial Probability Distribution & Further Calculations

Now that we know how to calculate individual probabilities of the form P(X = x), let us put them all together to obtain a probability distribution:

Example
Your name is Edison and you are an expert penalty goal shooter. your skill has been improved for the past 10 years, and now you are as good as you will ever be. Your success rate has been measured at 80%. Thus, p = .8 and q = .2. You take n = 6 shots on goal, so the possible values of X (the number of successes) are 0, 1, 2, 3, 4, 5, 6. Here is the probability for each value of X:

P(X = 0) = C(6, 0) (.8)0(.2)6 = 1 1 .000064 = .000064
P(X = 1) = C(6, 1) (.8)1(.2)5 = 6 .8 .00032 = .001536
P(X = 2) = C(6, 2) (.8)2(.2)4 = 15 .64 .0016 = .01536
P(X = 3) = C(6, 3) (.8)3(.2)3 = 20 .512 .008 = .08192
P(X = 4) = C(6, 4) (.8)4(.2)2 = 15 .4096 .04 = .24576
P(X = 5) = C(6, 5) (.8)5(.2)1 = 6 .32768 .2 = .393216
P(X = 6) = C(6, 6) (.8)6(.2)0 = 6 .262144 1 = .262144
Putting them all together gives the probability distribution for X:
 x 0 1 2 3 4 5 6 P(X = x) 6.4e-05 0.001536 0.01536 0.08192 0.24576 0.393216 0.262144

We can use the probability distribution to find the probability that X is in a given range by adding the individual probabilities. (You can also use the On-line Binomial Distribution Utility to compute them.) For instance:

 Probability of at least 5 successes = P(5 X 6) = P(X = 5) + P(X = 6) = .393216 + .262144 = .65536 (or a 65.5% chance) Probability of at most 2 successes = P(0 X 2) = P(X = 0) + P(X = 1) + P(X = 2) = .000064 + .001536 + .01536 = .01696 (or a 1.7% chance) Probability of at least 3 successes = P(3 X 6) = 1 - Probability of at most 2 successes Since "at most 2 successes" and "at least 3 successes" are complementary events. = 1 - .01696 = .98304 We used the previous answer, and that was a easier than adding P(X = 3), P(X = 4), P(X = 5), and P(X = 6)
Now some for you to compute. Answers should be accurate to at least 4 decimal places. (You could try the On-line Binomial Distribution Utility, but it won't really tell you what is going on.) Here is the probability distribution again:

 x 0 1 2 3 4 5 6 P(X = x) 6.4e-05 0.001536 0.01536 0.08192 0.24576 0.393216 0.262144

 P(2 X 3) = P(X 1) = Probability of at most 1 success = Probability of at least 2 successes = Now try some of the exercises in Section 8.2 of Finite Mathematics and Finite Mathematics and Applied Calculus

Top of Page Last Updated: November, 2003