Question

In: Statistics and Probability

2.6 Collins temperature data (Data file: ftcollinstemp) The data file gives the mean temperature in the...

2.6 Collins temperature data (Data file: ftcollinstemp) The data file gives the mean temperature in the fall of each year, defined as Sep- tember 1 to November 30, and the mean temperature in the following winter, defined as December 1 to the end of February in the following calendar year, in degrees Fahrenheit, for Ft. Collins, CO (Colorado Climate Center, 2012). These data cover the time period from 1900 to 2010. The question of interest is: Does the average fall temperature predict the average winter temperature?
2.6.1 Draw a scatterolot of the response versus the predictor and describe any pattern you might see in the plot.
2.6.2 Use statistical software to fit the regression of the response on the predictor. Add the fitted line to your graph. Test the slope to be 0 against a two-sided alternative, and summarize your results.
2.6.3 Compute or obtain from your computer output the value of the variability in winter explained by fall and explain what this means.
2.6.4 Divide the data into 2 time periods, an early period from 1900 to 1989 , and a late period from 1990 to 2010. You can do this using the variable year in the data file. Are the results different in the two time periods?

Solutions

Expert Solution

# this code is done in R statistical software
library(alr4)

data = ftcollinstemp

#### 2.6.1 ####
plot(data$fall, data$winter)

# plot is in 2.6.2 part
# from the plot we can see that their is
# no linear relationship between average fall tempreature
# and average winter temprature


#### 2.6.2 ####
model = lm(winter ~ fall, data = data)
summary(model)

##
## Call:
## lm(formula = winter ~ fall, data = data)
##
## Residuals:
##     Min      1Q Median      3Q     Max
## -7.8186 -1.7837 -0.0873 2.1300 7.5896
##
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)
## (Intercept) 13.7843     7.5549   1.825   0.0708 .
## fall          0.3132     0.1528   2.049   0.0428 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 3.179 on 109 degrees of freedom
## Multiple R-squared: 0.0371, Adjusted R-squared: 0.02826
## F-statistic:   4.2 on 1 and 109 DF, p-value: 0.04284

abline(model)

# in the above summary we can see that the P-value corresponding to
# fall is 0.0428 which is not that significant. That is if we take alpha = 0.01
# we will fail to reject H0 that implies that the predictor fall is not significant

#### 2.6.3 ####
R_square = summary(model)$r.squared;R_square

## [1] 0.03709854

# the R_square value is 0.03709854 that implies that approximately 3.7%
# of the variablity of average winter temprature is explained by average
# fall temprature

#### 2.6.4 ####
data1 = data[1:90, ]
data2 = data[90:length(data$year), ]
model1 = lm(winter ~ fall, data = data1)
summary(model1)

##
## Call:
## lm(formula = winter ~ fall, data = data1)
##
## Residuals:
##     Min      1Q Median      3Q     Max
## -6.8976 -1.6349 0.0118 2.0079 7.3387
##
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)  
## (Intercept) 22.7079     8.2600   2.749 0.00725 **
## fall          0.1209     0.1681   0.719 0.47397  
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 3.057 on 88 degrees of freedom
## Multiple R-squared: 0.005842,   Adjusted R-squared: -0.005455
## F-statistic: 0.5171 on 1 and 88 DF, p-value: 0.474

model2 = lm(winter ~ fall, data = data2)
summary(model2)

##
## Call:
## lm(formula = winter ~ fall, data = data2)
##
## Residuals:
##     Min      1Q Median      3Q     Max
## -5.4731 -1.4740 0.0786 1.9299 4.9411
##
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)
## (Intercept) 25.9511    16.9685   1.529    0.142
## fall          0.1161     0.3341   0.348    0.732
##
## Residual standard error: 2.636 on 20 degrees of freedom
## Multiple R-squared: 0.006004,   Adjusted R-squared: -0.0437
## F-statistic: 0.1208 on 1 and 20 DF, p-value: 0.7318

# we can see from the summary there is not much difference in the R_square also
# the variable fall is not significant to explain winter temprature


Related Solutions

