Economics

Ordinary Least Squares

Updated Sep 8, 2024

Definition of Ordinary Least Squares (OLS)

Ordinary Least Squares (OLS) is a method used in statistics to estimate the parameters of a linear regression model. OLS aims to find the line (or hyperplane, in multiple dimensions) that minimizes the sum of the squared differences between the observed values and the values predicted by the linear model. This method is one of the most common approaches for the estimation of linear relationships between variables.

How OLS Works

To understand how OLS works, imagine you are trying to predict household electricity consumption based on income. You have a dataset containing information on the monthly income of several households and their respective monthly electricity usage.

In an OLS model, you would use income as your independent variable (X) and electricity consumption as your dependent variable (Y). The OLS method would calculate the best-fitting linear relationship between X and Y by minimizing the sum of the squared vertical distances (errors) from each observed value of Y to the line defined by the estimated linear equation Y = β0 + β1X, where β0 is the Y-intercept and β1 is the slope.

The mathematical formula for the sum of squared residuals is given by:

\[ SSR = \sum_{i=1}^{n} (y_i – \hat{y_i})^2 \]

where \(y_i\) is the observed value, \(\hat{y_i}\) is the predicted value, and \(n\) is the number of observations.

Real-World Example

Consider a study examining the relationship between education (in years) and salary (annual in USD). The researcher collects data from a sample population, with education as the independent variable and salary as the dependent variable. Using OLS, the researcher aims to estimate the average change in salary associated with an additional year of education.

Upon applying the OLS method, they might find an equation such as Salary = 20,000 + 3,000*Education. This equation suggests that, holding other factors constant, an additional year of education is associated with an average salary increase of $3,000.

Why Ordinary Least Squares Matters

OLS is crucial in econometrics, statistics, and various fields that rely on understanding and quantifying relationships between variables. Its importance stems from several factors:

Optimality: Under certain conditions (e.g., the error terms are normally distributed and homoscedastic), OLS estimators are the best linear unbiased estimators (BLUE), meaning they have the smallest variance among all linear estimators.
Predictive Accuracy: OLS helps in creating models that accurately predict the value of a dependent variable based on one or more independent variables.
Simplicity: Despite its simplicity, OLS can provide profound insights into the relationships between variables, facilitating decision-making and policy formulation.

Frequently Asked Questions (FAQ)

Can OLS be used for non-linear relationships?

OLS is primarily designed for linear models. However, it can be adapted to estimate non-linear relationships by transforming the dependent or independent variables, allowing for the modeling of a wider range of relationships through polynomial or logarithmic terms, for example.

What are the key assumptions behind OLS?

For OLS estimators to be BLUE, several key assumptions must hold, including:
– Linearity of the relationship between dependent and independent variables.
– Homoscedasticity (constant variance of error terms).
– No or little multicollinearity (independence between independent variables).
– Independence and normal distribution of error terms.

Failure to meet these assumptions can lead to biased, unreliable estimates.

How does OLS handle outliers?

OLS is sensitive to outliers in the data. Outliers can significantly affect the slope and intercept of the regression line, leading to a poor fit for the bulk of the data. Various techniques, such as robust regression methods, are used to mitigate the influence of outliers on regression estimates.