4.2 Least squares estimates
An appropriate estimator which gives the “best” parameter estimates should be considered
Commonly used estimator is least squares estimator which originates from the OLS method (Ordinary Least Squares)
In bivariate regression the OLS method is concerned with finding the regression line that gives the best fit to data points such that the sum of squared residuals is small as possible, hence the term “least squares”
minn∑i=1ˆu2i=n∑i=1(yi−(ˆβ0+ˆβ1xi))2
- Differential calculus is used to obtain ˆβ0 and ˆβ1 that minimize the sum of squared residuals (SSR)
ˆβ1=n∑i=1(xi−ˉx)(yi−ˉy)n∑i=1(xi−ˉx)2=Cov(x,y)S2xˆβ0=ˉy−ˆβ1ˉx
Example 4.1 A real estate agent wishes to examine the relationship between the selling price of a house and its size (measured in square meters). A random sample of ten houses is selected (n=10). Insert data from table 4.3 to Excel and plot Scattergram
. Add a regression line to the same plot. Afterwords, compute the same OLS estimates using functions =INTERCEPT()
and =SLOPE()
. Give interpretation of both regression coefficients.
size in m2 | price in 1000s USD |
---|---|
130 | 245 |
148 | 213 |
157 | 279 |
174 | 308 |
102 | 199 |
143 | 219 |
218 | 405 |
227 | 324 |
132 | 319 |
157 | 255 |
Excel instructions: insert the data in Excel manually and select both columns including the variables names. On the Insert
tab click XY (Scatter)
and select the firs chart subtype that doesn’t include any lines. In the next step right-click any single point inside the chart and select Add Trendline
from drop down options. From the Trendline
menu check both boxes the Display Equation on Chart
and the Display R-Squared Value on Chart
(linear equation is default). Afterwords, use functions =INTERCEPT(known_ys;known_xs)
and =SLOPE(known_ys;known_xs)
to compute OLS estimates for constant and slope. The first argument of both functions is the range of dependent variable, while the second argument is always the range of independent variable.
^pricei=98.115+1.1863⋅sizei
The slope ˆβ1=1.1863 tell us that the average value of a house increases by 1.1863(1000)=1186.3 USD, for each additional one square meter of size
The constant term ˆβ0=98.115(1000)=98115 USD just indicates that 98115 is the portion of the house price not explained by it’s size
The R2 is commonly used as a goodness of fit measure