Ordinary Least Square-PART 1

Shaily jain
3 min readApr 17, 2021

Let’s get this clear, it is beautiful when you understand something clearly ..and especially if it is an algorithm. It immediately gives you confident that you can rule the world.

So here is my in-depth intuition of what linear regression is about, jotting down if so that i can revise it later :)

We have all seen something like

for observation i

Assumptions of OLS Regression

  • The equation is assumed to be linear in parameter. Yes, it is parameters and not independent variable x. if it is logx , e^x , x² , you can simply say these functions to be some other variable t and carry on the regression.
  • The independent variable x is deterministic variable as we know it beforehand and it can not change after observation is recorded. The response and explanatory variable have exact relationship, that is given x, we can predict y with 100% certainty which gives OLS estimation a deterministic relationship.
  • Epsilon here is a random variable which has Normal Distribution.
  • Expectation of Epsilon is zero.
  • Homoscedasticity :Variance of Epsilon is constant for all i. The below graph shows the plot which can be evaluated to check this condition, where epsilon is plotted against each observation.
  • Zero Autocorrelation: This means that the episilons of two observation are not correlated and are independent that is mathematically
  • Epsilons are independent of their corresponding independent variable values. i.e.
  • Number of observations are greater than number of parameters, where parameters are betas and also constant variance term of epsilon. As they completely determine the picture of the response variable.

Properties of OLS Regression

Following are the properties without proof

Another important point to note is that Regression hyperplane passes through the means of the observed values(i.e. mean of X and mean of y) .

I think it is too much for this article, lets carry on OLS normal equations in a separate blog.

Thanks for staying till the end. Do like and follow me on instagram codatalicious

Resources:

https://www.albert.io/blog/key-assumptions-of-ols-econometrics-review/ , https://web.stanford.edu/~mrosenfe/soc_meth_proj3/matrix_OLS_NYU_notes.pdf

--

--

Shaily jain

Problem Solver, Data Science, Actuarial Science, Knowledge Sharer, Hardcore Googler