Lab 4
Lab 4
Use the output obtained in the Lab 4 notes (related to the roses data set) to answer the questions in
Part I.
1. (2 points) Using the scatterplot, describe the relationship between number of roses sold and
selling price (direction, linear or curved, strength, outliers or other deviations from the pattern).
2. (2
points) Is
it
appropriate to use the correlation coefficient in this problem? Explain. (Your explanation should be
in reference to the scatterplot – what kind of relationship between the two variables must exist to
use the correlation coefficient to accurately describe the strength of the relationship?)
3. (1 point) Regardless to your answer to question #2 above, report the correlation coefficient.
## [1] -0.9568285
4. (2 points) Write the equation of the least-squares regression line. Define the terms in the
equation. (i.e. state what “x” and ˆy represent in the context of the problem.)
summary(mod)
##
## Call:
## lm(formula = price ~ number)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.2577 -0.8941 -0.3015 1.4926 2.8510
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 55.2515197 1.8568565 29.75 4.67e-14 ***
## number -0.0028964 0.0002351 -12.32 6.68e-09 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.86 on 14 degrees of freedom
## Multiple R-squared: 0.9155, Adjusted R-squared: 0.9095
## F-statistic: 151.7 on 1 and 14 DF, p-value: 6.684e-09
5. (2 points) Interpret the slope in the least-squares regression equation in the context of the
problem.
Slope: For every additional flower sold the wholesale price for a dozen roses sold decreases by $0.003.Y-intercept: The
## [1] 6991.962
$60.It is not appropriate to calcuate the number of roses for $60 since is value
is outside of the slope of our data. Therefore, this would be extrapolation.
Use the data to answer the following questions. (Note: the “year” variable is not used in the
analysis.)
7. (1 point) Which variable (CO2 or temperature) is the response variable and which is the
explanatory variable?
We know that explanatory variable is independent, we can say that response variable is harvest. The hair temperature is
its own variable. Our temperature is the explanatory variable. We can conclude that the explanatory variable is
temperature and response valuable response readable is harvest of deep harvest of the drop and this is the required
solution.
8. (1 point) Generate and include a properly labeled scatterplot showing the relationship between
carbon dioxide level and temperature. (Use the R code on pages 1 and 2 of the Lab 4 notes to
generate the scatterplot, changing the name of the data set, variable names, title, and labels for the
axes.)
9. (2 points) Based on the scatterplot, describe the relationship between carbon dioxide level and
temperature (linearity, direction, strength, and any deviations from the pattern).
What this tells us is that is a positive tightly packed scatterplot. It is positive because it is going from left to
10. (1 point) Using the general R code at the bottom of page 2 of the Lab 4 notes, obtain and report
the correlation coefficient to describe the strength of the linear relationship between CO2 and
temperature. A goal is to predict temperatures for different levels of carbon dioxide. To do so, we
will use the least-squares regression equation. Using the appropriate R code from page 3 of the Lab
4 notes, generate the linear model (i.e. least-squares regression model). From that model, obtain the
11. (2 points) Write the least-squares regression equation. Define the terms in the equation (i.e. state
what
problem.
13. (1 point) In 2015, CO 2 was 400.83 parts per million on top of Mauna Loa. What does our
model (i.e.
least-squares regression equation) predict the global temperature to be for this CO 2 level? Use the
predict() command at the bottom of page 3 of the Lab 4 notes to find this predicted value:
14. (2 points) What does our model predict the global temperature for October 11, 2021 (when CO
2 was recorded as 413.78 ppm)? (Use R to obtain this value using the predict() command on page 3
15. According to our model, at what CO 2 level would result in a predicted global temperature 2
degrees Celsius above the November 1850 temperature? Again using our model, what year would
this happen? (Note: the last year of data in the climate data set is 2017.) Show or explain how you