In
statistics
Statistics (from German language, German: ''wikt:Statistik#German, Statistik'', "description of a State (polity), state, a country") is the discipline that concerns the collection, organization, analysis, interpretation, and presentation of ...
, polynomial regression is a form of
regression analysis in which the relationship between the
independent variable
Dependent and independent variables are variables in mathematical modeling, statistical modeling and experimental sciences. Dependent variables receive this name because, in an experiment, their values are studied under the supposition or demand ...
''x'' and the
dependent variable
Dependent and independent variables are variables in mathematical modeling, statistical modeling and experimental sciences. Dependent variables receive this name because, in an experiment, their values are studied under the supposition or demand ...
''y'' is modelled as an ''n''th degree
polynomial in ''x''. Polynomial regression fits a nonlinear relationship between the value of ''x'' and the corresponding
conditional mean of ''y'', denoted E(''y'' , ''x''). Although ''polynomial regression'' fits a nonlinear model to the data, as a
statistical estimation problem it is linear, in the sense that the regression function E(''y'' , ''x'') is linear in the unknown
parameters that are estimated from the
data. For this reason, polynomial regression is considered to be a special case of
multiple linear regression.
The explanatory (independent) variables resulting from the polynomial expansion of the "baseline" variables are known as higher-degree terms. Such variables are also used in
classification Classification is a process related to categorization, the process in which ideas and objects are recognized, differentiated and understood.
Classification is the grouping of related facts into classes.
It may also refer to:
Business, organizat ...
settings.
History
Polynomial regression models are usually fit using the method of
least squares
The method of least squares is a standard approach in regression analysis to approximate the solution of overdetermined systems (sets of equations in which there are more equations than unknowns) by minimizing the sum of the squares of the res ...
. The least-squares method minimizes the
variance of the
unbiased estimators of the coefficients, under the conditions of the
Gauss–Markov theorem. The least-squares method was published in 1805 by
Legendre and in 1809 by
Gauss. The first
design of an
experiment for polynomial regression appeared in an 1815 paper of
Gergonne. In the twentieth century, polynomial regression played an important role in the development of
regression analysis, with a greater emphasis on issues of
design and
inference
Inferences are steps in reasoning, moving from premises to logical consequences; etymologically, the word '' infer'' means to "carry forward". Inference is theoretically traditionally divided into deduction and induction, a distinction that in ...
. More recently, the use of polynomial models has been complemented by other methods, with non-polynomial models having advantages for some classes of problems.
Definition and example
The goal of regression analysis is to model the expected value of a dependent variable ''y'' in terms of the value of an independent variable (or vector of independent variables) ''x''. In simple linear regression, the model
:
is used, where ε is an unobserved random error with mean zero conditioned on a
scalar variable ''x''. In this model, for each unit increase in the value of ''x'', the conditional expectation of ''y'' increases by ''β''
1 units.
In many settings, such a linear relationship may not hold. For example, if we are modeling the yield of a chemical synthesis in terms of the temperature at which the synthesis takes place, we may find that the yield improves by increasing amounts for each unit increase in temperature. In this case, we might propose a quadratic model of the form
:
In this model, when the temperature is increased from ''x'' to ''x'' + 1 units, the expected yield changes by
(This can be seen by replacing ''x'' in this equation with ''x''+1 and subtracting the equation in ''x'' from the equation in ''x''+1.) For
infinitesimal
In mathematics, an infinitesimal number is a quantity that is closer to zero than any standard real number, but that is not zero. The word ''infinitesimal'' comes from a 17th-century Modern Latin coinage ''infinitesimus'', which originally referr ...
changes in ''x'', the effect on ''y'' is given by the
total derivative with respect to ''x'':
The fact that the change in yield depends on ''x'' is what makes the relationship between ''x'' and ''y'' nonlinear even though the model is linear in the parameters to be estimated.
In general, we can model the expected value of ''y'' as an ''n''th degree polynomial, yielding the general polynomial regression model
:
Conveniently, these models are all linear from the point of view of
estimation, since the regression function is linear in terms of the unknown parameters ''β''
0, ''β''
1, .... Therefore, for
least squares
The method of least squares is a standard approach in regression analysis to approximate the solution of overdetermined systems (sets of equations in which there are more equations than unknowns) by minimizing the sum of the squares of the res ...
analysis, the computational and inferential problems of polynomial regression can be completely addressed using the techniques of
multiple regression. This is done by treating ''x'', ''x''
2, ... as being distinct independent variables in a multiple regression model.
Matrix form and calculation of estimates
The polynomial regression model
:
can be expressed in matrix form in terms of a design matrix
, a response vector
, a parameter vector
, and a vector
of random errors. The ''i''-th row of
and
will contain the ''x'' and ''y'' value for the ''i''-th data sample. Then the model can be written as a system of linear equations:
:
which when using pure matrix notation is written as
:
The vector of estimated polynomial regression coefficients (using
ordinary least squares
In statistics, ordinary least squares (OLS) is a type of linear least squares method for choosing the unknown parameters in a linear regression model (with fixed level-one effects of a linear function of a set of explanatory variables) by the prin ...
estimation) is
:
assuming ''m'' < ''n'' which is required for the matrix to be invertible; then since
is a
Vandermonde matrix, the invertibility condition is guaranteed to hold if all the
values are distinct. This is the unique least-squares solution.
Interpretation
Although polynomial regression is technically a special case of multiple linear regression, the interpretation of a fitted polynomial regression model requires a somewhat different perspective. It is often difficult to interpret the individual coefficients in a polynomial regression fit, since the underlying monomials can be highly correlated. For example, ''x'' and ''x''
2 have correlation around 0.97 when x is
uniformly distributed on the interval (0, 1). Although the correlation can be reduced by using
orthogonal polynomials, it is generally more informative to consider the fitted regression function as a whole. Point-wise or simultaneous
confidence bands can then be used to provide a sense of the uncertainty in the estimate of the regression function.
Alternative approaches
Polynomial regression is one example of regression analysis using
basis functions
In mathematics, a basis function is an element of a particular basis for a function space. Every function in the function space can be represented as a linear combination of basis functions, just as every vector in a vector space can be repres ...
to model a functional relationship between two quantities. More specifically, it replaces
in linear regression with polynomial basis
, e.g.