Thursday, December 27, 2018

Ordinary Least Square (OLS)

Ordinary Least Square (OLS) is used to measure the relationship between different independent variables. The variables can be real life concepts. For example; sales, income, cash flows, GDP, grades, stock prices, etc. In a broader sense, almost anything there is data of. OLS has two different defined variables and they are the dependent variable and the independent variable, also called the explanatory variable. The explanatory variables explains the dependent variable. The dependent variable is the variable being explained and is denoted with the letter y, because it also represent the y axis on a x & y table. There could be many explanatory variables for example in GDP.

GDP can symbolize the dependent variable which would be y. The explanatory variables would be consumption, investment, government expenditures, and net exports - ( x1, x2, … ). Thus, GDP is explain by consumption, investment, government expenditures and net exports ( GDP = I + C + G + X ). Another example could be: profit = inventory, cost of labor, advertisement, etc. OLS is a simple way of estimating and explaining the relationship between dependent variable and explanatory variables. There are other ways of finding regression for example logistic regression.

OLS takes the dependent variable and crates a linear regression with the explanatory variables. A regression is the measure relationship between variables. In OLS there is positive linear regression, which creates a upward sloping line, negative linear relation, which creates a downward sloping line, and (norelation) or none linear regression, which creates a horizontal straight line. Thus, OLS answers the question of; if there is a linear relation between the dependent variable and explanatory variable what would it look like? OLS not just answers the question, but gives out information like goodness of fit and how much there is a relation.

OLS creates linear regression using ordinary least squares and gives out an estimate of relationship between the dependent variables and explanatory variable. Ordinary least square is a way of creating the linear regression. There are other ways of estimation the linear regression for example bayes linear regression and matrix form of linear regression. Mathematically OLS is written as y = Bx0 + Bx1 + e. Where y is the dependent variable. Bx0 is the intercept coefficient. The intercept coefficient answers the question of what would y be if x is zero.

There are other types of regression for example, logistic regression which uses the logistic function to create the regression model. OLS is a linear regression and takes the ordinary least square to create a linear estimate. The linear regression created is an estimation of the relationship between the dependent variable and the explanatory variables if a linear line  was running in middle of the data. The slope of the line, which is the the change of the linear line, would give an estimate of how much the explanatory variables changes the dependent variable. Another way of explaining it is, one movement in x would give the beta (b) change in y.

Examples where OLS linear regression is used include in economics especially in econometrics. OLS can be used to estimate GDP (growth) of a country, state, city region. In business environment, OLS linear regression can be used to to predict future sales by pass buying behaviour.