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**

**Interpretation for Basic Linear Regression Model**

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.

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.

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

## Recent Comments