Stat 280 - Lab #3: Vice City

Preliminaries
The dataset for this lab is located online: http://www.stat.rice.edu/~hflores/stat280_gmdavis/
It is already in Excel format for you.  Explain what you found in a neat, concise way, and give recommendations on how to improve future studies.

About this dataset
This dataset is fictional, and is intended for educational uses only.  The variables used in this dataset are defined as follows:

City
Unique ID for a city. Assume cities were semi-randomly selected throughout the continental United States.

homes
Indicates the number of independent housing units currently constructed in a particular city at the time of the 2000 national census. Numbers are in units of thousands.

population
Indicates the current number of people living in a city at the time of the 2000 census. Numbers are in units of thousands.

vegetation
Indicates the percentage of city-owned land that is occupied primarily by vegetation at the time of the study (2002).  City blocks were individually evaluated, and those blocks that were at least 2/3 covered with reasonable vegetation were included in the percentage.

smokers
Indicates the percentage of people that claim to smoke on a regular basis (more than once a day) for a particular city.  This value is an estimate taken from previous studies during 1995-2000.

gambling
"1" implies that gambling is legal in a city. "0" indicates that gambling is illegal.

The Setup
National lawmakers have hired you, the skilled statistical analyst, to examine the dataset described above.  I quote their instructions to you below:

"We have this data that the information bureau collected from 30 cities.  For some reason they insisted that we choose them randomly all around the states.  Cost us an arm and a leg.  Anyway, see what you can tell me about it.  I need to know how many homes we have, and if we're meeting a respectable 1/4 (homes to people) ratio on the average.  Also, those environmentalists have been breathing down our necks lately...see if you can tell me if the number of houses (or people) we have per city is related to the amount of vegetation in our city.  If I can do it, I'd like to build more houses without those tree-hugging do-gooders telling me that I'm hurting their precious plants.  My gut tells me that they're probably right, i.e. if we have more of one then we have less of the other, but I need you to verify that for me, or better, disprove it.  There's also some percentages in there concerning the number of people that smoke...see what you can tell me about the overall trend in smoking, you know, are more people dying of it?  Oh yeah, almost forgot, when we started this whole thing we wanted to see if there were differences between cities that allow gambling and those that don't.  See if you can answer that question too."

Analysis
As I read it, we need to figure out all of the following:

•	Examine if a 1/4 homes to population ratio is supported by the data
•	Examine the relationship between vegetation percentage and homes.
•	Examine the relationship between vegetation percentage and population
•	Examine the overall distribution of smokers, and their relation to other variables
•	Split the data by the covariate "gambling" and examine if there are any noticeable differences in the variables

Do all of the following, and include the results in your report

1. Describe each variable (excluding City).  Compute descriptive statistics (mean, standard deviation, median, range, IQR, etc.).  Plot a histogram of each variable.  Make observations about the shape of each variable’s distribution.  Don't forget to examine the data to see if it all makes sense to you!

2. Examine the 1/4 relationship. As usual, there is more than one way to skin a cat.  One approach might be to set-up a separate column that computes homes/population (where "/" means division), and then average the scores.  What does this average mean?  Does this support or refute the existence of a "respectable" 1/4 ratio?  [The answer to this question is going to be based on how close the value is to .25, later on we will teach you how to have some sort of statistical confidence in your conclusion, be it one way or the other]  If you can think of another reasonable means of examining this relationship, try it.

3. Examine the relationship between vegetation and homes and/or population. 

A useful tool to examine the relationship between 2 variables is a scatter plot.

	To create a scatter plot using Excel, use the following steps:
	i. Click Insert-->Chart at the top of the Excel window.
	ii. Under Chart Type, choose XY Scatter (without lines)
	iii. Choose the data columns you want (click and drag, while holding the CTRL key)
	iv. Click Finish, when satisfied with the preview.

The scatter plot allows us to look for positive or negative associations in our data.  See your book (chapter 2.1) for more information.  What kind of associations do you see between vegetation and homes?  between vegetation and population?  between homes and population?

4. Examine the overall distribution of smokers and it’s relationship to other variables. 

Look at histograms (smoking) and scatter plots (smoking with other variables) here and determine if you see some dependence in the scatter plots.  Does the distribution look approximately normal?  Explain (don’t actually show) what type of test could you do to show normality? 

5. Split the data by the covariate "gambling" and examine if there are any noticeable differences in the variables.  
Do the correlations remain the same as those found in (3)?  Are they stronger or weaker or unchanged?  Is the 1/4 ratio results found in (1) different for gambling cities than for un-gambling cities?  Look at the distribution of smokers for gambling cities and that for un-gambling cities.  Are they different?  Can you say that they are statistically different? (i.e. their means are at least 2 standard deviations away from each other)?