Skip to main content
← Back to P Definitions

Polynomial regression

What Is Polynomial Regression?

Polynomial regression is a form of statistical modeling in data analysis that extends traditional linear regression to model non-linear relationships between a dependent variable and one or more independent variables. While linear regression seeks to fit a straight line to the data, polynomial regression fits a curved line, or a polynomial function, to capture more complex patterns. This approach is particularly useful in quantitative analysis when the underlying relationship between variables is not linear.

History and Origin

The foundational concepts of regression analysis, including the method of least squares which is used to fit polynomial regression models, were independently published by Adrien-Marie Legendre in 1805 and Carl Friedrich Gauss in 1809. The first design for an experiment specifically for polynomial regression appeared in a paper by Joseph Diaz Gergonne in 1815. The term "regression" itself was later popularized by Sir Francis Galton in the late 19th century through his studies on heredity, where he observed "regression toward the mean" in inherited traits like height.14, 15 Over the 20th century, polynomial regression played a significant role in the development of broader regression analysis, with increasing focus on model design and inference.

Key Takeaways

  • Polynomial regression models non-linear relationships by fitting a curved line to data.
  • It is an extension of linear regression, incorporating higher-degree terms of the independent variable.
  • A key challenge is selecting the appropriate polynomial degree to avoid overfitting or underfitting the data.
  • This technique is widely applied in fields like finance, economics, and engineering for prediction and understanding complex patterns.

Formula and Calculation

Polynomial regression models the relationship between the independent variable (x) and the dependent variable (y) as an (n)-th degree polynomial. For a single independent variable, the general formula is:

y=β0+β1x+β2x2++βnxn+ϵy = \beta_0 + \beta_1 x + \beta_2 x^2 + \ldots + \beta_n x^n + \epsilon

Where:

  • (y) is the dependent variable (the value to be predicted).
  • (x) is the independent variable (the predictor).
  • (\beta_0) is the intercept.
  • (\beta_1, \beta_2, \ldots, \beta_n) are the coefficients for each polynomial term.
  • (n) is the degree of the polynomial, representing the highest power of the independent variable.
  • (\epsilon) is the error term, representing the random variability not explained by the model.

The coefficients ((\beta) values) are estimated using methods like ordinary least squares, which minimize the sum of the squared residuals (the differences between observed and predicted values). This is similar to how coefficients are calculated in linear regression.

Interpreting the Polynomial Regression

Interpreting a polynomial regression model involves understanding the shape of the fitted curve and how the different polynomial terms contribute to explaining the dependent variable. Unlike linear regression, where a single coefficient indicates a constant change in the dependent variable for a unit change in the independent variable, the interpretation of individual coefficients in polynomial regression is more nuanced. The effect of the independent variable (x) on (y) depends on the value of (x) itself, due to the squared, cubed, or higher-order terms.

A positive coefficient for an (x^2) term, for instance, suggests a U-shaped curve, while a negative coefficient would indicate an inverted U-shape. The higher the degree of the polynomial, the more bends or turns the curve fitting can capture, reflecting more complex patterns in the data. Evaluating the overall predictive power of the model often involves metrics like R-squared or examining the patterns of the residuals.

Hypothetical Example

Consider a hypothetical scenario where an analyst is studying the relationship between a company's research and development (R&D) expenditure (independent variable) and its subsequent annual revenue growth (dependent variable). A simple linear model might not capture the full picture, as R&D might initially lead to slow growth, then accelerate, and eventually plateau or diminish in returns at very high levels due to diminishing marginal returns or other factors.

An analyst collects five years of data:

R&D Expenditure (in $ millions, x)Revenue Growth (in %, y)
103
208
3015
4018
5017

A visual inspection of these points suggests a curve rather than a straight line. The analyst decides to fit a second-degree (quadratic) polynomial regression model:

\text{Revenue Growth} = \beta_0 + \beta_1 (\text{R&D}) + \beta_2 (\text{R&D})^2 + \epsilon

After fitting the model, suppose the estimated equation is:

\text{Revenue Growth} = -5 + 0.8 (\text{R&D}) - 0.01 (\text{R&D})^2

This model suggests that revenue growth initially increases with R&D, but the negative coefficient for the squared term indicates that the rate of increase slows down and eventually turns downwards at higher R&D levels, forming an inverted U-shape. Using this model, the analyst can estimate revenue growth for R&D expenditures not explicitly in the dataset, performing interpolation within the observed range or cautious extrapolation beyond it.

