Regression analysis
What Is Regression Analysis?
Regression analysis is a statistical technique for modeling the relationship between one or more explanatory variables and a response variable. It produces a mathematical function that summarizes how changes in the predictors correspond to changes in the outcome, and that function can then be used for prediction, estimation, and hypothesis testing. The method traces its origins to the work of Francis Galton in the 1880s and was formalized in its modern form by Karl Pearson, Ronald Fisher, and later contributors in econometrics and operations research.
The technique sits at the intersection of classical statistics, applied mathematics, and data science. It draws on probability theory for inference, linear algebra for computation, and optimization for parameter estimation. Any discipline that asks "how much does Y change when X changes?" is asking a regression question.
Linear and Nonlinear Regression
Linear least squares regression is by far the most widely used modeling variant. It fits a straight-line (or hyperplane, in multiple dimensions) relationship between predictors and outcome by minimizing the sum of squared residuals. The NIST/SEMATECH e-Handbook of Statistical Methods defines this as finding the set of parameter estimates that makes the sum of squared differences between observed and predicted values as small as possible. The resulting coefficient estimates are interpretable directly: a coefficient of 2.5 on a predictor means that a one-unit increase in that predictor is associated with a 2.5-unit increase in the response, holding other variables fixed.
Nonlinear least squares regression extends this framework to functions that cannot be expressed as linear combinations of the parameters, covering exponential growth models, dose-response curves, and other forms common in biology, chemistry, and engineering. The NIST treatment of nonlinear least squares notes that almost any function that can be written in closed form can serve as a nonlinear regression model. The fitting algorithm iterates from a starting guess rather than solving a closed-form equation, which makes convergence sensitive to initialization but allows far more flexible model shapes.
Model Evaluation and the Correlation Coefficient
Assessing how well a regression model fits the data requires a suite of diagnostics. The coefficient of determination R-squared measures the proportion of variance in the response that is explained by the model, ranging from zero (no fit) to one (perfect fit). The Pearson correlation coefficient captures the linear association between two continuous variables and, when squared, gives the R-squared for simple linear regression.
Beyond these summary statistics, residual plots, Cook's distance for influential observations, and cross-validation error provide a more complete picture of model adequacy. A model with a high R-squared that fails residual diagnostics may still be badly misspecified, particularly if the true relationship is nonlinear or if outliers dominate the fit.
Machine Learning Extensions
Classical regression assumes parametric forms and produces interpretable coefficients, but many real-world relationships are too complex for a single equation. Random forests, introduced by Leo Breiman in 2001, extend regression to nonlinear and high-dimensional settings by averaging the predictions of many decision trees, each trained on a bootstrap sample of the data with a random subset of predictors at each split. The resulting ensemble is robust to outliers, handles interactions automatically, and often achieves lower prediction error than linear models.
Nearest neighbor methods take a different approach, predicting the response for a new observation by averaging the outcomes of the k most similar training points. Unlike parametric regression, nearest neighbor methods make no assumption about functional form, which makes them flexible but also susceptible to the curse of dimensionality in high-dimensional problems.
Applications
Regression analysis has applications in a wide range of disciplines, including:
- Econometrics and economic forecasting, where it underlies models of price elasticity and wage determination
- Clinical trials and epidemiology, for estimating treatment effects and risk factors
- Quality control in manufacturing, linking process parameters to product defect rates
- Environmental science, modeling the relationship between emissions and temperature or pollutant concentrations
- Financial modeling, including risk factor analysis and asset pricing