In: Statistics and Probability
Code using R or Python
We observe from our campus the temperature and count the number of squirrels. Our observations are
T = [52, 52, 50, 54, 50, 52, 54, 80, 80]
Sq = [8, 10, 6, 9, 6, 12, 12, 1, 0]
a) What is the covariance of these vectors? (1point)
b) What is the covariance matrix? (1point)
c) What is the correlation coefficient? (1point)
d) Find the coefficient of determination? (1point)
e) Can you make any statement or conclusion given these numbers as to the relationship of these paired observations? (1point)
f) If we try to fit a straight line model to these variables; What is the best choice 1 for the dependent and independent variable and why? What is the slope β1 ? What is the intercept value β0 ? (show your working) (4points)
g) Which aspect of the data is not being captured and does this affect the methodology of the straight line model used? (2points)
h) What is a good measure to assess the quality of the straight line fitted above? Use this measure. (1point)