Download presentation

Presentation is loading. Please wait.

Published byKailee Herold Modified over 5 years ago

1
**EC220 - Introduction to econometrics (chapter 1)**

Christopher Dougherty EC220 - Introduction to econometrics (chapter 1) Slideshow: goodness of fit Original citation: Dougherty, C. (2012) EC220 - Introduction to econometrics (chapter 1). [Teaching Resource] © 2012 The Author This version available at: Available in LSE Learning Resources Online: May 2012 This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. This license allows the user to remix, tweak, and build upon the work even for commercial purposes, as long as the user credits the author and licenses their new creations under the identical terms.

2
**GOODNESS OF FIT Four useful results:**

This sequence explains measures of goodness of fit in regression analysis. It is convenient to start by demonstrating four useful results. The first is that the mean value of the residuals must be zero. 1

3
**GOODNESS OF FIT Four useful results:**

The residual in any observation is given by the difference between the actual and fitted values of Y for that observation. 2

4
**GOODNESS OF FIT Four useful results:**

First substitute for the fitted value. 3

5
**GOODNESS OF FIT Four useful results:**

Now sum over all the observations. 4

6
**GOODNESS OF FIT Four useful results:**

Dividing through by n, we obtain the sample mean of the residuals in terms of the sample means of X and Y and the regression coefficients. 5

7
**GOODNESS OF FIT Four useful results:**

If we substitute for b1, the expression collapses to zero. 6

8
**GOODNESS OF FIT Four useful results:**

Next we will demonstrate that the mean of the fitted values of Y is equal to the mean of the actual values of Y. 7

9
**GOODNESS OF FIT Four useful results:**

Again, we start with the definition of a residual. 8

10
GOODNESS OF FIT Four useful results: Sum over all the observations. 9

11
**GOODNESS OF FIT Four useful results:**

Divide through by n. The terms in the equation are the means of the residuals, actual values of Y, and fitted values of Y, respectively. 10

12
**GOODNESS OF FIT Four useful results:**

We have just shown that the mean of the residuals is zero. Hence the mean of the fitted values is equal to the mean of the actual values. 11

13
**GOODNESS OF FIT Four useful results:**

Next we will demonstrate that the sum of the products of the values of X and the residuals is zero. 12

14
**GOODNESS OF FIT Four useful results:**

We start by replacing the residual with its expression in terms of Y and X. 13

15
GOODNESS OF FIT Four useful results: We expand the expression. 14

16
**GOODNESS OF FIT Four useful results:**

The expression is equal to zero. One way of demonstrating this would be to substitute for b1 and b2 and show that all the terms cancel out. 15

17
**GOODNESS OF FIT Four useful results:**

A neater way is to recall the first order condition for b2 when deriving the regression coefficients. You can see that it is exactly what we need. 16

18
**GOODNESS OF FIT Four useful results:**

Finally we will demonstrate that the sum of the products of the fitted values of Y and the residuals is zero. 17

19
**GOODNESS OF FIT Four useful results:**

We start by substituting for the fitted value of Y. 18

20
GOODNESS OF FIT Four useful results: We expand and rearrange. 19

21
**GOODNESS OF FIT Four useful results:**

The expression is equal to zero, given the first and third useful results. 20

22
GOODNESS OF FIT We now come to the discussion of goodness of fit. One measure of the variation in Y is the sum of its squared deviations around its sample mean, often described as the Total Sum of Squares, TSS. 21

23
GOODNESS OF FIT We will decompose TSS using the fact that the actual value of Y in any observationsis equal to the sum of its fitted value and the residual. 22

24
GOODNESS OF FIT We substitute for Yi. 23

25
GOODNESS OF FIT From the useful results, the mean of the fitted values of Y is equal to the mean of the actual values. Also, the mean of the residuals is zero. 24

26
GOODNESS OF FIT Hence we can simplify the expression as shown. 25

27
GOODNESS OF FIT We expand the squared terms on the right side of the equation. 26

28
GOODNESS OF FIT We expand the third term on the right side of the equation. 27

29
GOODNESS OF FIT The last two terms are both zero, given the first and fourth useful results. 28

30
GOODNESS OF FIT Thus we have shown that TSS, the total sum of squares of Y can be decomposed into ESS, the ‘explained’ sum of squares, and RSS, the residual (‘unexplained’) sum of squares. 29

31
GOODNESS OF FIT The words explained and unexplained were put in quotation marks because the explanation may in fact be false. Y might really depend on some other variable Z, and X might be acting as a proxy for Z. It would be safer to use the expression apparently explained instead of explained. 30

32
GOODNESS OF FIT The main criterion of goodness of fit, formally described as the coefficient of determination, but usually referred to as R2, is defined to be the ratio of ESS to TSS, that is, the proportion of the variance of Y explained by the regression equation. 31

33
GOODNESS OF FIT Obviously we would like to locate the regression line so as to make the goodness of fit as high as possible, according to this criterion. Does this objective clash with our use of the least squares principle to determine b1 and b2? 32

34
GOODNESS OF FIT Fortunately, there is no clash. To see this, rewrite the expression for R2 in term of RSS as shown. 33

35
GOODNESS OF FIT The OLS regression coefficients are chosen in such a way as to minimize the sum of the squares of the residuals. Thus it automatically follows that they maximize R2. 34

36
GOODNESS OF FIT Another natural criterion of goodness of fit is the correlation between the actual and fitted values of Y. We will demonstrate that this is maximized by using the least squares principle to determine the regression coefficients 35

37
GOODNESS OF FIT We will start with the numerator and substitute for the actual value of Y, and its mean, in the first factor. 36

38
GOODNESS OF FIT The mean value of the residuals is zero (first useful result). We rearrange a little. 37

39
GOODNESS OF FIT We expand the expression The last two terms are both zero (fourth and first useful results). 38

40
GOODNESS OF FIT Thus the numerator simplifies to the sum of the squared deviations of the fitted values. 39

41
GOODNESS OF FIT We have the same expression in the denominator, under a square root. Cancelling, we are left with the square root in the numerator. 40

42
GOODNESS OF FIT Thus the correlation coefficient is the square root of R2. It follows that it is maximized by the use of the least squares principle to determine the regression coefficients. 41

43
**Copyright Christopher Dougherty 2011.**

These slideshows may be downloaded by anyone, anywhere for personal use. Subject to respect for copyright and, where appropriate, attribution, they may be used as a resource for teaching an econometrics course. There is no need to refer to the author. The content of this slideshow comes from Sections 1.5 and 1.6 of C. Dougherty, Introduction to Econometrics, fourth edition 2011, Oxford University Press. Additional (free) resources for both students and instructors may be downloaded from the OUP Online Resource Centre Individuals studying econometrics on their own and who feel that they might benefit from participation in a formal course should consider the London School of Economics summer school course EC212 Introduction to Econometrics or the University of London International Programmes distance learning course 20 Elements of Econometrics

Similar presentations

© 2019 SlidePlayer.com Inc.

All rights reserved.

To make this website work, we log user data and share it with processors. To use this website, you must agree to our Privacy Policy, including cookie policy.

Ads by Google