(16 points) In this question, we will practice multiple regression, again using states_data.csv. To do so, we will rely on the statsmodels Python library (import statsmodels.formula.api as smf).
(a) (2 points) Regress vep12_turnout (our DV) on prcapinc. Report the value of the slope coefficient together with its t-statistic and p-value. Does the slope estimate agree or disagree with your slope estimate from question 2?
(b) (2 points) What is the null hypothesis corresponding to the t-statistic and p-value you reported?
(c) (2 points) Based on the Z-statistic and the p-value you obtained in the previous question, can we reject this null hypothesis? Interpret the conclusion of this statistical test.
(d) (2 points) Now perform a multiple regression of vep12_turnout (our DV) on prcapinc, pop2010, college, unemploy, urban. Report the full output of the statsmodels summary function for this model.
(e) (2 points) Has the slope coefficient for prcapinc you obtained in the previous question changed compared to the value you obtained in part (a)? Have the t-statistic and p-value? What does this mean about the reliability of this second model?
(f) (2 points) Interpret the R^2 you obtained in parts (a) and (d). Which one of the two is greater? Is this something you expected? Briefly explain your answer.
(g) (4 points) We want to diagnose whether there are any problems with the OLS assumptions in the model we fit in part (d). Create a scatterplot of the residuals from this model with predicted values on the x-axis and residuals on the y-axis. Do you see any problems?
4. (16 points) In this question, we will practice multiple regression, again using states_data.csv. To do so, we will rely on the statsmodels Python library (import statsmodels.formula.api as smf).
(a) (2 points) Regress vep12_turnout (our DV) on prcapinc. Report the value of the slope coefficient together with its t-statistic and p-value. Does the slope estimate agree or disagree with your slope estimate from question 2?
(b) (2 points) What is the null hypothesis corresponding to the t-statistic and p-value you reported?
(c) (2 points) Based on the Z-statistic and the p-value you obtained in the previous question, can we reject this null hypothesis? Interpret the conclusion of this statistical test.
(d) (2 points) Now perform a multiple regression of vep12_turnout (our DV) on prcapinc, pop2010, college, unemploy, urban. Report the full output of the statsmodels summary function for this model.
(e) (2 points) Has the slope coefficient for prcapinc you obtained in the previous question changed compared to the value you obtained in part (a)? Have the t-statistic and p-value? What does this mean about the reliability of this second model?
(f) (2 points) Interpret the R^2 you obtained in parts (a) and (d). Which one of the two is greater? Is this something you expected? Briefly explain your answer.
(g) (4 points) We want to diagnose whether there are any problems with the OLS assumptions in the model we fit in part (d). Create a scatterplot of the residuals from this model with predicted values on the x-axis and residuals on the y-axis. Do you see any problems?