DOC PREVIEW
PSU STAT 401 - Lab Assignment 1

This preview shows page 1-2 out of 6 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

General InstructionsIWrite the answers for each part of each exercise in a worddocument.IUpload your Lab Assignment 1 word document on Angel.IAny figures you are required to do can either be inserted inthe word document or attached in the email. In the lattercase it should be made clear which exercise each figurecorresponds to.Lab Assignment 1Exercise 1Import nto the R object cs data on 28 day compressive strengthmeasurements of concrete cylinders using water/cement ratio 0.4using the commandcs=read.table(”http://sites.stat.psu.edu/∼mga/401/Data/Concr.Strength.1s.Data.txt”, header=T)Then use the commandsattach(cs); sum(Str <= 44)/length(Str); sum(Str >=47)/length(Str)to obtain the proportion of measurements that are less than orequal to 44, and greater than or equal to 47. What do thesesample proportions estimate?Lab Assignment 1Exercise 2a) Using R commands, find the mean, the variance and standarddeviation of the statistical population corresponding to the numberof scratches of 500 tin plates where 190 have 0 scratches, 160 have1 scratch and 150 have 2 scratches. In addition to reporting theresults you obtained, give the R commands you used to set up thestatistical population and to do the calculations. [Note: R, as wellas your calculator, always compute the sample variance. Multiply itby (499/500) to get the population variance.]b) Use R to get a simple random sample of 100 from thisstatistical population and to compute the sample proportions foreach of the three categories, the mean, variance and standarddeviation of the sample you obtained. In addition to reporting theresults you obtained, give the R commands you used to obtain thesample and to do the calculations.Lab Assignment 1Exercise 3a) Use the commandsattach(faithful); hist(waiting); stem(waiting)to do a basic histogram of the Old Faithful data on waiting timesbefore eruptions, and the corresponding stem and leaf plot. Is theshape of the stem and leaf plot similar to that of the histogram?b) Redo the histogram but this time add color to the bars,superimpose a colored smooth histogram, and add a histogramtitle.Lab Assignment 1Exercise 4The data inhttp://sites.stat.psu.edu/∼mga/401/Data/Temp.Long.Lat.txt(source Peixoto, J.L. (1990) A property of well-formulatedpolynomial regression models. American Statistician, 44, 26-30)give the average (over the years 1931 to 1960) daily minimumJanuary temperature in degrees Fahrenheit with the latitude andlongitude of 56 U.S. cities.(a) Do a scatterplot matrix of the data. Does longitude or latitudeappear to be the better predictor of a citys temperature? Explainin terms of this plot.(b) Do a 3d scatterplot of the data. Does longitude or latitudeappear to be the better predictor of a citys temperature? Explainin terms of this plot.Lab Assignment 1Exercise 5Read the data on the average stopping times (on a level, drystretch of highway, free from loose material) of cars and trucks atvarious speeds into the data frame bd bybd=read.table(http://sites.stat.psu.edu/∼mga/401/Data/SpeedStopCarTruck.txt, header=T).Do a scatterplot of the data using colors to differentiate betweencars and trucks, and dd a legend to the plot.Lab Assignment


View Full Document
Download Lab Assignment 1
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lab Assignment 1 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lab Assignment 1 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?