12.07.2015 Views

Elementary Statistics Lab Assignment 8

Elementary Statistics Lab Assignment 8

Elementary Statistics Lab Assignment 8

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Elementary</strong> <strong>Statistics</strong><strong>Lab</strong> <strong>Assignment</strong> 8Due Thursday, April 8For lab assignment 8 you should work through the material on pages 93 to the middle of page 96.You should also work through the following two examples. When you need to make a histogram,you can use the QMB “Smart histogram” tool instead of the built-in Excel histogram tool.The Uniform DistributionUp to now we’ve only given one distribution a name: the normal distribution. Another “named”distribution is the uniform distribution. A random variable has a uniform distribution if it can takevalues only in some fixed, finite range, and the probability of choosing a value in some subrange isproportional to the length of the range. For example, Excel’s random number generator function,RAND(), has a uniform disribution over the range 0 to 1. So the probability of getting a valuein the subrange 0 to 0.5 is 0.5, and the probability of getting a value in the range 0.5 to 0.75 is0.25. The density function for a uniform random variable is a rectangle whose base is the rangeof possible values and whose height is chosen so that the total area of the rectangle is 1. So thedensity function for Excel’s RAND() function is a square with base extending from 0 to 1 and height1.Start by generating 1000 uniformly distributed values in the range 0 to 1. You can do thisby clicking on cell A1, typing in =RAND(), and then dragging the calculation down to cell A1000.(Instead of dragging down, you may find it useful to split the screen and use some of the trickswe talked about last week.) Now make a histogram of these data. Also compute the mean andstandard deviation. You should get a mean of about 0.5 and a standard deviation of about 0.2887.What happens if you take many samples from a uniform distribution and compute the meanof each sample? What will the distribution look like? Try this by using the random numbergeneration tool in the data analysis tools. This is much like the example you just worked throughfrom the text: choose 10 variables and 1000 random numbers. However, for the distribution, choose“uniform”, and for the range choose 0 to 1. You can leave the “random seed” blank.After you’ve generated your 1000 samples of size 10, compute the mean of each, and make ahistogram of the means. What does it look like? What is the mean of the sample means? What isthe standard deviation of the sample means? According to the central limit theorem, the mean ofthe sample means should be close to 0.5 and the standard deviation about 0.2887/ √ 10. Are thesetheoretical values close to the values you calculated for your 1000 samples?The Binomial DistributionA binomial random variable is a discrete random variable: it can only take on whole numbervalues in some fixed finite range. It counts the number of successes in some fixed number oftrials. The archetypal binomial experiment is to toss a coin a fixed number of times and count thenumber of heads. The number of successes or heads is a binomial random variable. In general theprobability of a success won’t be 0.5. So a general binomial random variable can be modelled bytossing an unfair coin — a coin for which the probability of a head isn’t 0.5.1


An important example of a binomial random variable comes from opinion polls. For example,suppose you take an SRS of 1000 registered voters and ask each one, “Do you approve of the jobPresident Bush is doing?” If the true fraction of the population who think President Bush is doinga good job is 0.47, then this is a binomial experiment with 1000 trials (the 1000 voters sampled)and probability of success 0.47 (the probability that a voter will think President Bush is doing agood job).Let’s look at a binomial experiment in which the probability of a success is relatively small, sothat we can see what happens when we sample from a skewed distribution. First generate 1000tosses of an unfair coin with probability of heads equal to 0.1. To do this, use the random numbergenerator in the analysis tools. Type in 1 variable and 1000 numbers. Pull down the menu fordistribution and select “binomial.” For p-value, enter 0.1, and for number of trials enter 1. Thiswill give 1000 values, about 10 percent 1 and about 90 percent 0. Make a histogram with two barsshowing the distribution of these values. What’s the mean? What’s the standard deviation?Now let’s “sample” the population, by generating 1000 samples of size 10. On another worksheet,go back to the random number generator. This time select 10 variables, 1000 numbers, anda binomial distribution with p-value 0.1 and 1 trial. (In case you’re wondering, our trials are the10 individual samples.)Find the mean of the number of 1’s in each sample, and make a histogram of these means. Doesthis distribution look normal?If you have any extra time, try repeating this problem with samples of size 100 instead ofsamples of size 10. How does this affect the distribution of the sample means?What to Turn InYou should turn in the following material.1. A copy of your histogram showing the distribution of the sample means from a normal distribution(similar to figure 10.3).2. A copy of your histogram showing the uniform distribution.3. A copy of your histogram showing the distribution of the means of the samples taken fromthe uniform distribution.4. A copy of your histogram showing the distribution of the number of successes in a binomialexperiment with p-value 0.1.5. A copy of your histogram showing the distribution of the means of the samples taken fromthe binomial distribution.2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!