Stat 408 Assignment 1.2
Due January 23, 2013
Show R code and output for each exercise.
Use any font for comments and explanations, but use
courier (or other fixed-width) font for computer input and output.
Insert plots near your code and discussion, not all at the end of the
assignment.
-
A dataset at the JSE site is in .xls format. Download it,
open it in a spreadsheet, and save it as comma separated
values and read it into R. Descriptive info
is here.
- Provide a plot which shows how the distribution of Price
varies with Type.
- To what degree is Price affected by Mileage? Provide a
plot and discuss.
- Compare proportions of cars with Leather among the 5 Types
with a plot.
- Superbowl XLVI is scheduled to be played February 5 in
Indianapolis. I've pulled together
some data about previous
Superbowls so that you can impress friends with your
recall. However, the data file needs some work before you can read
it into R.
- Examine this file and figure out what problems prevent R
from reading it in directly. Explain what changes you make so that
it is readable. (Reminder: do not edit it in Word. Use a text
editor like Wordpad or Eclipse.)
- Read the data into an R dataframe.
- Create new variables for the total score and the winning margin.
- Print out a summary of the data frame.
- Is there a trend to the total score over time?
- Point spread (winning margin) is of interest to odds makers. Plot and
summarize its distribution.
- Is there a trend to the point spread over time?