5.4 - Binomial Random Variable

Printer-friendly version

Binomial random variable: A specific type of discrete random variable that counts how often a particular event occurs in a fixed number of tries or trials

For a variable to be a binomial random variable, ALL of the following conditions must be met:

1. There are a fixed number of trials (a fixed sample size)
2. On each trial, the event of interest either occurs or does not
3. The probability of occurrence (or not) is the same on each trial
4. Trials are independent of one another

Examples of Binomial Random Variables

• Number of correct guesses at 30 true-false questions when you randomly guess all answers
• Number of winning lottery tickets when you buy 10 tickets of the same kind
• Number of left-handers in a randomly selected sample of 100 unrelated people
• Number of tails when flipping a coin 10 times

Notation

n = number of trials

p = probability event of interest occurs on any one trial

Example

Number of correct guesses at 30 true-false questions when you randomly guess all answers
There are 30 trials, therefore n = 30
There are two possible outcomes (true and false) that are equally probable, therefore p = 1/2 = .5

Probabilities for Binomial Random Variables

The conditions for being a binomial variable lead to a somewhat complicated formula for finding the probability any specific value occurs (such as the probability you get 20 right when you guess as 30 True-False questions.)

We'll use Minitab Express to find probabilities for binomial random variables. However, for those of you who are curious, the by hand formula for the probability of getting a specific outcome in a binomial experiment is:

Binomial Random Variable Probability

$P(x)= \frac {n!}{x!(n-x)!} p^x (1-p)^{n-x}$

n = number of trials
x = number of successes
p = probability event of interest occurs on any one trial

! is the symbol for factorial. For a review of factorials, see the course algebra review page.

One can use the formula to find the probability or alternatively, use Minitab Express to find the probability. In the homework, you may use the method that you are more comfortable with unless specified otherwise.

In the following Minitab Express example we will find P(x) for n = 20, x =3, and p = 0.4

To calculate binomial random variable probabilities in Minitab:

1. Open Minitab without data.
2. From the menu bar select Calc > Probability Distributions > Binomial.
3. Choose Probability since we want to find the probability x = 3.
4. Enter 20 in the text box for number of trials.
5. Enter 0.4 in the text box for probability of success (note for Minitab versions over 14 this now labeled event probability).
6. Since we do not have a column of data select the radio button for Input Constant and enter 3.
7. Click Ok.

Minitab output:

Probability Density Function

Binomial with n = 20 and p = 0.4

 x P(X = x) 3.00 0.0123

Video Review

To calculate binomial random variable probabilities in Minitab Express:

1. Open Minitab Express without data.
2. From the menu bar, select Statistics > Probability Distributions > CDF/PDF > Probability (PDF).
3. Since we want to find the probability that x = 3, enter 3 into the "Value" box
4. In the "Distribution" drop down menu, select Binomial.
5. Enter 20 into the "Number of trials" box, and 0.4 into the "Event probability" box.
6. Select "Display a table of probability density values" to show the output.
7. Click Ok

The result should be the following output:

Video Review

In the following example, we illustrate how to use the formula to compute binomial probabilities by hand. If you don't like to use the formula, you can also use Minitab Express to find the probabilities.

Example

Red Flowers

Cross-fertilizing a red and a white flower produces red flowers 25% of the time. Now we cross-fertilize five pairs of red and white flowers and produce five offspring. Find the probability that there will be no red flowered plants in the five offspring.

X = # of red flowered plants in the five offspring.

The number of red flowered plants has a binomial distribution with n = 5, p = .25

$$P(X=0)=\frac{5!}{0!(5-0)!} .25 ^0 (1- .25)^5 =1 \times .25^0 \times .75^5 =.237$$

There is a 23.7% chance that none of the five plants will be red flowered.

Cumulative probability: Likelihood that a certain number of successes or fewer will occur.

Binomial random variable probabilities are mutually exclusive, therefore we can use the addition rule that we learned in Lesson 4.

Example

Red Flowers, cont.

Continuing with the red flowers example, what if we wanted to know the probability that there would be one or fewer red flowered plants?

\begin{align}
P(X\ is\ 1\ or\ less)&=P(X=0)+P(X=1)\\
&= \frac{5!}{0!(5-0)!} .25^0 (1-.25)^5+\frac{5!}{1!(5-1)!} .25^1 (1-.25)^4\\
& = .237 +.395=.632 \\
\end{align}

There is a 63.2% chance that one or fewer of the five plants will be red flowered.

