DOC PREVIEW
UCSB ECON 240a - lecture_8

This preview shows page 1-2-3-4 out of 11 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 11 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 11 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 11 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 11 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 11 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Source of VariationSum of SquaresDegrees of FreedomMean SquareSource of VariationSum of SquaresDegrees of FreedomMean SquareOct. 19, 2010 LEC #8 ECON 140A/240A-1 L. PhillipsCorrelation and Analysis of VarianceI. IntroductionPursuing the results from the ordinary least squares estimates of the linear model from the previous lecture, we investigate correlation, measures of goodness of fit, and analysis of variance. Then we turn to issues of central tendency and dispersion for the parameter estimates of the intercept and slope.II. CorrelationRecall that in Lectures Four and Six we introduced the covariance between y and x as a measure of the relationship between these variables,E[(y – Ey)(x – Ex)] = Cov(yx). (1)The covariance depends on units of measurement, so it is not a relative measure. We can go back to the linear model, Eq. (4), from the previous lecture and see the relationship between the variance of y and the covariance of y and x:yi = a + b xi + ui .(2)Taking expectations,E y = a + b E x + Eu (3)The mean of the error term, E u, is zero by assumption and we have seen that the sample mean of the estimated error is zero, i.e. iuˆi/n =0.Subtract Eq. (3) from Eq. (2) to write in deviation form:(y - Ey) = b (x – Ex) + u. (4)Multiply both sides by (x – Ex) and take expectations. If the residual u is independent of the explanatory variable, which is another assumption of regression analysis, then E[(y - Ey)(x – Ex)] = b E(x – Ex)2 + E[ (x – Ex) u] = b Var x . (5)Oct. 19, 2010 LEC #8 ECON 140A/240A-2 L. PhillipsCorrelation and Analysis of VarianceSolving for the slope b,b = Cov yx/Var x. (6) We can estimate the parameter b using the method of moments, which substitutes the sample estimates for the population entities of Cov yx and Var x:bˆ = i[(yi - iyi /n)(xi - ixi /n)][ )(xi - ixi /n) )(xi - ixi /n). (7)This is the same formula as the ordinary least squares solution given by Eq. (15) in the previous lecture. To see this, rewrite Eq. (7) above as:bˆ = i(yi - )y(xi - x)  i(xi - x)2 , (8)and expanding,bˆ = i(yi xi - y xi - xyi + xy )  i[(xi )2 - 2 xxi + (x )2 ],(9)and taking summations,bˆ = [i(yi xi )- y ixi - xiyi + nxy ]  [i(xi )2 - 2 xixi + n(x )2 ](10)and collecting terms,bˆ = (iyi xi - nxy )  [i(xi )2 - n(x )2], (11)and multiplying top and bottom by n/n:bˆ = [niyi xi – (i yi )(ixi )]  [ni(xi )2 –(ixi )2], (12) the same as Eq. (15), as promised.We can use Eq. (4) to pursue the relationship between variances of y, x, and u. Square both sides of Eq. (4) and take expectations:Oct. 19, 2010 LEC #8 ECON 140A/240A-3 L. PhillipsCorrelation and Analysis of VarianceE(y – Ey)2 = b2 E(x – Ex)2 + 2b E[(x – Ex)u] + E u2 , (13)orVar y = b2 Var x + Var u, (14)since another assumption of least squares, as discussed above, is that the explanatory variable, x, is independent of the error u, so their covariance is zero, i.e E[(x – Ex)u] = 0. Thus the total variance in y can be decomposed into two parts, the variance explained by y’s dependence on x, b2 Var x, called the signal, and the unexplained variance, Var u, called the noise.Combining Eq.’s (6) and (14),Var y = [Cov yx]2  Var x] + Var u, (15)And dividing by the variance of y:1 = {[Cov yx]2  [Var xVar y] }+ Var u/Var y, (16)where 1 – Var u/Var y is one minus the ratio of the unexplained variance to the total variance, i.e. 1 – Var u/Var y 1 – unexplained variance/total variance, (17) (total variance – unexplained variance)/ total variance, (18) explained variance/total variance, (19)and from Eq. (16), this fraction of the total variance that is explained is:explained variance/total variance = [Cov yx]2  [Var xVar y] . (20)Note, the covariance squared divided by the variance of y and the variance of x cancels out the units of measurement, leaving a relative measure called R2 , the coefficient of determination. This coefficient, which measures the fraction of the variance in y explained by dependence on x is consequently a measure of goodness of fit.Oct. 19, 2010 LEC #8 ECON 140A/240A-4 L. PhillipsCorrelation and Analysis of VarianceIn bivariate regression of y on x, the coefficient of determination, R2, is just the square of the correlation coefficient, r, between y and x, which is a relative (unitless) measure of the interdependence of y and xR2 = Cov yx/{)( yVar )(xVar} = r. (21)The sample correlation coefficient, ,ˆrcan be estimated by the method of moments, substituting sample estimates of sums of squares for the covariance and variances:rˆ = {ixixyiy ])(][)([} (n –1)/ [])([ yiy 2 )1( n][])([ xix 2 )1( n],or rˆ = {ixixyiy ])(][)([}/ [])([ yiy 2 ][])([ xix 2 ]. (22)The correlation coefficient ranges between minus one, if the correlation is negative and perfect, through zero for no correlation, and up to one if the correlation is positive and perfect, i.e. -11r.In multivariate regression, where y depends on two or more explanatory variables or regressors, the estimated coefficient of determination, Rˆ2, can be calculated from the sum of squared residuals and the sum of squared deviations of y around its mean:Rˆ2 = 1 – [iiu )(ˆ[]2 /i(yi - y )2 (23)III. Analysis of VarianceThe results of a regression analysis can be summarized in a table of analysis of variance, or ANOVA, as depicted in Table 1.Oct. 19, 2010 LEC #8 ECON 140A/240A-5 L. PhillipsCorrelation and Analysis of VarianceTable 1: Table of Analysis of Variance: Bivariate RegressionSource of Variation Sum of Squares Degrees of Freedom Mean SquareExplained by xbˆ2 i(xi - x)21bˆ2 i(xi - x)2 /1Unexplainediuˆ2 n-2iuˆ2 /(n-2)Totali(yi - y)2n-1i(yi - y)2 /(n-1)A key to understanding ANOVA is that the total sum of squared deviations of the dependent variable, y, from its mean can be partitioned into the explained sum of squares,and the unexplained sum of squares, in a fashion parallel to how we partitioned the population variance. To see this, combine Eq. (6), ),(ˆ)()(ˆiyiyiu  with Eq. (10),),(ˆˆ)( ixbaiy  both from the previous chapter, to obtain:]ˆˆ[)](ˆˆ[)()(ˆxbayixbaiyiu , (24)])([ˆ])([)(ˆxixbyiyiu . (25)Squaring the observed residual and summing,iiu )](ˆ[2 = iyiy ])({[2 + bˆ2 [x(i) - ]x2 –2 ])(][)([ˆyiyxixb }. (26)Note from Eq. (8) thatixixb ])([ˆ2 =


