Binomial Random Variable

Printer-friendly versionPrinter-friendly version

This is a specific type of discrete random variable. A binomial random variable 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:

  • There are a fixed number of trials (a fixed sample size).
  • On each trial, the event of interest either occurs or does not.
  • The probability of occurrence (or not) is the same on each trial.
  • 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

Notation

n = number of trials (sample size)

 p = probability event of interest occurs on any one trial

Example : For the guessing at true questions example above, n = 30 and p = .5 (chance of getting any one question right).

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 20 True-False questions.)

We'll use Minitab to find probabilities for binomial random variables. Don't worry about the “by hand” formula. 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:

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

Evaluating the Binomial Distribution

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

Find P(x) for n = 20, x =3, and π = 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.

The window in Minitab to calculate the probability with binomial distribution

Minitab output:

Probability Density Function

Binomial with n = 20 and p = 0.4

x
P(X = x)
3.00
0.0123

watch!

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:

minitab express output of binomial probabilities

watch!

 

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

Example by hand: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:

a. There will be no red flowered plants in the five offspring.

X = # of red flowered plants in the five offspring. Here, the number of red flowered plants has a binomial distribution with n = 5, p = 0.25.

\(P(X=0)=\frac{5!}{0!(5-0)!} p^0 (1-p)^5 =1 \times 0.25^0 \times 0.75^5 =0.237\)

b. Cumulative Probability There will less than two red flowered plants.

Answer:

\begin{align}
P(X\ is\ 1\ or\ less)&=P(X=0)+P(X=1)\\
&= \frac{5!}{0!(5-0)!} 0.25^0 (1-0.25)^5+\frac{5!}{1!(5-1)!} 0.25^1 (1-0.25)^4\\
& = 0.237 +0.395=0.632 \\
\end{align}

In the previous example, part a was finding the P(X = x) and part b was finding 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 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 and then enter the respective Number of Trials (i.e. 5), Event Probability (i.e. 0.25), and click the radio button for Input Constant and enter the x-value (i.e. 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 are:

\(Expected\ Value=np\)    \(Standard\ Deviation=\sqrt {np(1-p)}\)

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 deviation for both of these would be, for the True-False test 

\(\sqrt{30 \times 0.5 \times (1-0.5)}=\sqrt{7.5}=2.74\) 

and for the die

\(\sqrt{60 \times \frac{1}{6}\times (1-\frac {1}{6})}=\sqrt{ \frac{50}{6}}=2.89\)