Please use R to solve part e and f The data file data2.txt gives a data...
Please use R to solve part e and f The data file data2.txt gives a data set with two variables x and y. The first column in the data set is just row numbers not useful for this question. (e) Use the Shapiro-Wilks test to test for Normality of the data. State your null and alternative hypotheses, p-value and conclusion. Use α = 0.05 (f) Apply the transformation y 0 = log(y) and run the regression on y 0 on...
You must download the file “Assn3_Qu#2_W19” to use the required data. It gives the number of...
You must download the file “Assn3_Qu#2_W19” to use the required data. It gives the number of city-bus users (Ridership) on a public transportation system of a large city in 3 given working days chosen at random in units of hundreds. It gives this data separately for the 4 busy bus routes and for 5 time slots. Here, TSlot1: from start of day to 9:30 am, TSlot2: 9:30 – 12:30, TSlot3: 12:30 – 15:30, TSlot4: 15:30 – 18:30 and Time-Slot5: 18:30...
You must download the file “Assn3_Qu#2_W19” to use the required data. It gives the number of...
You must download the file “Assn3_Qu#2_W19” to use the required data. It gives the number of city-bus users (Ridership) on a public transportation system of a large city in 3 given working days chosen at random in units of hundreds. It gives this data separately for the 4 busy bus routes and for 5 time slots. Here, TSlot1: from start of day to 9:30 am, TSlot2: 9:30 – 12:30, TSlot3: 12:30 – 15:30, TSlot4: 15:30 – 18:30 and Time-Slot5: 18:30...
The data below gives the mean price (in cents) of a litre of regular gasoline at...
The data below gives the mean price (in cents) of a litre of regular gasoline at self-service filling stations at a sample of six urban centres in Canada in May 2013. Saint John, NB...........122.7 Quebec.........132.6 Toronto.............125.4 Regina.......123.7 Saskatoon...........125.2 Edmonton.........114 Provide answers to the following to two decimal places. Part (a) Find the sample mean (in cents).   Part (b) Find the sample standard deviation (in cents).   Part (c) Using the appropriate t distribution, find a 90% confidence interval for the mean...
Using the initial pressure and temperature for neon gas from data file. calculate the volume (in...
Using the initial pressure and temperature for neon gas from data file. calculate the volume (in m^3) per one mole of gas. Round your answer to 4 decimal place. Time Pressure Ne Temperature 0 56.921 22.337 0.5 56.93 22.357 1 56.939 22.379 1.5 56.962 22.398 2 56.972 22.423 2.5 56.995 22.436 3 57.004 22.456 3.5 57.004 22.488 4 56.995 22.507 4.5 56.967 22.526 5 57.031 22.545 5.5 57.059 22.567 6 56.985 22.589 6.5 57.091 22.617 7 57.1 22.634 7.5 57.1...
The following table gives temperature data in *C as a function of time of day and day of the week at a specific location.
The following table gives temperature data in *C as a function of time of day and day of the week at a specific location. Data are missing for the entries marked with a question mark (?). Use linear interpolation with MATLAB to estimate the temperature at the missing points.
. Using your data file Ice Cream, find:             Temperature = Independent Variable; Sales = Dependent...
. Using your data file Ice Cream, find:             Temperature = Independent Variable; Sales = Dependent variable Temperature Sales 63 1.52 70 1.68 73 1.80 75 2.05 80 2.36 82 2.25 85 2.68 88 2.90 90 3.14 91 3.06 92 3.24 75 1.92 98 3.40 100 3.28 92 3.17 87 2.83 84 2.58 88 2.86 80 2.26 82 2.14 76 1.98            a. What is an appropriate null hypothesis for Regression Analysis?            b. What is the test statistic (F)...
The excel data are for the mean body and brain temperature of six ostriches was recorded...
The excel data are for the mean body and brain temperature of six ostriches was recorded at typical hot conditions. The results, in degrees Celsius. Ostriches live in hot environments, and they are normally exposed to the sun for long periods. Mammals in similar environments have special mechanism for reducing the temperature. Test for a mean difference in temperature between body and brain for these ostriches. Paste the statistics output from excel Find the test statistic, p-value Interpret the results...
Using the data in the Excel file Cell Phone Survey, determine if the mean response for...
Using the data in the Excel file Cell Phone Survey, determine if the mean response for Customer Service rating is different for the carriers (consider only AT&T, Verizon, and Sprint) for significance level of 5%. Gender   Carrier   Type   Usage   Signal strength   Value for the Dollar   Customer Service M   AT&T   Smart   High   5   4   4 M   AT&T   Smart   High   5   4   2 M   AT&T   Smart   Average   4   4   4 M   AT&T   Smart   Very high   2   3   3 M   AT&T   Smart   Very...
Test the claim that the mean GPA of night students is larger than 2.6 at the...
Test the claim that the mean GPA of night students is larger than 2.6 at the 0.10 significance level. - The null and alternative hypothesis would be: - The test is: A. two-tailed B. right-tailed C. left-tailed - Based on a sample of 25 people, the sample mean GPA was 2.62 with a standard deviation of 0.05 The p-value is: - Based on this we: A. Fail to reject the null hypothesis B. Reject the null hypothesis
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT