Assignment 2_RMIP: Test a Basic Linear Regression Model

This week, I am going to test a basic linear regression model for the association between Crater Diameter (explanatory variable) and Crater Depth (response variable). The explanatory and response variables are both quantitative. Therefore, I will center the explanatory variable (Crater Diameter) to have a mean of zero.

Below are the python code used in the regression analysis and a brief report to summarize the results of the regression model.

 

Python Code: Test a Basic Linear Regression Model

RMIP_Code 1

Interpretation for Basic Linear Regression Model

RMIP_Code Results 1

The table above shows the descriptive statistics of the centered explanatory variable (Crater Diameter_Centered). It has a mean of zero indicating that the variable was properly centered.

 

RMIP_Code Results 2

The results of the linear regression model indicated that Crater Diameter (Beta = 0.0444, p < 0.0001) was significantly and positively associated with Crater Depth.

The table above shows a high F-statistic (1.885 e+04). A very low p-value < 0.0001 indicates that the association of Crater Diameter with Crater Depth is statistically significant. The regression model has an intercept of 0.5204 and a slope (regression coefficient) of 0.0444.   An R-squared of 0.511 suggests that if we know crater diameter, we can predict 51% of the variability observed in crater depth while 49% variability will be unaccounted for. This means we can predict over half of the variability.

 

output_RMIP_wk2-1

The scatter plot above shows a positive linear relationship between crater diameter and crater depth; higher crater depths are associated with higher crater diameters. The best fit line is represented by the equation below;

Crater Depth = 0.044 * Crater Diameter_Centered + 0.520

 

Author:
Posted on February 14, 2016 by Okechukwu Ossai

Posted in Regression Modeling in Practice Course.

admin

Leave a Reply

Your email address will not be published. Required fields are marked *