Stat 301 Lab 1
Overview
In this lab you will be introduced to the statistical software package JMP (pronounced
“jump”) and some of its features that can be used to analyze a single random sample of data. For this lab you need to be sitting in front of a 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. 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 registered students can download a copy for free by going to www.stat.iastate.edu/resources/software/jmp/ Although you will be using PC’s in lab, you can download JMP to a Mac (actually JMP was developed with the Mac in mind).
Computer Exercises
The objective for these exercises is to introduce you to JMP's Analyze + Distribution platform for analyzing univariate data.
1.
We will work with a JMP data file called “Fuel Economy” which contains the fuel economy (MPG) for each of the 36 vehicles. These are the same data we have been looking at in class. Go to the Stat 301 web page www.public.iastate.edu/~wrstephe/stat301.html
and open the file by double clicking on the link. If this does not work, save the file to the Desktop, then open JMP and Open Data Table.
2.
This file contains two columns (labeled Vehicle Name and Average MPG) and 36 rows of values.
3.
Select the Average MPG column and choose Column Info from the Cols menu. (You can also Right + Click 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 for having JMP do the correct analysis and produce the correct output. Note that Vehicle
Name is Character – Nominal while Average MPG is Numeric – Continuous. For now, click OK to close the dialog.
4.
From the Analyze menu, choose Distribution. In the resulting dialog, select the
Average MPG column and cast this column into the Y, role (response variable role) by clicking the Y, Columns button. Click OK to begin the analysis.
1
5.
Depending on how the default preferences for JMP have been configured, your initial output may not be exactly what you want. To select the specific graphical and numerical output you desire, use the pop-up menu to the left of the variable name
Average MPG (the menu is accessed by clicking the little red, downward-pointing triangle next to the word Average MPG). This menu lets you select/deselect the various univariate analysis items that JMP provides for the Average MPG variable.
Note: If you hold down the Alt and then click on the red triangle, you will get a dialog box of options rather than a menu. Having the dialog box is easier if you plan to make many changes to the display all at the same time. Select/deselect available analysis items so that you end up with:
a histogram of Average MPG with a count axis and a horizontal layout
an outlier box plot of Average MPG
a Normal quantile plot of Average MPG
quantiles and moments,
you can customize the summaries statistics you want to display
6.
The histogram and the box plot show, generally, how the values are distributed on the number line. One can Right + 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 whether the sample data could have come from a normal model population.
7.
The quantiles of the data set include the “five number summary” (maximum, upper
(75%) quartile, median, lower (25%) quartile, minimum). Note that JMP may calculate slightly different values than what you would calculate by hand. The moments include the sample mean ( y ), sample standard deviation ( s ), the standard s error of the mean ( ), a 95% confidence interval (CI) for the population mean, and n the sample size ( n ). Customizing the display allows you to choose several different summary measures including: the sum of the observations, the variance ( s
2
), the skewness, the kurtosis, and the coefficient of variation (CV), interquartile range, range, etc.
8.
You can obtain CI’s other than 95% as well as tests of hypotheses with JMP's
Analyze + Distribution platform. From the pop-up menu, choose Confidence
Interval and specify the desired confidence level (try 99%). The results give CI’s for both the population mean and the population standard deviation (something that we will not be using much this semester). Also, choose Test Mean and enter a hypothesized value for the population mean (try 24) to see if your sample supports this hypothesized value or not. The result is a test statistic as well as probability values one of which is the appropriate P-value for the corresponding null and alternative hypothesis that you wish to test.
2
9.
In order to create residuals using JMP, you need to remember the formula for a residual. For this one-sample problem the model and definition of a residual are:
Model : y i
Resid ual : y i
y
In order to create residuals for the one sample problem you need to subtract the value of the sample mean from each observation. To do this:
Go to the data table and add a new column. To do this click on the red triangle next to Columns. Select New Column. Name this column Residual.
Highlight the Residual column in the data table and go to the Cols pull down menu. Select Formula. A formula window will open. Enter a formula using the following mouse clicks.
[Average MPG] – Statistical + Col Mean [Average MPG]
You can now use Analyze + Distribution to analyze the residuals. You should include a histogram, box plot and Normal Quantile Plot. You may also wish to use
Fit Distribution + Normal, to superimpose a normal curve on the histogram.
10.
Any output window can be printed. If you try to save an output window, the JMP default option does not actually save the output but instead saves the commands you used to produce the output. The resulting .JRP file when opened on the computer it was created on will reproduce the output window. The .JRP file cannot be opened on any other computer except the one on which it was created unless you imbed the data table.
11.
In order to save an output window that can be opened on another computer, or attached to an email that the recipient can open you can save the output as a Word
2000+ .doc.
12.
When you have several output windows that you want to combine into one file, you can “Journal” the output. By using Edit + Journal, you add a copy of the selected output to a file that can be saved. 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 *.DOC). You can also just Copy/Paste JMP output into a Word document.
3