Multiple linear regression occurs when more than one independent variable is used to predict a dependent variable:
Where, Y is the dependent variable, a is the intercept, b1 and b2 are the coefficients, and x1 and x2 are the independent variables
Also, note that squaring the dependent variable still makes it linear, but if the coefficient is squared, then it is nonlinear.
To build the multiple linear regression model, we'll utilize the NBA's basketball data to predict the average points scored per game
The following are the column descriptions of the data:
height
: This refers to the height in feetweight
: This refers to the weight in poundssuccess_field_goals
: This refers to the percentage of successful field goals (out of 100 that were attempted)success_free_throws
: This refers tot the percentage of successful free throws (out of 100 that were attempted)avg_points_scored
: This refers to the average points scored per game
The following code ingests this data and then we...