act

advertisement
Stat 401 Lab2 Activity
Oct. 18, 2004
Fall 2004
1. Plotting a Probability Density Function.
We will plot normal pdf’s through Minitab. Other pdf’s can be plotted similarly.
a) Generate data from -3.4 to 3.4 in steps of 0.01:
Calc>Make Patterned Data>Simple Set of Numbers> Store Patterned Data in “C1”; from
first value “-3.4”; to last value “4.3”; in step of “0.01”, OK.
b) Find the value of the probability density function of N(0,1) for each entry in C1:
Calc> Probability Distributions > Normal> check “Probability Density”; fill “0” and “1”
for Mean and Standard Deviation; put “C1” and “C2” for Input column and Optional
storage, click OK.
c) Do a scatter plot (with Connect Line) of C1 as X and C2 as Y.
Next we will superimpose the plot of the pdf of N(0,1/16) to that of the pdf of N(0,1).
Note that N(0,1/16) is the pdf of the sample mean of a sample of size n=16 from a N(0,1)
population.
d) Repeat last step, except change “1” to “0.25” for Standard Deviation and “C3” for
Optional storage.
e) Graph> ScatterPlot > With Connected Line> input “C2” and “C1” under Y and X in
the first row, and input “C3” and “C1” under Y and X in the second row; Click Multiple
Graphs, under Show Pairs of Graph Variables, select “Overlaid on the same graph”.
OK, OK.
2. The Sampling Distribution of the Sample Mean and Sample Variance.
We generate 100 samples with sample size 10 from normal distribution with mean 0 and
variance 1, and find the sample mean and sample variance for each sample. This amounts
to generating random numbers from the sampling distribution of the sample mean and
sample variance. Histograms and probability plots can then be used to check the known
facts about the distribution of the sample mean and sample variance. We begin by
generating random numbers from the sampling distribution of X .
First generate 100 samples of size 10:
Calc> Random Data> Normal> Generate “10” rows of data; Store in columns: “C1C100”, with mean =1 and Standard deviation =1. OK.
Next find the sample means for the 100 samples and store them in a column. This is done
in two steps. The first is:
Data> Stack > Columns> Stack the following columns: “C1-C100”; under Store stacked
data in: select Column of current worksheet and fill “Data”, Store subscripts in “Sample”.
Thus all 100 samples (each with size 10 so a total of 1000 observations) are “stacked” in
column C101, and C102-T contains information as to which sample the observation in
the corresponding row of C101 came from.
The second step actually finds the 100 sample means and stores them:
Stat> Basic Statistics> Store Descriptive Statistics> select “Data” and “Sample” for
Variables and By variables (optional); click Statistics, select “Mean”. OK, OK.
Then columns C103-T, C104 and C105 show: the sample number, sample means X to
that certain sample, and sample size.
Check the normality of sample means.
a. Histogram
b. Probability Plot.
Graph> Probability Plots> Select “Single”> Select “C104 Mean1” for Graph variable;
click Distribution> select “Normal” under distribution; 0 and 0.31628 for Mean and
StDev. OK, OK.
We next generate random numbers from the sampling distribution of the sample variance.
We do this by calculating the sample variance of each of the 100 samples of size 10 and
storing them in a column. A histogram and probability plot can be used to check the facts
about the sampling distribution of the sample variance. The basic fact is that for a sample
of size n from a normal distribution,
(n  1) S 2

2
~  n21
For samples of size n=10, which is what we,
(n  1) S 2

2

10  1S 2

2
~  92
Moreover, in our case the population variance equals 1.
Let’s find 100 sample variances and compare with Chi-square distribution.
Repeat part 2 except 2 changes:
 Stat> Basic Statistics> Store Descriptive Statistics> select “Data” and “Sample” for
Variables and By variables (optional); click Statistics, select “Variance”. OK, OK.
 Probability Plot.
Graph> Probability Plots> Select “Single”> Select “Variance2” for Graph variable;
click Distribution> select “Gamma” under distribution; 4.5 and 2 for Shape and Scale.
OK, OK.
3. Finding Probabilities and Population Percentiles with Minitab.
Find normal percentile:
Input 0.950, 0.975, 0.990, 0.995 to C1.
Calc> Probability Distributions> Normal> Select “Inverse cumulative probability”; fill “0
and 1” for Mean and Standard Deviation; select “C1” and “C2” for Input column and
Optional Storage.
You also can select “Cumulative probability” to find the corresponding cumulative
probability.
Download