Example Report for Lab 1 Example Assignment: Lab 1, problems 1 and 4 1. Use the sum and sqrt functions to find the mean and standard deviation of the climate$rain data set: > climate$rain->z > sum(z)/50->meanrain > meanrain [1] 31.597 > sum((z-meanrain)**2)->temp > sqrt(temp/49)->sdrain > sdrain [1] 13.65638 > stats(z)->check > check [,1] N 50.00000 mean 31.59700 Std.Dev. 13.65638 min 7.11000 Q1 20.65000 median 32.55500 Q3 39.85500 max 59.74000 missing values 0.00000 4. Plot January versus July temperatures, comment on any relationships, and identify unusual points: > climate->z > view(z,3) 47 remaining rows have not been listed lat jan rain city jul elev lon 1 35.08333 22.3 8.12 albuquerque 92.8 5300 -106.65000 2 33.75000 32.6 48.61 atlanta 87.9 1034 -84.38333 3 30.28333 38.8 31.50 austin 95.4 570 -97.75000 > set.panel(2,1) plot window will lay out plots in a 2 by 1 matrix > plot(z$jan,z$jul) > title("July Temp. (y) vs. January Temp. (x)") > plot(z$jan,z$jul) > text(z$jan,z$jul,z$city) > title("July Temp. vs. Jan. Temp. with Labels") Phoenix, Miami, Honolulu, and the West Coast cities (Portland, San Jose, etc.) are unusual compared to the others. All except Phoenix can be explained by proximity to oceans. Phoenix gets very hot in the summer but also pretty cool in the winter. For the other cities it appears that there is a positive linear relationship between July and January temperatures. That is, if the January temperature is relatively high for a city, then the July temperature will tend to be relatively high as well.