ABCDEFGHIJKLMNOPQRSTUVWXYZ
1
Ordinary least squares for a simple regression
P=20-2Q
2
Suppose we have 4 observations
3
on price and quantity:
4
Obs. #QuantityPriceee*e
5
1311-39
6
261139
7
356-416
8
4104416
9
Average6850
10
11
12
A. Least squares principle: Find slope
13
and intercept to minimize sum
14
of squared residuals. Why?
15
16
17
18
B. Residual =
19
20
C. Residual Sum of Squares (RSS)=
21
22
D. Using calculus and solving, we get
23
24
These numbers give the OLS or least squares estimates
25
of the true slopes.
26
27
E. Now, calculate
28
for each of the four observations.
29
F. Now, calculate the residuals for the four observations.
30
G. Add the residuals up. What do you get?
31
17.65384615
32
H. Calculate the standard error of the regression: SER=
8.826923077
33
2.971013813
34
RSS
35
I. Now calculate the Total Sum of Squares: TSS=
38ESS
36
TSS
37
38
39
J. Now calculate the Explained Sum of Squares: ESS=
20.34615385
40
41
42
43
K.    Now calculate R2:
44
since ESS+RSS=TSS. What does it mean?
45
46
0.53542510121-0.4645748988
47
L.     Now calculate
48
. What does it mean?
0.303145
49
-0.39371
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100