statistics
Homework - R2 Statistical Inference I, Dr. Jinwook Lee
In the report, you must document a thorough exploration of the dataset using the graphical and numerical summary techniques. R code must be attached.
Problem 1. The file “flow-occ.csv” contains data collected by loop detectors at a particular location of eastbound Interstate 80 in Sacramento, California, from March 14-20, 2003. For each of three lanes, the flow (the number of cars) and the occupancy (the percentage of time a car was over the loop) were recorded in successive five minute intervals. There were 1740 such five-minute intervals. Lane 1 is the farthest left lane, lane 2 is in the center, and lane 3 is the farthest right.
(a) For each station, plot flow and occupancy versus time. Explain the patterns you see. Can you deduce from the plots what the days of the week were?
(b) Compare the flows in the three lanes by making parallel boxplots. Which lane typically serves the most traffic?
(c) Examine the relationships of the flows in the three lanes by making scatterplots. Can you explain the patterns you see?
(d) Make histograms of the occupancies, varying the number of bins. What number of bins seems to give good representations for the shapes of the distributions? Are they any unusual features, and if so, how might they be explained?
(e) Make plots to support or refute the statement, “When one lane is congested, the others are, too.”
Problem 2. The file “bodytemp.csv” contains normal body temperature readings (degrees Fahrenheit) and heart rates (beats per minute) of 65 males (coded by 1) and 65 females (coded by 2).
(a) For both males and females, make scatterplots of heart rate versus body temperature. Comment on the relationship or lack thereof.
(b) Does the relationship for males appear to be the same as that for females? Examine this question graphically, by making a scatterplot showing both females and males and identifying females and males by different plotting symbols.