Practical Applications

Polynomial regression finds diverse applications in various quantitative fields, including finance and economics. In finance, it can be used to model the relationship between stock prices and various economic indicators, such as Gross Domestic Product (GDP), inflation rates, or interest rates. By fitting a polynomial curve to historical data, analysts can predict future stock price movements or financial trends with greater accuracy when non-linear patterns are present.12, 13

Beyond finance, polynomial regression is applied in:

  • Engineering: Modeling complex systems, analyzing material behavior under different conditions, or predicting outcomes in areas like structural analysis.
  • Economics: Estimating the relationship between macroeconomic variables, such as inflation and unemployment, or analyzing economic cycles.11
  • Environmental Science: Modeling temperature variations, population growth, or the distribution of substances in ecosystems where relationships are often curvilinear.

These real-world applications demonstrate the utility of polynomial regression in capturing intricate patterns that linear models might overlook.

Limitations and Criticisms

While powerful for modeling non-linear relationships, polynomial regression has several limitations. A primary concern is overfitting, especially when a high-degree polynomial is used. An overfitted model learns the noise in the training data rather than the underlying pattern, leading to poor performance on new, unseen data.9, 10 The model becomes too complex, fitting the training data very closely but losing its ability to generalize.7, 8

Another criticism is that polynomial regression can be highly sensitive to outliers. The presence of just one or two extreme data points can significantly distort the fitted curve, leading to unreliable results.5, 6 Additionally, higher-degree polynomial models can suffer from multicollinearity, particularly when the independent variables (i.e., (x), (x2), (x3), etc.) are highly correlated, which can make it difficult to interpret the individual coefficients meaningfully.4 Numerical precision can also become an issue, especially with very high-degree polynomials, as calculations may become unstable.3 Careful model complexity selection and techniques like cross-validation and regularization are essential to mitigate these issues and ensure robust models.2

Polynomial Regression vs. Linear Regression

Polynomial regression is often compared to linear regression, as the former is an extension of the latter. The fundamental difference lies in the nature of the relationship they can model:

FeatureLinear RegressionPolynomial Regression
Relationship ModeledAssumes a straight-line (linear) relationship.Models curved (non-linear) relationships.
Equation Form(y = \beta_0 + \beta_1 x + \epsilon)(y = \beta_0 + \beta_1 x + \ldots + \beta_n x^n + \epsilon)
FlexibilityLess flexible; best for simple, direct trends.More flexible; can capture complex, curvilinear patterns.
Model ComplexitySimpler, fewer parameters, easier to interpret.More complex, higher-degree polynomials mean more parameters, harder to interpret individual coefficients.
Overfitting RiskLess prone to overfitting.Higher risk of overfitting, especially with high degrees.

While linear regression is simpler and more interpretable for linear trends, polynomial regression excels when data clearly exhibits a curved pattern that a straight line cannot adequately represent. The choice between the two depends on the underlying nature of the data and the specific objectives of the analysis.

FAQs

What is the "degree" in polynomial regression?

The "degree" in polynomial regression refers to the highest power of the independent variable in the model's equation. For example, a second-degree polynomial (quadratic) includes (x2), while a third-degree polynomial (cubic) includes (x3). The choice of degree dictates the flexibility and shape of the fitted curve.

When should I use polynomial regression instead of linear regression?

You should consider using polynomial regression when the relationship between your dependent variable and independent variable appears to be non-linear. If a scatter plot of your data shows a clear curve rather than a straight line, polynomial regression can provide a better fit and more accurate predictions.

Can polynomial regression be used with multiple independent variables?

Yes, polynomial regression can be extended to include multiple independent variables, known as multivariate polynomial regression. This involves adding polynomial terms for each independent variable and potentially interaction terms between them, further increasing model complexity.

How do I choose the right degree for my polynomial model?

Choosing the optimal degree is crucial. A common approach involves evaluating models of different degrees using statistical metrics and techniques like cross-validation. This helps assess how well the model generalizes to new data, balancing the need for a good fit against the risk of overfitting.1 Hypothesis testing can also be used to determine if higher-order terms significantly improve the model's explanatory power.

AI Financial Advisor

Get personalized investment advice

  • AI-powered portfolio analysis
  • Smart rebalancing recommendations
  • Risk assessment & management
  • Tax-efficient strategies

Used by 30,000+ investors