Statistics 23,  Class Example 3

This is a step by step solution, using Excel.  It shows how to calculate Binomial probabilities.
 

General Setting:  For X ~ Binomial(5, 0.1),  i.e. n = 5,  p = 0.1,
 



Part(a):    Find P(X = 2)

First set things up.  Here is an Excel spreadsheet that has the basics typed in just as text (for easy viewing), with the highlighted field ready to receive the answer.

 

To paste the desired Binomial Probability into the highlighted field, use "Insert"  "function" (note: there may be a shortcut button on your toolbar, which avoids so much "wading through menus", look for the "f sub x" button), to get to the "Paste Function" menu:

and highlight things as shown.

Click "OK" to pull up the "BINOMDIST Function Menu":

Enter numbers as shown here.  Note the correspondences:

In Class:                    Menu:
    x                      Number_s
                         Trials
    p                      Probability_s

The purpose of the Cumulative field is discussed below in part (b), but typing "false" works for now.  Later you may forget what you are supposed to put in a field, so note that when you put the cursor in each one, you get an explanation about what should go there below.
 

Click "OK" to put the answer into the spreadsheet:

 
 
 



Part (b):    Find P(X<=2)

Here you want to calculate:   P(X<=2) = P(X=0) + P(X=1) + P(X=2).  One way to do this would be to get say a column of Binomial probabilities, and then sum them.

You may want to experiment with getting a column of binomial probabilities, using something like the above steps, but first creating a column somewhere with the desired values x = 0,1,2.  The fill out the "BINOMDIST Function Menu" as above, but replace the Number_s filed with suitable references to your numbers.  Finally sum the result.

But we want to do this so often, that Excel provides a "shortcut", which is the purpose of the Cumulative field in the "BINOMDIST Function Menu".  This time fill that out as:

Click "OK" to get:

Note that "cumulative" means "sum everything up to and including the given value".  Other types of probabilities are calculated by using the cumulative probabilities in slightly different ways, as shown in the next parts.
 
 



Part (c):    Find P(X>=2)

Here the cumulative probability gives the sum in the "wrong direction".  You could solve this problem by just doing a sum of a column of probabilities.  But that gets tedious, and becomes very painful for bigger problems.

Instead solve this using the cumulative function, together with the "not" rule for calculating probabilities:

P(X>=2) = 1 - P(not X>=2) = 1 - P(X<2) = 1 - P(X<=1)

Note, the last step was made because that cumulative function works in terms of "<=", not "<".

Put this into Excel (here it is probably easier to copy and modify the field for Part (b), that appears in the space just above the cells, than to go through the menus), to get:

 
 
 



Part (d):    Find P(1<=X<3)

Here again a little bit of work is required to put this into the right form to use the "cumulative", but for harder problems to come it is well worth doing this:

P(1<=X<3) = P(X<=2) - P(X<=0)

(again the big idea is to write everything in terms of "<=", since that is what Excel can handle).

Now each of these, and their difference, is easily calculated in Excel as:

 
 
 



 

Back to Stat 23 Home Page
 

Back to Marron's Home Page