Download Lab 5: Discrete Random Variables

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

History of statistics wikipedia , lookup

Probability wikipedia , lookup

Statistics wikipedia , lookup

Transcript
MATH 214 Lab 4: Discrete Random Variables
In this lab we will be examining different types of theoretical probability distributions and random samples
generated from these distributions.
To start, label the columns in your Minitab worksheet as follows:
Old Name
C1
C2
C3
C4
C5
C6
C7
New Name
Uniform Values 1
Uniform probability 1
Uniform values 2
Uniform probability 2
Uniform sample
B Sample
P Sample
For each part that follows, you will first explore the theoretical distribution, then generate several random
samples from this distribution and investigate what happens as we change the sample size.
I.
A.
We begin by looking at a discrete uniform distribution on an interval [a, b]; i.e., each integer
between a and b is equally likely to be selected. The instructions below generate the probability
distribution function for the discrete uniform distribution for a = 1 and b = 30.
First store the integers 1-30 in the column “Uniform Values 1”:
→ Calc → Make Patterned Data → Simple Set of Numbers
→ → Uniform Values 1 in the “Store patterned data” field
Type 1 in the “From First Value” field
Type 30 in the “To Last Value” field → OK
Next generate the discrete uniform distribution for a = 1 and b = 30 and store the values in the column
“Uniform probability 1”:
→ Calc → Probability Distributions → Integer
→ Probability, so that the radio button next to it is filled
→ Type 1 in the “Minimum Value” field
→ Type 30 in the “Maximum Value” field
→ → Uniform Values in the “Input Column” field
→ → “Uniform probability 1” in the “Optional Storage” field → OK
(As a result, column C2—“Uniform Probability 1” contains the probability of randomly selecting any of
the integers from 1 to 30 based on the assumption that each integer has an equal chance of being
selected.)
Next, we do a similar procedure but with fewer integers and store results in columns C3 and C4:
Store the integers 1-30 in steps of 5 in the column “Uniform Values 2”:
→ Calc → Make Patterned Data → Simple Set of Numbers
→ → Uniform Values 2 in the “Store patterned data” field
Type 1 in the “From First Value” window
Type 30 in the “To Last Value” window
Type 5 in the “In steps of:” field → OK
Type 0.167 into the first 6 cells in column C4--“Uniform probability 2.”
(As a result, column C4—“Uniform Probability 2” contains the probability of randomly selecting one of
the integers 1, 6, 11, 16, 21, or 26 based on the assumption that each of them has an equal chance of
being selected.)
Now graph the two probability distribution functions together:
→Graph → Scatter plot→Simple
→ in Y field →→Uniform probability 1
→→Uniform Values 1 in the X field
Repeat with Uniform Probability 2 and Uniform Values 2 in the next line
→ Multiple graphs → in separate panels of same graph → same Y
Use the graphs to describe the distributions, paying careful attention to the measures of central tendency.
Can you explain why the dots are different heights for the two distributions?
B. Select three random samples of size 100 from the discrete uniform distribution.
In particular, store a random sample of size 100 in the column C5—“Uniform Sample”:
→ Calc → Random Data → Integer
Type 100 in the “Number of rows of data to generate” field
→ “Store in Column(s)” field→→Uniform Sample
→ “Minimum Value” field, Type 1 →“Maximum Value” field, Type 30 → OK
Construct a histogram for the sample in Uniform Sample:
→ Graph, Histogram, etc.
NOTE: Do the above a total of three times and generate a histogram each time, so you should have
three histograms of three different samples of size 100.
If you right click the upper left corner of the histogram, where you see a green check mark and arrow
cycle, you can select Automatic updates. The histogram will automatically update as soon as a new
sample fills the “Uniform Sample” column.
Be careful, though! Once that new sample is drawn, the
histogram cannot be recovered, so be sure to
Send the Histogram to MS Word BEFORE
selecting a new sample.
Which values are included in each class in the histograms?
C. Repeat Part B two more times, but generating samples of size 1000 and then 10,000.
Compare the histograms of the nine samples to the graph of the theoretical distribution. How well do
the histograms resemble the theoretical distribution?
II.
Next, we study the binomial distribution with n = 50 and p = .6.
A.
Generate a graph of the binomial probability distribution function:
→Graph → Probability Distribution plot → View Single
Choose the Binomial Distribution
Enter 50 in “Number of trials” field and 0.6 in “Event probability” → OK
Describe the distribution, paying careful attention to the measures of central tendency.
B.
Generate three random samples of size 100 from a binomial distribution with n = 50 and p = 0.6
Store a random sample of size 100 in the column B Sample:
→ Calc → Random Data → Binomial
Type 100 in the “Number of rows of data to generate” field
→→B Sample in the “Store in Columns” field
Type 50 in the “Number of trials” field
Type .6 in the “Event probability” field → OK
Construct a histogram for the sample in B Sample. To more easily compare your sample
histogram to the graph of the theoretical distribution, make sure that both graphs have the same
horizontal scale range and tick positions. (This can be accomplished by double-clicking the
histogram on a horizontal axis and making adjustments as needed.)
NOTE: Do the above a total of three times and generate a histogram each time, so you should have
three histograms of three different samples of size 100.
C.
Repeat part B two more times from a binomial distribution with n = 50 and p = 0.6, but
generating samples of size 1000 and then 10,000.
Compare the graphs of the nine samples to the graph of the theoretical distribution. How well do the
histograms resemble the distribution?
III.
Now, consider the Poisson distribution with λ = 10.
A.
The Poisson distribution is different from the previous distributions; it assigns probabilities to all
non-negative integers. But for large integers those probabilities are virtually 0, so in practice we
can ignore them. For this reason, we will ignore values larger than 25.
Generate a graph of the Poisson probability distribution function:
→Graph → Probability Distribution plot →View Single
Choose the Poisson Distribution
Enter 10 in the “Mean” field → OK
Describe the distribution, paying careful attention to the measures of central tendency.
B.
Generate three random samples of size 100 from the Poisson distribution with mean 10 and store
the random sample in column P Sample:
→ Calc→ Random Data → Poisson
Type 100 in the “Number of rows of data to generate” field
→→P Sample in the “Store in column(s)” field
Type 10 in the “Mean” field → OK
Construct the histogram for this sample. Again, to more easily compare your sample histogram
to the graph of the theoretical distribution, make sure that both graphs have the same horizontal
scale range and tick positions. (This can be accomplished by double-clicking the histogram on a
horizontal axis and making adjustments as needed.)
NOTE: Do the above a total of three times and generate a histogram each time, so you should have
three histograms of three different samples of size 100.
C.
Repeat Part B two more times, but generating samples of size 1000 and then 10,000.
Compare the graphs of the nine samples to the graph of the theoretical distribution. How well do the
histograms resemble the distribution?
IV.
Drawing conclusions about a population from a sample.
Open a worksheet containing six data sets: Samples.MTW (available on my website). These data sets
were generated by selecting random samples from a binomial, Poisson, or uniform distribution. Samples
1, 2, and 3 were selected from (not necessarily in this order):
a. a Discrete Uniform Distribution, on [0, 20], or
b. a Binomial Distribution, with n = 50 and p = .6, or
c. a Poisson Distribution, with λ = 10.
Samples 4, 5, and 6 were selected from (not necessarily in this order):
a. a Discrete Uniform Distribution, on [0, 20], or
b. a Binomial Distribution, with n = 20 and p = .6, or
c. a Poisson Distribution, with λ = 11.
Create a histogram for each of the data sets. Using these histograms and the probability distribution
functions you generated earlier, try to classify each data set as a sample from a binomial, uniform, or
Poisson distribution. Explain what led to your decision for each data set. You may also find it helpful to look
at the descriptive statistics of the samples, especially the mean and standard deviation.
V.
Applications: For each random variable family (uniform (integer), binomial, and Poisson) in today’s
lab, find a real life example of a random variable that is modeled by the probability distribution. You may think
one up yourself, or find one in a textbook. Clearly describe each example. Also, for each example, use Minitab
to calculate a probability of the form P(a < X < b). Pick values of a and b that seem reasonable for your random
variable example and interpret this probability. As an illustration, the following instructions show how to use
Minitab to calculate a probability of the form P(0.5 < X < 3.7):
→ Graph → Probability Distribution plot → View Probability
Choose the desired probability and its characteristics; click on the “Shaded Area” tab;
Check the radio button for X value and choose middle;
Enter 0.5 in “X value 1” and 3.7 in “X value 2” → OK