# Does linear regression mean the model fit line has to be straight? [duplicate]  1. When we fit a linear reg model, do we get a straight line equation? So, it means there is no way we can get a curved line from it. Then why in some examples over internet we see curved line for linear regression examples?

2. 1st image is quantile regression fit on 3 quantiles and 2nd image is again quantile regression model fit on 3 quantile but 1st one is non linear and second one is linear.

Please provide some explanation on both the points.

Thanks for the first comment, now its pretty clear: In linear regression when we have linearity in parameters and variables both then we get a straight line. ex- $$Y =a + bx$$ but when we have linearity in parameter but not in variable then we get a curved line.

$$Y = a+bx+cx^2$$

Both are linear regression but model lines looks different. Generalized additive algo is linear in terms of parameter but not in variable, thats is why it is capable of fitting non linear curve with similar level of interpretability like linear regression.

• Hint: research the difference between linearity in parameters and linearity in variables. Jan 16 at 7:23
• Got it thanks a lot! Jan 16 at 7:44
• Jan 16 at 7:54
• Does this answer your question? Why is polynomial regression considered a special case of multiple linear regression? // @Glen_b VTC with me?
– Dave
Jan 16 at 7:55
• @Dave I've deleted my answer, but could you please clarify why it was wrong? Jan 16 at 8:30