[Music] here's a refresher of your econometric skills that will be useful when you read research papers okay so let's talk about the regression model we are often concerned with the relationship between x and y that is we want to quantify how much y changes when x changes one way to do that is to estimate the best straight line that describes this relationship mathematically we can think of this as the line being described by beta0 and intercept and by beta1 a slope parameter so then everything becomes fairly simple y i is equal to beta0 plus beta1
times xi and we also add an error term which we can call ui this one will be important in a second and this is what the straight line looks like a way to estimate parameters beta0 and beta1 is to use so-called ordinary least-squares regression or ols here's where the error term u comes in we find the betas that minimize the sum of squared residuals in other words we minimize the error terms you can think of this as minimizing the distance between the straight line and the data points let's have a look at our graph this
is data point 1 or y1 the corresponding point on the straight line is another y1 but this time with a little head on top what is this head we always use hats when we talk about predictions that come out of our model [Music] y1 hat is the corresponding point on our straight line for a given value of x1 the difference between y1 and y1 hat is the predicted residual this is the actual error that we are making by approximating the location of this data point with a straight line here's another example y2 is the second
data point this one is slightly above the estimated line according to our model y2 hat would be smaller and here we have the error term you had 2. now it becomes clear why we want to minimize the sum of squared errors because there might be positive error terms as well as negative error terms and by taking the square we can take care of all of them