<< Chapter < Page Chapter >> Page >
Basic directions on exploring distributions.

Discrete and continuous random variables using spreadsheets

In this section we will discuss techniques using spreadsheet for exploring discrete and continuous variables particularly, creating probability tables, calculating the binomial probability functions, and then graphing probabilities.

Creating probability tables

If you are generating your data and have your outcomes, or if you know the probabilities of the outcomes you can generate a table of probabilities by using a formula. You will create a three column table with the “possible outcomes” in the first column, the probability of that outcome in the second column, and in the third column you will create the formula multiplying column one by column two or the “expected value”. Using the example in the book on finding the expected value of the number of times a baby’s crying will wakes its mother after midnight. The data below is from a sample of 50 mothers’ responses to the question how many times did your baby’s crying awake you after midnight? 2 mothers said “0” times, 11 mothers said “1” time, 23 mothers said “2” times, 9 mothers said “3” times, 4 mothers said “4” times, 1 mother said “5” times,

Number of times baby’s cry awoke mother after midnight

Number of Mothers who selected
0 P( x =0) = 2/50
1 P( x =1) = 11/50
2 P( x =2) = 23/50
3 P( x =3) = 9/50
4 P( x =4) = 4/50
5 P( x =5) = 1/50

Using the formulas shown in the google spreadsheet below you can calculate the expected value and create a chart of probabilities.

Calculating the binomial probability function

Both Excel and Google Spreadsheet will calculate Binomial Probability functions. The Excel formula for a particular value is =BINOM.DIST(x of successes , sample size , probability of success,false) for a cumulative probability it is =BINOM.DIST(x of successes , sample size , probability of success,true) The Google Spreadsheet formula is given below in the spreadsheet. The setup is the same but there isn’t a “period between binom and dist. The other difference is that instead of using true and false for cumulative probability, Google uses 0 for false and 1 for true. Using the example problem from the book: It has been stated that about 41% of adult workers have a high school diploma but do not pursue any further education. If 20 adult workers are randomly selected, find the probability that at most 12 of them have a high school diploma but do not pursue any further education. How many adult workers do you expect to have a high school diploma but do not pursue any further education?

Note that the answer to the question is asking for a cumulative frequency for 12 or less people out of the sample of twenty. The answer is in column C, row 14, .9738. We would expect that out of a sample size of 20 people a probability of 97.38% that 12 or less people would have a high school diploma and did not pursue further education.

To graph probability functions, we have found that “Statistics Online Computational Resources (SOCR)” has a wonderful site with tools for statistics. If you go to http://socr.ucla.edu/htmls/SOCR_Distributions.html in the dropdown menu for SOCR distribution you will find many types of distributions. For the example we just completed you would use Binomial Distribution; set the number of trials to 20 and the success probability to .41 (as stated in the problem and the following image will appear. Everything you would want to know.

Continuous uniform distributions and normal distributions:

This same tool can be used to generate continuous uniform distributions, and normal distributions. For continuous uniform distributions you will need to know and enter the lower and upper limits of the data plus the range of data that you wish to calculate the probability. In the example below I have used the problem from the book: Suppose we want to find the area between f(x) = 1/20 and the x-axis where 4<x<15 the following image would be produced with the Red shaded density (probability) = 0.55

For a normal distribution, you will need to have your mean and standard deviation and again your right and left cut off values. Replicating Figure 5.3 in your text, I would use 0 as the mean, 1 as the standard deviation and 1 as my left cut off and 2 as my right cut off. See below. I now have the density or probability for a value between 1 and 2 (0.125905)

Optional classroom exercise:

At your computer, try to use some of these tools to work out homework problems or check homework that you have completed to see if the results are the same or similar.

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Collaborative statistics using spreadsheets. OpenStax CNX. Jan 05, 2016 Download for free at http://legacy.cnx.org/content/col11521/1.23
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Collaborative statistics using spreadsheets' conversation and receive update notifications?

Ask