In the red flowers example, we first computed P(X = x) and then P(X ≤ x). This latter expression is called finding a cumulative probability because you are finding the probability that has accumulated from the minimum to some point, i.e. from 0 to 1 in this example

To use Minitab Express to solve a cumulative probability binomial problem, return to Statistics > Probability Distributions> CDF/PDF > Cumulative Distribution Function (CDF). For Value enter 1. For distribution select the binomial. There are 5 trials and the event probability is .25

To use Minitab to solve a cumulative probability binomial problem, return to Calc > Probability Distributions > Binomial as shown above. Now however, select the radio button for Cumulative Probability. For Number of Trials enter 5 and the event probability is .25. Click the radio button for Input Constant and enter the x value of 1.

Expected Value and Standard Deviation for Binomial Random Variable

The formula given earlier for discrete random variables could be used, but the good news is that for binomial random variables a shortcut formula for expected value (the mean) and standard deviation can also be used.

Binomial Random Variable Formulas

$\mu=np$

$\sigma=\sqrt {np(1-p)}$

n = number of trials
p = probability event of interest occurs on any one trial

After you use this formula a couple of times, you'll realize this formula matches your intuition. For instance, the “expected” number of correct (random) guesses at 30 True-False questions is np = (30)(.5) = 15 (half of the questions). For a fair six-sided die rolled 60 times, the expected value of the number of times a “1” is tossed is np = (60)(1/6) = 10.

The standard deviations for these would be, for the True-False test, $$\sigma=\sqrt{30 (0.5) (1-0.5)}=\sqrt{7.5}=2.74$$, and for the die, $$\sigma=\sqrt{60 \left( \frac{1}{6}\right) \left(1-\frac {1}{6}\right)}=\sqrt{ \frac{50}{6}}=2.89$$.

Example

Roulette

A roulette wheel has 38 slots, 18 are red, 18 are black, and 2 are green.You play five games and always bet on red.

How many games can you expect to win?

Recall, you play five games and always bet on red.  $$n=5$$ and $$p=\frac{red \;slots}{total \;slots}=\frac{18}{38}$$

$$\mu=np=5 \left( \frac{18}{38}=2.3684\right)$$

$$\sigma=\sqrt{np(1-p)}=\sqrt{5\left(\frac{18}{38} \right) \left(1-\frac{18}{38}\right)}=1.1165$$

Out of 5 games, you can expect to win 2.3684 (with a standard deviation of 1.1165).

What is the probability that you will win all five games?

$$P(x)= \frac {n!}{x!(n-x)!} p^x (1-p)^{n-x}$$

$$P(X=5)= \frac {5!}{5!(5-5)!}\left( \frac{18}{38} \right)^5 \left(1-\frac{18}{38}\right)^{5-5}$$

$$P(X=5)=\frac{5!}{5!0!} \left(.4737^{5}\right) .5263^{0} = 1(.0238)(1)=.0238$$

There is a 2.38% chance that you will win all five out of five games.

If you win three or more games, you make a profit. If you win two or fewer games, you lose money. What is the probability that you will win no more than two games?

$$P(X\leq 2)=P(X=0)+P(X=1)+P(X=2)$$

$$P(X=0)=\frac {5!}{0!(5-0)!} \left ( \frac{18}{38} \right )^0\left(1-\frac{18}{38}\right)^{5-0}=.0404$$

$$P(X=1)=\frac {5!}{1!(5-1)!} \left ( \frac{18}{38} \right )^1\left(1-\frac{18}{38}\right)^{5-1}=.1817$$

$$P(X=2)=\frac {5!}{2!(5-2)!} \left ( \frac{18}{38} \right )^2\left(1-\frac{18}{38}\right)^{5-2}=.3271$$

$$P(X\leq 2)=.0404+.1817+.3271=.5493$$

There is a 54.93% chance that you will win no more than two games. In other words, there is a 54.93% chance that you will lose money.

Video Review: Working with Binomial Random Variables

Binomial Random Variable: Flipping a Coin Example

A fair coin is flipped 10 times. This example is used to demonstrate calculations concerning binomial random variables. Hand calculations are performed and Minitab Express is used.

Binomial Random Variable: Guessing on a Multiple Choice Quiz Example

A class is taking a multiple choice quiz. There are 6 questions, each with 4 options. The professor accidently brought a quiz from a different, much more advanced class. All students randomly guess on each item. This is a binomial random variable. We compute the mean and standard deviation by hand. We compute the probability that a student will pass (i.e., at least 60%), the probability that they will get all questions incorrect, and the probability that they will get all questions correct all using Minitab Express.