Download presentation
Presentation is loading. Please wait.
1
1 Regression Econ 240A
2
2 Retrospective w Week One Descriptive statistics Exploratory Data Analysis w Week Two Probability Binomial Distribution w Week Three Normal Distribution Interval Estimation, Hypothesis Testing, Decision Theory
3
3 Last Week w Bivariate Relationships w Correlation and Analysis of Variance
4
4 Outline w A cognitive device to help understand the formulas for estimating the slope and the intercept, as well as the analysis of variance w Table of Analysis of Variance (ANOVA) for regression w F distribution for testing the significance of the regression, i.e. does the independent variable, x, significantly explain the dependent variable, y?
5
5 Outline (Cont.) w The Coefficient of Determination, R 2, and the Coefficient of Correlation, r. Estimate of the error variance, 2. w Hypothesis tests on the slope, b.
6
6 Part I: A Cognitive Device
7
7 A Cognitive Device: The Conceptual Model w (1) y i = a + b*x i + e i w Take expectations, E: w (2) E y i = a + b*E x i +E e i, where assume (3) E e i =0 w Subtract (2) from (1) to obtain model in deviations: w (4) [y i - E y i ] = b*[x i - E x i ] + e i w Multiply (3) by [x i - E x i ] and take expectations:
8
8 A Cognitive Device: (Cont.) w (5) E{[y i - E y i ] [x i - E x i ]} = b*E[x i - E x i ] 2 + E{e i [x i - E x i ] }, where assume E{e i [x i - E x i ] }= 0, i.e. e and x are independent w By definition, (6) cov yx = b* var x, i.e. w (7) b= cov yx/ var x w The corresponding empirical estimate, by the method of moments:
9
9 A Cognitive Device (Cont.) w The empirical counter part to (2) w Square both sides of (4), and take expectations, w (10) E [y i - E y i ] 2 = b 2 *E[x i - E x i ] 2 + 2E{e i *[x i - E x i ]}+ E[e i ] 2 w Where (11) E{e i *[x i - E x i ] = 0, i.e. the explanatory variable x and the error e are assumed to be independent, cov ex = 0
10
10 A Cognitive Device (Cont.) w From (10) by definition w (11) var y = b 2 * var x + var e, this is the partition of the total variance in y into the variance explained by x, b 2 * var x, and the unexplained or error variance, var e. w the empirical counterpart to (11) is the total sum of squares equals the explained sum of squares plus the unexplained sum of squares:
11
11 A Cognitive Device (Cont.) w From Eq. 7, substitute for b in Eq. 11: Var y = [covyx] 2 /Var x + Var e w Divide by Var y: 1 = [covyx] 2 /vary*varx + var e/var y or 1 = r 2 + var e/var y where r is the correlation coefficient
12
12 Population Model and Sample Model Side by Side
13
13 Conceptual Vs. Fitted Model w Conceptual w (1) y i = a + b*x i + e i w Take expectations, E w (2) Ey = a + b*Ex + Ee i w (3) Where Ee i = 0 w Subtract (2) from (1) w (4)[y i - Ey] = b*[x i - Ex] + e i w Fitted w Minimize
14
14 Conceptual Vs. Fitted (Cont.) w Conceptual w Multiply (4) by [x i - Ex] and take expectations, E w E [y i - Ey] [x i -Ex] = b*E [x i -Ex] 2 + Ee i * [x i -Ex], w (5) where Ee i * [x i -Ex] = 0 w (6) cov[y*x] = b*varx w (7) b = cov[y*x]/varx w Fitted w First order condition w compare (3) & (vi) w From (v) the fitted line goes through the sample means
15
15 Conceptual vs. Fitted (Cont.)
16
16 Part II: ANOVA in Regression
17
17 ANOVA w Testing the significance of the regression, i.e. does x significantly explain y? w F 1, n -2 = EMS/UMS w Distributed with the F distribution with 1 degree of freedom in the numerator and n-2 degrees of freedom in the denominator
18
18 Table of Analysis of Variance (ANOVA) F 1,n -2 = Explained Mean Square / Error Mean Square
19
19 Example from Lab Four w Linear Trend Model for UC Budget
20
20
21
21 Time index, t = 0 for 1968-69, t=1 for 1969-70 etc
22
22 Example from Lab Four w Exponential trend model for UC Budget w UCBud(t) =exp[a+b*t+e(t)] w taking the logarithms of both sides w ln UCBud(t) = a + b*t +e(t)
23
23
24
24 Time index, t = 0 for 1968-69, t=1 for 1969-70 etc. Exp(5.93204) = 376.9
25
25 Part III: The F Distribution
26
26 The F Distribution The density function of the F distribution: 1 and 2 are the numerator and denominator degrees of freedom. ! ! !
27
27 This density function generates a rich family of distributions, depending on the values of 1 and 2 The F Distribution 1 = 5, 2 = 10 1 = 50, 2 = 10 1 = 5, 2 = 10 1 = 5, 2 = 1
28
28 Determining Values of F w The values of the F variable can be found in the F table, Table 6(a) in Appendix B for a type I error of 5%, or Excel. The entries in the table are the values of the F variable of the right hand tail probability (A), for which P(F 1, 2 >F A ) = A.
29
29
30
30 Time index, t = 0 for 1968-69, t=1 for 1969-70 etc
31
31 Part IV: The Pearson Coefficient of Correlation, r w The Pearson coefficient of correlation, r, is (13) r = cov yx/[var x] 1/2 [var y] 1/2 w Estimated counterpart w Comparing (13) to (7) note that (15) r*{[var y] 1/2 /[var x] 1/2 } = b
32
32 A Cognitive Device: (Cont.) w (5) E{[y i - E y i ] [x i - E x i ]} = b*E[x i - E x i ] 2 + E{e i [x i - E x i ] }, where assume E{e i [x i - E x i ] }= 0, i.e. e and x are independent w By definition, (6) cov yx = b* var x, i.e. w (7) b= cov yx/ var x w The corresponding empirical estimate:
33
33 Part IV (Cont.) The coefficient of Determination, R 2 w For a bivariate regression of y on a single explanatory variable, x, R 2 = r 2, i.e. the coefficient of determination equals the square of the Pearson coefficient of correlation w Using (14) to square the estimate of r
34
34 Part IV (Cont.) w Using (8), (16) can be expressed as w And so w In general, including multivariate regression, the estimate of the coefficient of determination,, can be calculated from (21) =1 -USS/TSS.
35
35 Part IV (Cont.) w For the bivariate regression, the F-test can be calculated from F 1, n-2 = [(n-2)/1][ESS/TSS]/[USS/TSS] F 1, n-2 = [(n-2)/1][ESS/USS]=[(n-2)] w For a multivariate regression with k explanatory variables, the F-test can be calculated as F k, n-2 = [(n-k-1)/k][ESS/USS] F k, n-2 = [(n-k-1)/k]
36
36 Time index, t = 0 for 1968-69, t=1 for 1969-70 etc F 1, 33 = (n-2)*[R 2 /(1 - R 2 ) = 34*(0.968/0.032) = 500
37
37 Part V:Estimate of the Error Variance Var e i = w Estimate is unexplained mean square, UMS w Standard error of the regression is
38
38 Time index, t = 0 for 1968-69, t=1 for 1969-70 etc
39
39 Part VI: Hypothesis Tests on the Slope w Hypotheses, H 0 : b=0; H A : b>0 w Test statistic: w Set probability for the type I error, say 5% w Note: for bivariate regression, the square of the t-statistic for the null that the slope is zero is the F-statistic
40
40 t = {84.00 - 0]/3.76 = 22.4 t 2 = F, i.e. 22.36*22.36 = 500
41
41 Part VII: Student’s t-Distribution
42
42 The Student t Distribution w The Student t density function is the parameter of the student t distribution E(t) = 0 V(t) = ( – 2) (for n > 2)
43
43 The Student t Distribution = 3 = 10
44
44 Determining Student t Values w The student t distribution is used extensively in statistical inference. w Thus, it is important to determine values of t A associated with a given number of degrees of freedom. w We can do this using t tables, Table 4 Appendix B Excel
45
45 tAtA t.100 t.05 t.025 t.01 t.005 A=.05 A -t A The t distribution is symmetrical around 0 =1.812 =-1.812 The table provides the t values (t A ) for which P(t > t A ) = A Using the t Table tttt
46
46 Problem 6.32 in Text Table of Joint Probabilities
47
47 Problem 6.32 w The method of instruction in college and university applied statistics courses is changing. Historically, most courses were taught with an emphasis on manual calculation. The alternative is to employ a computer and a software package to perform the calculations. An analysis of applied statistics courses investigated whether the instructor’s educational background is primarily mathematics (or statistics) or some other field.
48
48 Problem 6.32 w A. What is the probability that a randomly selected applied statistics course instructor whose education was in statistics emphasizes manual calculations? w What proportion of applied statistics courses employ a computer and software? w Are the educational background of the instructor and the way his or her course are taught independent?
49
49 Midterm 2000.(15 points) The following table shows the results of regressing the natural logarithm of California General Fund expenditures, in billions of nominal dollars, against year beginning in 1968 and ending in 2000. A plot of actual, estimated and residual values follows. –.How much of the variance in the dependent variable is explained by trend? –.What is the meaning of the F statistic in the table? Is it significant? –.Interpret the estimated slope. –.If General Fund expenditures was $68.819 billion in California for fiscal year 2000-2001, provide a point estimate for state expenditures for 2001-2002. w
50
50 w Cont. A state senator believes that state expenditures in nominal dollars have grown over time at 7% a year. Is the senator in the ballpark, or is his impression significantly below the estimated rate, using a 5% level of significance? If you were an aide to the Senator, how might you criticize this regression?
51
51
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.