Download Lab 4

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

Inductive probability wikipedia , lookup

Foundations of statistics wikipedia , lookup

Bootstrapping (statistics) wikipedia , lookup

History of statistics wikipedia , lookup

Taylor's law wikipedia , lookup

Student's t-test wikipedia , lookup

Gibbs sampling wikipedia , lookup

Transcript
MATH 214 Lab 4: Discrete Random variables
In this lab we will be examining different types of distributions and random samples from these
distributions.
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 you will first explore the theoretical distribution, then select several random
samples from corresponding distribution and see what happens as we change sample size.
Part I
A.
We begin by looking at a discrete uniform distribution; i.e., each integer between a and b
is equally likely to be selected. Generate the probability distribution function for the discrete
uniform distribution for a = 1 and b = 30.
Store the integers 1-30 in the column Uniform Values 1
→ Calc → Make Patterned Data → Simple Set of Numbers
→ → Uniform Values in the Store window
Type 1 in the “From First Value” window
Type 30 in the “To Last Value” window → OK
Store the discrete uniform probabilities 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” window
→ Type 30 in the “Maximum Value” window
→ → Uniform Values in the “Input Column” window
Type “Uniform probability 1” in the Optional Storage window → OK
Repeat the above but this time use “step of 5” when storing integers in C2 (Uniform values 2)
and use “make patterned data” option to type 0.167 to 6 cells in column “Uniform probability 2”.
Now graph the two probability distribution functions
→Graph → Scatter plot
→ in Y window →→Uniform probability 1
→→Uniform Values 1 in the X window
Repeat for uniform probabilities and values in the next line
→ Multiple graphs → in separate panels of same graph → same Y
Use the graph to describe the distribution, paying careful attention to the shape and center.
Can you explain why dots are on different height for the two distributions?
B.
Select a random sample from the discrete uniform distribution.
Store a random sample of size 100 in the column Uniform Sample
→ Calc → Random Data → Integer
Type 100 in Generate Rows of Data window
→ Store in Columns Box→→Uniform Sample
→Minimum Value window, Type 1 →Maximum Value window, Type 30 →
OK
Construct Histogram for the sample in Uniform Sample
→ Graph, Histogram, etc.
What values are included in each class in the histogram?
C. Repeat Part B two more times.
Compare the histograms of the 3 samples to the graph of the theoretical distribution. How
well do the histograms resemble the theoretical distribution?
Part II.
Next, we study the binomial distribution with n = 50 and p = .3.
A. Generate the binomial probability distribution function and make the corresponding
graph.
→Graph → Probability Distribution plot → View Single
Choose Binomial in drop down window
Enter 50 in number of trials and 0.3 in event probability → OK
Describe the distribution, paying careful attention to the shape and measures of central
tendency (can you estimate mean and/or median).
B.
Generate a random sample 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
→ Sample → Calc → Random Data → Binomial
Type 100 in the Generate Rows of Data
→→B Sample in the Store in Columns window
Type 50 in the Number of Trials window
Type .6 in the Probability of Success window → OK
Construct histogram for the sample in B Sample. To more easily compare your
histogram to the graph of the theoretical distribution, make sure that the locations
of the bars of the histogram coincide with the locations of the bars in the chart of
the theoretical distribution.
C.
Repeat part B two more times from a binomial distribution with n = 50 and p = 0.6.
Compare the graphs of the three samples to the graph of the theoretical distribution.
How well do the histograms resemble the distribution?
Part III.
Consider the Poisson distribution with λ = 3. Find in a textbook or online description and/or
formula of Poisson distribution.
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. We will ignore values larger than
25.
Generate the Poisson probability distribution function and make the
corresponding graph.
→Graph → Probability Distribution plot →View Single
Choose Poisson in drop down window
Enter 3 in mean window → OK
Describe the distribution paying careful attention to the shape and measures of central
tendency (can you guess values of mean and/or median).
B.
Generate random samples of size 100 from the Poisson distribution with mean 3 and
store the random sample in column P Sample
→ Calc→ Random Data → Poisson
Type 100 in the Generate Rows of Data window
→→P Sample in the Store window, Type 3 in the Mean window → OK
Construct the histogram for this sample.
C.
Repeat Part B two more times.
Compare the graphs of the three samples to the graph of the theoretical distribution.
How well do the histograms resemble the distribution?
Part IV.
Drawing conclusions about population from a sample.
Download the Samples.mtw file from the Labs page to your P drive; here you will find six data
sets. These data sets were generated by selecting random samples from the 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.
For each of the data sets create a histogram. Using these histograms and the probability
distribution functions (histograms) you generated earlier, try to classify each data set as a
sample from binomial, uniform, or Poisson. 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
mean and standard deviation.
Part V.
The number of data points in your data set probably affects your ability to identify the theoretical
distribution. Create some examples that show how increasing and decreasing the number of data
points affects your ability to identify a binomial distribution. I would suggest creating a new
worksheet, label 4 to 5 columns as Sample 1, Sample 2, … and then generate binomial data
samples for each column using a different number of points for each (but keep the number of
trials and probability of a success the same in each case). Make sure that you use very small
samples (say of size 10) and very large samples (say of size 1000 or 10000). Graph them all on
the same graph. Or group samples
Part VI
Applications.
For each random variable family (uniform, binomial, and Poisson) in today’s lab, find (in the
textbook or make one up) a realistic example of such a variable. Also use Minitab to calculate
probability for your example of the form: P(0.5 < X < 3.7) and interpret the probability. Your
values might be different from 0.5 and 3.7; pick some that seem reasonable for your random
variable.
→ Graph → Probability Distribution plot → View Probability
Choose the corresponding probability and its characteristics, switch to
shaded area
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