Stat 401B Lab 1

advertisement
Stat 401B
Lab 1
1
Overview
In this lab you will be introduced to the statistical software package JMP (pronounced “jump”)
and some of its features. For this lab you need to be sitting in front of a Macintosh or Windows
PC that has both an Internet connection and JMP software.
Why use JMP?
JMP is designed to enable users to perform statistical analyses correctly with graphical displays
that aid data analysis. There are other statistical software packages (including Minitab, SYSTAT,
Stata, SPSS, and Splus), but after a competitive review, JMP was chosen to be the campus-wide
package for introductory statistics courses at ISU. JMP should be available at any computer lab
on campus and can be down-loaded free from Scout if you are a registered student. The computer
data-analysis skills you develop using JMP are easily transferable to other packages you might use
later in your academic or professional career.
Computer Exercises
The objective for these exercises is to introduce JMP’s Analyze → Distribution platform for analyzing
univariate data.
1. JMP is installed with several sample data files. One of these sample data files is called
‘abrasion.jmp’. This file will be used to introduce JMP’s Analyze → Distribution platform.
(Find and open this file in JMP.)
2. This file contains a sample of 40 abrasion (wear) values for parts from a production line.
3. Select the Abrasion column and choose Column Info from the Cols menu. (You can also
Right-Click (Windows) or Control-Click (Mac) on the column name to get this dialog.) Here,
you can change the name, data type, modeling type, and format for this variable. During the
course of the semester we will see that the data type and modeling type are very important
in obtaining the correct output. For now, click OK to close the dialog.
4. From the Analyze menu, choose Distribution. In the resulting dialog, select the Abrasion
column and cast this column into the Y role (response variable role) by clicking the Y,
Columns button. Click OK to begin the analysis.
5. Depending on how the default preferences for JMP have been configured, your initial output
may vary. To select the specific graphical and numerical output you desire, use the pop-up
menu to the left of the variable name Abrasion (the menu is accessed by clicking the little red,
downward-pointing triangle next to the word Abrasion). This menu lets you select/deselect
the various univariate analysis items that JMP provides for the Abrasion variable. Note: If
you hold down the Alt (Windows) or Option (Mac) and then click on the red triangle, you will
get a dialog of options rather than a menu—this is easier if you plan to make many changes
to the display at once. Select/deselect available analysis items so that you end up with only:
• a histogram of Abrasion with a count axis and a horizontal layout
• an outlier box plot of Abrasion
• a Normal quantile plot of Abrasion
• quantiles, moments, and “more” moments for the Abrasion data
Stat 401B
Lab 1
2
6. The histogram and the box plot show, generally, how the Abrasion values are distributed
on the number line. One can Right(Windows)/Option(Mac)+Click on graphs and numerical
summaries to alter various display options associated with each. The Normal Quantile Plot
(also sometimes called the Normal Probability Plot) is used to investigate the Normality of
the data set.
7. The quantiles of the data set include the famous “five number summary” (max, upper quartile,
median, lower quartile, min). The moments include the sample average, sample standard
√
deviation (s), the standard error of the mean (s/ n), a 95% CI for the mean, and the sample
size (n). “More” moments gives you the sum of the observation weights (which is just n unless
you specify other weights in a second column), the sum of the observations, the variance (s 2 ),
the skewness, the kurtosis, and the coefficient of variation (CV).
8. You can obtain CIs other than 95% as well as tests of hypotheses with JMP’s Analyze →
Distribution platform also. From the pop-up menu, choose Confidence Interval and specify the
desired confidence (try 92%). The result is CIs for the population mean and the population
standard deviation. Also, choose Test Mean and enter a hypothesized value for the population
mean (try 137.5) to see if your sample supports this hypothesized value or not. The result is a
test statistic as well as the one-sided p−values and the two-sided p−value for the corresponding
hypothesis tests.
9. Another useful option is to divide the data according to a second, explanatory, variable.
For the Abrasion data, there are two shifts. To look at the shifts separately, go to Analyze
→ Distribution and cast Abrasion in the role of the response variable. Then cast Shift in the
role of a By variable. Click on OK. You should get two separate analyses, one for each shift.
For each Distribution choose Uniform Scaling and Stack.
10. Another way to compare the two shifts is with the Fit Y by X analysis. Choose Fit Y by X
from the Analyze pull-down. Cast Abrasion in the role of the Y, Response and Shift in the
role of the X factor. Note that Abrasion is a Continuous modeling type whereas Shift is a
Nominal modeling type. Click on OK. The output will be side-by-side dot plots. You can
change the display options to box plots and test for the difference between two shifts with
Means/ANOVA/pooled t.
11. Any output window can be printed but it cannot be saved. In order to save an output window,
you must first “journal” the output. This is done from the Edit pull down menu. Once a
JMP Journal is opened, every time you go to Edit → Journal, additional output is added to
the current journal. Be careful, JMP Journals can become very large with lots of stuff you
eventually will not use. A JMP Journal can contain the output of many analyses and be
saved in a word processor format (like *.rtf, Rich Text Format) or for the web (*.html). Try
the Journal command from the Edit menu. Also, try saving the journal (File→Save).
Download