Ordinary Least Squares, P Value, Regression, Statsmodels.
, with an error term ɛi. This error term is the difference between the predicted value of yi and its projection on the regression line. It’s also called the residual. The goal of the regression model is to minimize this error term, to find the line that will fit the best our dataset. In other term,