Polynomial regression

Polynomial regression is a kind of linear regression.

While linear regression is when both the predictor and the response are each continuous and linearly-related, causing the response to increase or decrease at a constant ratio to the predictor (that is, in a straight line), with polynomial regression, different powers of the predictor are successively added to see if they adjust the response significantly. As these increases are added to the equation, the line of data points will change its shape, turning the linear regression model from a best fitted line into a best fitted curve.

So, why should you bother with polynomial regression? The generally accepted answer or thought process is: when a linear model doesn't seem to be the best model for your data.

There are three main conditions that indicate a linear relationship may not be a good model for a use:

  • There will be some variable relationships in your data that you assume are curvilinear
  • During visual inspection of your variables, you establish (using a scatter plot is the most common method for this) a curvilinear relationship
  • After you have actually created a linear regression model, an examination of residuals (using a scatterplot) shows numerous positive residual values in the middle, but patches of negative residual values at either end (or vice versa)

Note

Note: In curvilinear relationships, values increase together up to a certain level (like a positive relationship) and then, as one value increases, the other decreases (negative relationship) or vice versa.

So, here we consider an example like the one just mentioned involving user cars. In our vehicle data, we have information listing many attributes, including the number of options each vehicle has. Suppose we are interested in the relationship between the number of options a car has (such as air conditioning or heated seats) and the resell price.

One might assume that the more options a vehicle has, the higher the price the vehicle would sell for.

However, upon closer analysis of this data, we see that is not the case:

Polynomial regression

If we plot the data, we can see perhaps a text book example of a scenario that would benefit from a polynomial regression:

Polynomial regression

In this hypothetical scenario, the relationship between the independent variable x (the percentage increase in the resell price over the blue book value) and the dependent variable y (the number of options a vehicle has) can be modeled as an nth degree polynomial in x.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset