STAT 280: Lab 1 – Getting the Feel of Data
Written by: Hector D. Flores
Email: hflores@rice.edu

Preliminary

This lab and the corresponding data (as well as future labs) are located at the following URL (access it through Internet Explorer):

	http://www.stat.rice.edu/~hflores/stat280_gmdavis/

Right-click on the file links and select Save Target As.  The lab file is in Rich Text Format (*.rtf) and can be opened in Word or WordPad (if Word gives you difficulties use WordPad).

The data file’s name should look like the lab name.  For example, this lab is “stat280L1.rtf”, so the corresponding data file is “stat280L1.txt”.  Now, open Excel, and import the data as shown in Excel instructional handout (See excelguide.doc on the same URL as above).

Note: You will also need to make sure the “Analysis ToolPak” add-in is installed on Excel.  In Excel, go to Tools --> Add-Ins and make sure “Analysis ToolPak” is checked and click Ok.  If it is already checked, then click on Cancel.

Codebook [i.e. what the column titles mean]

1.	UID – Unique ID.  A number that identifies this entry as unique (heh)
2.	NAME – Employee last name
3.	AGE – in years
4.	GENDER – Male or Female only please
5.	SALARY – Yearly pay, in thousands of US dollars
6.	LATE – Number of days late during the last year (2002)

Objective

The purpose of this lab is to have you, the student, become comfortable with data.  Also in this lab, you will compute some basic “descriptive” statistics, form histograms, and draw conclusions from your analysis.

Analysis I

Answer all of the following questions in your lab write-up (most are very subjective, so just answer intelligently):

1.	Clean data import
•	Did the data import correctly? How can you be sure?
•	Suppose you had a tremendously large dataset that you couldn’t “eyeball” to verify import errors.  Suggest ways of identifying these errors.
•	Note the pattern that the data was given in the original text file, would another pattern be more appropriate?
2.	Errors in the data (syntax)
•	Assuming there were no problems with (1), do you notice any errors in the data?  How would you explain them?  How would you deal with “bad” data entries?  
•	Do something to deal with missing data.  Typically, many statisticians will average all the entries in a column that are present and insert the result in for the missing data (note how this doesn’t affect the average, though it does affect the median).  Probably the majority of statisticians remove the entry from analysis altogether (why is this both good and bad?).  I suppose you could just put some number in there…what do you think are the ethical ramifications of this sort of action?
3.	Logic errors in the data
•	Look at the data with respect to the actual meaning of the column that its’ in.  Are there entries that don’t make sense?  If so, how would you deal with this?
•	Imagine that this data set had 10,000 entries.  It is obviously impossible to identify all the problems with the data, so suggest a means of finding these logic errors rather than looking “line-by-line”.

All of the above is ENTIRELY non-trivial, as every dataset is plagued by problems.  Now that you’ve checked the validity of the data, let’s try to summarize it by computing some statistics!

Analysis II

Perform the following operations and answer the questions in your report.

1.	Compute the mean, median, mode, range, and Inter-Quartile range for AGE, SALARY, LATE.  The IQR is defined as: (3rd Quartile – 1st Quartile).  Use the Quartile statistical function in Excel to get the first and third quartiles.  What do these numbers mean?
2.	How many males and females are in this dataset?  Ok, so you probably answered this by just looking and counting manually.  You must realize that this can be painfully inaccurate with larger datasets.  Try to either sort the data (easy) or figure out how to use the CountIf Excel function to do this easier.
3.	Select all the data (click-and drag) and sort it by GENDER.  Compute the same statistics as in (1), but do so for males and females.
4.	Make histograms of AGE, SALARY and LATE for both males and females, and then individually for males and females.  To make a histogram, click on Tools --> Data Analysis.  Select Histogram, and click Ok.  Click and drag a box around the column of data you want to plot (the corresponding columns should appear in the Input Range box), and make sure the Chart Output box is selected before you click Ok.  What do these plots show you that the statistics that you’ve already computed don’t?  Why are they useful in general?  Can you think of any other useful way to graphically display this data?

Conclusions

In as few words as possible (but no less than a half a page), summarize your experiences with this particular dataset (i.e. through Analyses I and II) including changes you might have made, problems you encountered, and patterns you believe you have found (or lack thereof).