In: Math
Given the following relationship:
Shoe Size | Height (inches)
7.5 | 66
8 | 67
8 | 68
10 | 71
10.5 | 70
11 | 73
a) Letting the variable x represent shoe size and y represent height, determine the least squares regression line and correlation coefficent.
b) Based on the correlation coefficient calculated above, can the least squares regression line be confidently used as a predictor of height? Why or Why not?
SHow the work detailed. Thank you
v
# The intercept print('intercept:', regr.intercept_) intercept: 53.93382352941177
I have calculated the coefficient, intercept and correlation coefficient using the python programming language and try to visualize the result. From the above result, we find out that the Pearson correlation coefficient is 0.95.
R-squared is a goodness-of-fit measure for linear regression models. This statistic indicates the percentage of the variance in the dependent variable that the independent variables explain collectively. R-squared measures the strength of the relationship between your model and the dependent variable on a convenient 0 – 100% scale. and here R-square value is 90% i.e 90% variation in the value of height is explained by the regressor(shoe size).
The correlation coefficient of 0.95 indicates a strong positive correlation between the size of the shoe and height of the shoe. But in interpreting correlation it is important to remember that correlation is not causation. There may or may not be a causative connection between the two correlated variables. Moreover, if there is a connection it may be indirect.
R-square vale 90% means,90%variation is explained by regressor shoe size. but 95% correlation means, there are some other factors indirectly correlate predictor and regressor. as R-square value is >90% the above least square regression line accurately predict the Y value. this is a single variable linear regression problem so using correlation coefficient also we can say that but for mu;multiple regression problem r-square value is used as goodness of fit.