View Full Document

UCSB ECON 240a - lecture_8

Documents in this Course
Final

Final

8 pages

power_16

power_16

64 pages

final

final

8 pages

power_16

power_16

64 pages

Power One

Power One

63 pages

midterm

midterm

6 pages

power_16

power_16

39 pages

Lab #9

Lab #9

7 pages

Power 5

Power 5

59 pages

Final

Final

13 pages

Final

Final

11 pages

Midterm

Midterm

8 pages

Movies

Movies

28 pages

power_12

power_12

53 pages

midterm

midterm

4 pages

-problems

-problems

36 pages

lecture_7

lecture_7

10 pages

final

final

5 pages

power_4

power_4

44 pages

power_15

power_15

52 pages

group_5

group_5

21 pages

power_13

power_13

31 pages

power_11

power_11

44 pages

lecture_6

lecture_6

12 pages

power_11

power_11

42 pages

midterm

midterm

9 pages

power_17

power_17

13 pages

power_14

power_14

55 pages

Final

Final

13 pages

Power One

Power One

53 pages

Summary

Summary

54 pages

Midterm

Midterm

6 pages

Lab #7

Lab #7

5 pages

powe 14

powe 14

32 pages

Lab #7

Lab #7

5 pages

Midterm

Midterm

8 pages

Power 17

Power 17

13 pages

Midterm

Midterm

6 pages

Lab Five

Lab Five

30 pages

power_16

power_16

64 pages

power_15

power_15

52 pages

Power One

Power One

64 pages

Final

Final

14 pages

Load more
Download lecture_8
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view lecture_8 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view lecture_8 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?