# Linearity assumption of linear regression

According to this website, if the scatter plot follows a linear pattern (i.e. not a curvilinear pattern) then linearity assumption is met.

Here is an example where the assumption is not met. But as far as I know, the only real requirement is that the data must be linear in the unknown coefficients which means that we can have parabola shape and still be linear. Thus, we are not violating the linearity assumption.

Did I make an error of understanding ?

• It is possible to fit sine wave data to the equation "y = a * sin(x) + b" using linear algebra, such that the method for finding parameter values for a and b is by linear regression. In your plot, there is some obvious pattern to the residual errors, indicating that the model describing the data is incomplete. – James Phillips Nov 10 '19 at 11:43

You still need to have a function or functions of the original variable(s) that the response is linear in.

You're correct that linear regression is linear in the coefficients, but then it's equally linear in the things the coefficients are multiplied by. (Where here we're talking in the sense of a linear map, rather than "has a straight-line relationship", though the two are related concepts when you have a constant term included in the predictors.)

For multiple regression we write $$E(Y|\mathbf{x})= X\beta$$, where $$X$$ is the matrix of variables as actually supplied to the regression (and the constant). This is linear in $$\beta$$ but it's equally linear in the columns of $$X$$.

In the case of simple regression, if for example you can write an equation $$Y = \beta_0+\beta_1 t(x) + \epsilon$$, or $$E(Y|x)=\beta_0+\beta_1 t(x)$$ that's linear in the supplied variables $$(1,x^*)$$, where $$x^*=t(x)$$.

If you know a $$t(x)$$ to supply to the regression, that means you don't need to have a straight-line relationship between $$y$$ and $$x$$, but there's still a linear relationship.

There's a variety of approaches that will model nonlinear relationships with linear equations, including polynomials, various kinds of regression splines, trigonometric functions, and so forth, that can have this property of still being (multiple) linear regression models.

• I would also mention the third denotation of non-linearity, autocorrelation: $y_{t}=\beta_{0}+\beta_{y}y_{t-1} + \beta_{x}x_{t}+\varepsilon_{t}$, as in non-linear dynamic system. This is linear in functional form (i.e. not a polynomial expansion of $x$), and in parameters which are simple scalars in a linear additive model, but non-linear as a function of past values of the dependent variable. – Alexis Nov 10 '19 at 22:16
• Thank you for your answer ! – Ferdinand Mom Nov 13 '19 at 7:46

The confusion here is mainly semantic: between 1) linear regression and 2) linear dependence/relation between the variables. The relation between the predictor and the response in the plot shown is clearly a nonlinear one. On the other hand, you still can fit it by a linear model of the type: $$y = a_0 + a_1 x + a_3 x^2$$ or any other linear combination of possibly nonlinear functions.

• Thank you very much ! – Ferdinand Mom Nov 13 '19 at 7:46