Linear regression

Revision as of 12:57, 20 August 2026 by WikiSysopIG (talk | contribs) (Created page with "'''Linear regression''' is a statistical method used to model the relationship between a dependent variable and one or more explanatory variables by estimating a linear function. In the simplest case, linear regression relates one dependent variable <math>Y</math> to one explanatory variable <math>X</math>. A simple linear regression model is: <math> Y_i = \beta_0 + \beta_1X_i + \epsilon_i </math> where: * <math>Y_i</math> = observed value of the dependent varia...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Linear regression is a statistical method used to model the relationship between a dependent variable and one or more explanatory variables by estimating a linear function.

In the simplest case, linear regression relates one dependent variable Y to one explanatory variable X.

A simple linear regression model is:

Yi=β0+β1Xi+ϵi

where:

  • Yi = observed value of the dependent variable;
  • Xi = observed value of the explanatory variable;
  • β0 = intercept;
  • β1 = slope coefficient;
  • ϵi = error term;
  • i = observation index.

The fitted regression equation is:

Ŷi=β̂0+β̂1Xi


contentReference[oaicite:0]{index=0}


Ordinary least squares

The most common method for estimating the coefficients of a linear regression is ordinary least squares (OLS).

OLS chooses the coefficients that minimize the sum of squared residuals:

minβ0,β1∑i=1n(Yi−β0−β1Xi)2

The residual for observation i is:

ei=Yi−Ŷi

The objective of OLS is therefore to minimize:

∑i=1nei2

Slope coefficient

For simple linear regression, the estimated slope coefficient can be calculated as:

β̂1=∑i=1n(Xi−X¯)(Yi−Y¯)∑i=1n(Xi−X¯)2

where:

  • X¯ = sample mean of X;
  • Y¯ = sample mean of Y.

The slope measures the estimated change in Y associated with a one-unit change in X.

Intercept

The estimated intercept is:

β̂0=Y¯−β̂1X¯

The intercept represents the fitted value of Y when X=0, although its practical interpretation depends on the context and whether X=0 is meaningful.

Regression in finance

Linear regression is widely used in finance to examine relationships between asset returns and market returns, economic variables, or other risk factors.

A simplified market model is:

Ri=αi+βiRm+ϵi

where:

  • Ri = return of asset i;
  • αi = intercept or regression alpha;
  • βi = sensitivity of the asset to market returns;
  • Rm = market return;
  • ϵi = residual return.

The fitted equation is:

R̂i=α̂i+β̂iRm

In this formulation, beta represents the slope of the regression line and measures the estimated sensitivity of the asset's returns to changes in the market return.

Beta estimation

For a regression of an asset's returns against market returns, beta can be expressed as:

β̂i=Cov⁡(Ri,Rm)Var⁡(Rm)

Using correlation, this can also be written as:

β̂i=ρi,mσiσm

where:

  • ρi,m = correlation between asset and market returns;
  • σi = standard deviation of asset returns;
  • σm = standard deviation of market returns.

Coefficient of determination

The coefficient of determination, commonly denoted as R2, measures the proportion of variation in the dependent variable explained by the fitted regression model.

A common expression is:

R2=1−∑i=1n(Yi−Ŷi)2∑i=1n(Yi−Y¯)2

where:

  • the numerator represents the residual sum of squares;
  • the denominator represents the total sum of squares.

For a simple linear regression with an intercept:

R2=rXY2

where rXY is the Pearson correlation coefficient.

Multiple linear regression

Multiple linear regression extends the model to two or more explanatory variables.

A simplified model is:

Yi=β0+β1X1,i+β2X2,i+⋯+βkXk,i+ϵi

The fitted model is:

Ŷi=β̂0+β̂1X1,i+β̂2X2,i+⋯+β̂kXk,i

Multiple regression allows the relationship between the dependent variable and one explanatory variable to be estimated while controlling for the other included variables.

Factor models

Linear regression is commonly used to estimate factor models in finance.

A simplified multifactor model is:

Ri−Rf=αi+βi1F1+βi2F2+⋯+βikFk+ϵi

where:

  • Ri−Rf = asset's excess return;
  • Fk = factor k;
  • βik = asset's exposure to factor k;
  • αi = intercept;
  • ϵi = residual return.

Such models can be used to estimate an asset's exposure to market, size, value, momentum, quality, and other factors.

Residuals

A regression residual is the difference between the observed value and its fitted value:

ei=Yi−Ŷi

The residual represents the portion of the observed outcome that is not explained by the fitted regression equation.

In financial models, residual returns can represent asset-specific or idiosyncratic components after accounting for the included explanatory factors.

Statistical significance

Regression coefficients can be evaluated using statistical tests.

For a coefficient βj, a common null hypothesis is:

H0:βj=0

against an alternative hypothesis such as:

H1:βj≠0

A t-statistic can be represented as:

t=β̂j−βj,0SE⁡(β̂j)

where:

  • β̂j = estimated coefficient;
  • βj,0 = hypothesized coefficient value;
  • SE⁡(β̂j) = standard error of the estimated coefficient.

Statistical significance does not by itself establish economic significance or causation.

Assumptions

Classical OLS inference commonly relies on assumptions concerning the regression model and its error terms.

Depending on the application, these may include:

  • linearity of the conditional mean;
  • appropriate specification of the model;
  • independence or appropriate dependence structure of observations;
  • absence of problematic perfect multicollinearity;
  • constant error variance for conventional homoskedastic inference;
  • appropriate conditions for statistical inference.

Normality of errors is not required for OLS coefficient estimation itself, although it can be relevant for certain small-sample inferential procedures.

Limitations

Linear regression has several limitations:

  • it assumes a linear conditional relationship;
  • results can be sensitive to outliers;
  • omitted variables can affect coefficient estimates;
  • multicollinearity can make individual coefficients difficult to interpret;
  • correlation does not establish causation;
  • model estimates can change when the sample period changes;
  • financial relationships may be nonlinear or unstable over time.

In financial markets, regression results should therefore be interpreted in the context of the model specification, sample period, data quality, and underlying economic assumptions.

See also