# Is this a linear model? [duplicate] mpg = mileage per gallon and hp = horsepower

Why is this model a linear model despite having a square of horsepower in it?

• Models are called linear when they are a linear function of the coefficients. – Michael R. Chernick Nov 1 '19 at 3:40
• Ok i got the answer. For the model to be linear it needs to be linear in terms of parameters not the predictors. Here betas are parameters and horsepower is predictor – Bhuwan Bhatt Nov 1 '19 at 3:55
• I'm voting to close this question topic because the OP answered it in a comment – Peter Flom Nov 1 '19 at 11:39

In order to explain this, I would consider the following quadratic function. By comparing this function with your function, x1 would be similar to your hp (horsepower).

Actually what we have really done is, we have created a new feature x2 where By plugging this new feature to the above hypothesis we get the following function which is just like a linear model • i have posted the correct answer below. – Bhuwan Bhatt Nov 4 '19 at 11:47

Ok i got the answer. For the model to be linear it needs to be linear in terms of parameters not the predictors. Here betas are parameters and horsepower is predictor