Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

l. Use data in http://www.utdallas.edu/~ammann/stat3355 scripts/Temperature1. da

ID: 3228169 • Letter: L

Question

l. Use data in http://www.utdallas.edu/~ammann/stat3355 scripts/Temperature1. data This file contains average January minimum temperatures in degrees F. from 1931-1960 for 51 U.S. cities. Pacific coast cities Los Angeles, SanFrancisco, Portland, and Seattle were removed since their winter temperatures are controlled mainly by Pacific ocean currents. a. Construct an informative plot of temperature versus latitude. b. Fit a model to predict January minimum temperature based on latitude. Interpret the estimated slope of this model. c. Are the model assumptions reasonable? d. Test for significance of the slope at the 5% level of significance. e. The latitude of Plano is 33.0. Use your regression model to predict the January minimum temperature for Plano and obtain a 90% prediction interval for this temperature. Plano's actual January minimum temperature is 34. How does that compare to temperatures in the prediction interval? f. How does Plano's actual January minimum temperature compare to a 90% confidence interval for the mean temperature of all cities at the same latitude?

Explanation / Answer

e) I am using R software to solve this problem.

First we can load the data in R environment with the below command:

InputData <- read.table("http://www.utdallas.edu/~ammann/stat3355scripts/Temperature1.data",header = T)

#Fit linear model
fit <- lm(JanTemp ~ Lat, data = InputData)

#Load the new data for Plano

NewData <- data.frame(Lat = 33)

#Estimate 90% prediction interval for Plano with predict() function

predict(fit, newdata = NewData, interval = "prediction", level = 0.90)

fit lwr upr
39.30285 31.70366 46.90204

The actual temperature of Plano i.e. 34 falls within this prediction interval.

f) #Estimate 90% confidence interval for Plano with predict() function

predict(fit, newdata = NewData, interval = "confidence", level = 0.90)

fit lwr upr
39.30285 37.70416 40.90154

The actual temperature of Plano i.e. 34 does not fall within this confidence interval for the mean temperature of all cities at the same latitude.