Escolar Documentos
Profissional Documentos
Cultura Documentos
Alex Gerg
Statisticshelpdesk
and application of
Statisticshelpdesk
The scatter plot for day and the corresponding log density is constructed using R-code and
that the linear fit line is also super imposed on the same (Figure 1).
From Figure 1, it is seen that the points roughly travel in linear path from the bottom left to
top right corner of the figure, indicating an approximate linear relationship between the two
variables. However, the points deviate from the fitted line in a systematic curvilinear
pattern, suggesting a higher degree polynomial fit to be a better one.
Statisticshelpdesk
(b) Use the R-function cor(x,y) to obtain the correlation between the variables logdensity and day. Comment on this value.
The cov( ) function in R is used find the linear correlation coefficient between days and
log_density and its value is produced as R output below.
The correlation between days and log_density is found to be 0.97895 that is considerably
close to 1, the upper limit for the correlation coefficient (-1 +1). This indicates that
the variables days and log_density have a high positive association, implying that as the
Statisticshelpdesk
value of the one increases, the value of the other also increases. This, high value also
supports the view that there is good linear relationship between the two variables.
Statisticshelpdesk
Contact Us:
Phone: +44-793-744-3379
Mail Us: info@statisticshelpdesk.com
Web: www.statisticshelpdesk.com
Facebook: https://www.facebook.com/Statshelpdesk
Twitter: https://twitter.com/statshelpdesk
Blog: http://statistics-help-homework.blogspot.com/