Presentation is loading. Please wait.

Presentation is loading. Please wait.

Christopher Dougherty EC220 - Introduction to econometrics (chapter 2) Slideshow: testing a hypothesis relating to a regression coefficient (2010/2011.

Similar presentations


Presentation on theme: "Christopher Dougherty EC220 - Introduction to econometrics (chapter 2) Slideshow: testing a hypothesis relating to a regression coefficient (2010/2011."— Presentation transcript:

1 Christopher Dougherty EC220 - Introduction to econometrics (chapter 2) Slideshow: testing a hypothesis relating to a regression coefficient (2010/2011 version) Original citation: Dougherty, C. (2012) EC220 - Introduction to econometrics (chapter 2). [Teaching Resource] © 2012 The Author This version available at: http://learningresources.lse.ac.uk/128/http://learningresources.lse.ac.uk/128/ 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. http://creativecommons.org/licenses/by-sa/3.0/ http://creativecommons.org/licenses/by-sa/3.0/ http://learningresources.lse.ac.uk/

2 REVIEW CHAPTER A random variable X is distributed with unknown population mean  and variance  2. The null and alternative hypotheses are H 0 :  =  0, H 1 :  ≠  0. To test H 0, we calculate the sample mean X and its standard error, and compute the test statistic. We reject H 0 if for a chosen significance level. REGRESSION MODEL Assuming that the true relationship is and that, given a sample of data, we have fitted the model. The null and alternative hypotheses are To test H 0, we compute. We reject H 0 if for a chosen significance level. TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT This sequence describes the testing of a hypotheses relating to regression coefficients. We start by summarizing the basic procedure for a t test discussed in the Review chapter. 1

3 REVIEW CHAPTER A random variable X is distributed with unknown population mean  and variance  2. The null and alternative hypotheses are H 0 :  =  0, H 1 :  ≠  0. To test H 0, we calculate the sample mean X and its standard error, and compute the test statistic. We reject H 0 if for a chosen significance level. REGRESSION MODEL Assuming that the true relationship is and that, given a sample of data, we have fitted the model. The null and alternative hypotheses are To test H 0, we compute. We reject H 0 if for a chosen significance level. TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT For the theory behind the t test, see the Review chapter. We will summarize only the procedure here. 2

4 REVIEW CHAPTER A random variable X is distributed with unknown population mean  and variance  2. The null and alternative hypotheses are H 0 :  =  0, H 1 :  ≠  0. To test H 0, we calculate the sample mean X and its standard error, and compute the test statistic. We reject H 0 if for a chosen significance level. REGRESSION MODEL Assuming that the true relationship is and that, given a sample of data, we have fitted the model. The null and alternative hypotheses are To test H 0, we compute. We reject H 0 if for a chosen significance level. TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT We have a random variable X with unknown population mean  and variance  2. We wish to test a null hypothesis H 0 :  =  0 against the alternative H 1 :  ≠  0, given a sample of n observations. 3

5 REVIEW CHAPTER A random variable X is distributed with unknown population mean  and variance  2. The null and alternative hypotheses are H 0 :  =  0, H 1 :  ≠  0. To test H 0, we calculate the sample mean X and its standard error, and compute the test statistic. We reject H 0 if for a chosen significance level. REGRESSION MODEL Assuming that the true relationship is and that, given a sample of data, we have fitted the model. The null and alternative hypotheses are To test H 0, we compute. We reject H 0 if for a chosen significance level. TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT We calculate the sample mean X and its standard error, and compute the t statistic shown. We reject H 0 if the absolute value of the t statistic is greater than the critical value of t, given the chosen significance level for the test. 4

6 REVIEW CHAPTER A random variable X is distributed with unknown population mean  and variance  2. The null and alternative hypotheses are H 0 :  =  0, H 1 :  ≠  0. To test H 0, we calculate the sample mean X and its standard error, and compute the test statistic. We reject H 0 if for a chosen significance level. REGRESSION MODEL Assuming that the true relationship is and that, given a sample of data, we have fitted the model. The null and alternative hypotheses are To test H 0, we compute. We reject H 0 if for a chosen significance level. TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT In the case of the regression model, we are concerned with testing hypotheses relating to the unknown parameters of the relationship. Here also we perform t tests. The theory in principle is exactly the same and the procedure is parallel in an obvious way. 5

7 REVIEW CHAPTER A random variable X is distributed with unknown population mean  and variance  2. The null and alternative hypotheses are H 0 :  =  0, H 1 :  ≠  0. To test H 0, we calculate the sample mean X and its standard error, and compute the test statistic. We reject H 0 if for a chosen significance level. REGRESSION MODEL Assuming that the true relationship is and that, given a sample of data, we have fitted the model. The null and alternative hypotheses are To test H 0, we compute. We reject H 0 if for a chosen significance level. TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT The t statistic is the difference between the estimated coefficient and its hypothesized value, divided by the standard error of the coefficient. We reject the null hypothesis if the absolute value is greater than the critical value of t, given the chose significance level. 6

8 REVIEW CHAPTER A random variable X is distributed with unknown population mean  and variance  2. The null and alternative hypotheses are H 0 :  =  0, H 1 :  ≠  0. To test H 0, we calculate the sample mean X and its standard error, and compute the test statistic. We reject H 0 if for a chosen significance level. REGRESSION MODEL Assuming that the true relationship is and that, given a sample of data, we have fitted the model. The null and alternative hypotheses are To test H 0, we compute. We reject H 0 if for a chosen significance level. TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT There is one important difference. When locating the critical value of t, one must take account of the number of degrees of freedom. In the case of the random variable X, this is n – 1, where n is the number of observations in the sample. 7

9 REVIEW CHAPTER A random variable X is distributed with unknown population mean  and variance  2. The null and alternative hypotheses are H 0 :  =  0, H 1 :  ≠  0. To test H 0, we calculate the sample mean X and its standard error, and compute the test statistic. We reject H 0 if for a chosen significance level. REGRESSION MODEL Assuming that the true relationship is and that, given a sample of data, we have fitted the model. The null and alternative hypotheses are To test H 0, we compute. We reject H 0 if for a chosen significance level. TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT In the case of the regression model, the number of degrees of freedom is n – k, where n is the number of observations in the sample and k is the number of parameters (  coefficients). For the simple regression model above, it is n – 2. 8

10 Example: p =  1 +  2 w + u Null hypothesis: H 0 :  2 = 1.0 Alternative hypothesis: H 1 :  2 ≠ 1.0 9 TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT As an illustration, we will consider a model relating price inflation to wage inflation. p is the percentage annual rate of growth of prices and w is the percentage annual rate of growth of wages. Two-sided t tests

11 Example: p =  1 +  2 w + u Null hypothesis: H 0 :  2 = 1.0 Alternative hypothesis: H 1 :  2 ≠ 1.0 10 TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT We will test the hypothesis that the rate of price inflation is equal to the rate of wage inflation. The null hypothesis is therefore H 0 :  2 = 1.0. (We should also test  1 = 0.) Two-sided t tests

12 Example: p =  1 +  2 w + u Null hypothesis: H 0 :  2 = 1.0 Alternative hypothesis: H 1 :  2 ≠ 1.0 11 TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT Suppose that the regression result is as shown (standard errors in parentheses). Our actual estimate of the slope coefficient is only 0.82. We will check whether we should reject the null hypothesis. Two-sided t tests

13 Example: p =  1 +  2 w + u Null hypothesis: H 0 :  2 = 1.0 Alternative hypothesis: H 1 :  2 ≠ 1.0 12 TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT We compute the t statistic by subtracting the hypothetical true value from the sample estimate and dividing by the standard error. It comes to –1.80. Two-sided t tests

14 Example: p =  1 +  2 w + u Null hypothesis: H 0 :  2 = 1.0 Alternative hypothesis: H 1 :  2 ≠ 1.0 13 TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT There are 20 observations in the sample. We have estimated 2 parameters, so there are 18 degrees of freedom. Two-sided t tests

15 Example: p =  1 +  2 w + u Null hypothesis: H 0 :  2 = 1.0 Alternative hypothesis: H 1 :  2 ≠ 1.0 14 TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT The critical value of t with 18 degrees of freedom is 2.101 at the 5% level. The absolute value of the t statistic is less than this, so we do not reject the null hypothesis. Two-sided t tests

16 15 In practice it is unusual to have a feeling for the actual value of the coefficients. Very often the objective of the analysis is to demonstrate that Y is influenced by X, without having any specific prior notion of the actual coefficients of the relationship. TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT Two-sided t tests

17 16 In this case it is usual to define  2 = 0 as the null hypothesis. In words, the null hypothesis is that X does not influence Y. We then try to demonstrate that the null hypothesis is false. TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT Two-sided t tests

18 17 For the null hypothesis  2 = 0, the t statistic reduces to the estimate of the coefficient divided by its standard error. TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT Two-sided t tests

19 18 This ratio is commonly called the t statistic for the coefficient and it is automatically printed out as part of the regression results. To perform the test for a given significance level, we compare the t statistic directly with the critical value of t for that significance level. TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT Two-sided t tests

20 . reg EARNINGS S Source | SS df MS Number of obs = 540 -------------+------------------------------ F( 1, 538) = 112.15 Model | 19321.5589 1 19321.5589 Prob > F = 0.0000 Residual | 92688.6722 538 172.283777 R-squared = 0.1725 -------------+------------------------------ Adj R-squared = 0.1710 Total | 112010.231 539 207.811189 Root MSE = 13.126 ------------------------------------------------------------------------------ EARNINGS | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- S | 2.455321.2318512 10.59 0.000 1.999876 2.910765 _cons | -13.93347 3.219851 -4.33 0.000 -20.25849 -7.608444 ------------------------------------------------------------------------------ 19 Here is the output from the earnings function fitted in a previous slideshow, with the t statistics highlighted. TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT Two-sided t tests

21 . reg EARNINGS S Source | SS df MS Number of obs = 540 -------------+------------------------------ F( 1, 538) = 112.15 Model | 19321.5589 1 19321.5589 Prob > F = 0.0000 Residual | 92688.6722 538 172.283777 R-squared = 0.1725 -------------+------------------------------ Adj R-squared = 0.1710 Total | 112010.231 539 207.811189 Root MSE = 13.126 ------------------------------------------------------------------------------ EARNINGS | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- S | 2.455321.2318512 10.59 0.000 1.999876 2.910765 _cons | -13.93347 3.219851 -4.33 0.000 -20.25849 -7.608444 ------------------------------------------------------------------------------ 20 You can see that the t statistic for the coefficient of S is enormous. We would reject the null hypothesis that schooling does not affect earnings at the 1% significance level (critical value about 2.59). TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT Two-sided t tests

22 . reg EARNINGS S Source | SS df MS Number of obs = 540 -------------+------------------------------ F( 1, 538) = 112.15 Model | 19321.5589 1 19321.5589 Prob > F = 0.0000 Residual | 92688.6722 538 172.283777 R-squared = 0.1725 -------------+------------------------------ Adj R-squared = 0.1710 Total | 112010.231 539 207.811189 Root MSE = 13.126 ------------------------------------------------------------------------------ EARNINGS | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- S | 2.455321.2318512 10.59 0.000 1.999876 2.910765 _cons | -13.93347 3.219851 -4.33 0.000 -20.25849 -7.608444 ------------------------------------------------------------------------------ 21 In this case we could go further and reject the null hypothesis that schooling does not affect earnings at the 0.1% significance level. TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT Two-sided t tests

23 . reg EARNINGS S Source | SS df MS Number of obs = 540 -------------+------------------------------ F( 1, 538) = 112.15 Model | 19321.5589 1 19321.5589 Prob > F = 0.0000 Residual | 92688.6722 538 172.283777 R-squared = 0.1725 -------------+------------------------------ Adj R-squared = 0.1710 Total | 112010.231 539 207.811189 Root MSE = 13.126 ------------------------------------------------------------------------------ EARNINGS | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- S | 2.455321.2318512 10.59 0.000 1.999876 2.910765 _cons | -13.93347 3.219851 -4.33 0.000 -20.25849 -7.608444 ------------------------------------------------------------------------------ 22 The advantage of reporting rejection at the 0.1% level, instead of the 1% level, is that the risk of mistakenly rejecting the null hypothesis of no effect is now only 0.1% instead of 1%. The result is therefore even more convincing. TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT Two-sided t tests

24 . reg EARNINGS S Source | SS df MS Number of obs = 540 -------------+------------------------------ F( 1, 538) = 112.15 Model | 19321.5589 1 19321.5589 Prob > F = 0.0000 Residual | 92688.6722 538 172.283777 R-squared = 0.1725 -------------+------------------------------ Adj R-squared = 0.1710 Total | 112010.231 539 207.811189 Root MSE = 13.126 ------------------------------------------------------------------------------ EARNINGS | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- S | 2.455321.2318512 10.59 0.000 1.999876 2.910765 _cons | -13.93347 3.219851 -4.33 0.000 -20.25849 -7.608444 ------------------------------------------------------------------------------ 23 The t statistic for the intercept is also enormous. However, since the intercept does not hve any meaning, it does not make sense to perform a t test on it. TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT Two-sided t tests

25 . reg EARNINGS S Source | SS df MS Number of obs = 540 -------------+------------------------------ F( 1, 538) = 112.15 Model | 19321.5589 1 19321.5589 Prob > F = 0.0000 Residual | 92688.6722 538 172.283777 R-squared = 0.1725 -------------+------------------------------ Adj R-squared = 0.1710 Total | 112010.231 539 207.811189 Root MSE = 13.126 ------------------------------------------------------------------------------ EARNINGS | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- S | 2.455321.2318512 10.59 0.000 1.999876 2.910765 _cons | -13.93347 3.219851 -4.33 0.000 -20.25849 -7.608444 ------------------------------------------------------------------------------ 24 The next column in the output gives what are known as the p values for each coefficient. This is the probability of obtaining the corresponding t statistic as a matter of chance, if the null hypothesis H 0 :  = 0 is true. TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT Two-sided t tests

26 . reg EARNINGS S Source | SS df MS Number of obs = 540 -------------+------------------------------ F( 1, 538) = 112.15 Model | 19321.5589 1 19321.5589 Prob > F = 0.0000 Residual | 92688.6722 538 172.283777 R-squared = 0.1725 -------------+------------------------------ Adj R-squared = 0.1710 Total | 112010.231 539 207.811189 Root MSE = 13.126 ------------------------------------------------------------------------------ EARNINGS | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- S | 2.455321.2318512 10.59 0.000 1.999876 2.910765 _cons | -13.93347 3.219851 -4.33 0.000 -20.25849 -7.608444 ------------------------------------------------------------------------------ 25 If you reject the null hypothesis H 0 :  = 0, this is the probability that you are making a mistake and making a Type I error. It therefore gives the significance level at which the null hypothesis would just be rejected. TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT Two-sided t tests

27 . reg EARNINGS S Source | SS df MS Number of obs = 540 -------------+------------------------------ F( 1, 538) = 112.15 Model | 19321.5589 1 19321.5589 Prob > F = 0.0000 Residual | 92688.6722 538 172.283777 R-squared = 0.1725 -------------+------------------------------ Adj R-squared = 0.1710 Total | 112010.231 539 207.811189 Root MSE = 13.126 ------------------------------------------------------------------------------ EARNINGS | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- S | 2.455321.2318512 10.59 0.000 1.999876 2.910765 _cons | -13.93347 3.219851 -4.33 0.000 -20.25849 -7.608444 ------------------------------------------------------------------------------ 26 If p = 0.05, the null hypothesis could just be rejected at the 5% level. If it were 0.01, it could just be rejected at the 1% level. If it were 0.001, it could just be rejected at the 0.1% level. This is assuming that you are using two-sided tests. TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT Two-sided t tests

28 . reg EARNINGS S Source | SS df MS Number of obs = 540 -------------+------------------------------ F( 1, 538) = 112.15 Model | 19321.5589 1 19321.5589 Prob > F = 0.0000 Residual | 92688.6722 538 172.283777 R-squared = 0.1725 -------------+------------------------------ Adj R-squared = 0.1710 Total | 112010.231 539 207.811189 Root MSE = 13.126 ------------------------------------------------------------------------------ EARNINGS | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- S | 2.455321.2318512 10.59 0.000 1.999876 2.910765 _cons | -13.93347 3.219851 -4.33 0.000 -20.25849 -7.608444 ------------------------------------------------------------------------------ 27 In the present case p = 0 to three decimal places for the coefficient of S. This means that we can reject the null hypothesis H 0 :  2 = 0 at the 0.1% level, without having to refer to the table of critical values of t. (Testing the intercept does not make sense in this regression.) TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT Two-sided t tests

29 . reg EARNINGS S Source | SS df MS Number of obs = 540 -------------+------------------------------ F( 1, 538) = 112.15 Model | 19321.5589 1 19321.5589 Prob > F = 0.0000 Residual | 92688.6722 538 172.283777 R-squared = 0.1725 -------------+------------------------------ Adj R-squared = 0.1710 Total | 112010.231 539 207.811189 Root MSE = 13.126 ------------------------------------------------------------------------------ EARNINGS | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- S | 2.455321.2318512 10.59 0.000 1.999876 2.910765 _cons | -13.93347 3.219851 -4.33 0.000 -20.25849 -7.608444 ------------------------------------------------------------------------------ 28 It is a more informative approach to reporting the results of test and widely used in the medical literature. TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT Two-sided t tests

30 . reg EARNINGS S Source | SS df MS Number of obs = 540 -------------+------------------------------ F( 1, 538) = 112.15 Model | 19321.5589 1 19321.5589 Prob > F = 0.0000 Residual | 92688.6722 538 172.283777 R-squared = 0.1725 -------------+------------------------------ Adj R-squared = 0.1710 Total | 112010.231 539 207.811189 Root MSE = 13.126 ------------------------------------------------------------------------------ EARNINGS | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- S | 2.455321.2318512 10.59 0.000 1.999876 2.910765 _cons | -13.93347 3.219851 -4.33 0.000 -20.25849 -7.608444 ------------------------------------------------------------------------------ 29 However in economics standard practice is to report results referring to 5% and 1% significance levels, and sometimes to the 0.1% level (when one can reject at that level). TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT Two-sided t tests

31 Example: p =  1 +  2 w + u Null hypothesis: H 0 :  2 = 1.0 Alternative hypothesis: H 1 :  2 ≠ 1.0 30 Returning to the price inflation/wage inflation model, we saw that we could not reject the null hypothesis  2 = 1, even at the 5% significance level. That was using a two-sided test. TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT One-sided t tests

32 Example: p =  1 +  2 w + u Null hypothesis: H 0 :  2 = 1.0 Alternative hypothesis: H 1 :  2 ≠ 1.0 31 TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT However, in practice, improvements in productivity may cause the rate of cost inflation, and hence that of price inflation, to be lower than that of wage inflation. One-sided t tests

33 Example: p =  1 +  2 w + u Null hypothesis: H 0 :  2 = 1.0 Alternative hypothesis: H 1 :  2 < 1.0 32 TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT Certainly, improvements in productivity will not cause price inflation to be greater than wage inflation and so in this case we are justified in ruling out  2 > 1. We are left with H 0 :  2 = 1 and H 1 :  2 < 1. One-sided t tests

34 Example: p =  1 +  2 w + u Null hypothesis: H 0 :  2 = 1.0 Alternative hypothesis: H 1 :  2 < 1.0 33 TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT Thus we can perform a one-sided test, for which the critical value of t with 18 degrees of freedom at the 5% significance level is 1.73. Now we can reject the null hypothesis and conclude that price inflation is significantly lower than wage inflation, at the 5% significance level. One-sided t tests

35 34 Now we will consider the special, but very common, case H 0 :  2 = 0. TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT Model: Y =  1 +  2 X + u Null hypothesis: H 0 :  2 = 0 Alternative hypothesis: H 1 :  2 ≠ 0 One-sided t tests

36 35 TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT Model: Y =  1 +  2 X + u Null hypothesis: H 0 :  2 = 0 Alternative hypothesis: H 1 :  2 ≠ 0 It occurs when you wish to demonstrate that a variable X influences another variable Y. You set up the null hypothesis that X has no effect (  2 = 0) and try to reject H 0. One-sided t tests

37 36 probability density function of b 2 0 The figure shows the distribution of b 2, conditional on H 0 :  2 = 0 being true. For simplicity, we initially assume that we know the standard deviation. 2.5% null hypothesis:H 0 :  2 = 0 alternative hypothesis:H 1 :  2 = 0 reject H 0 do not reject H 0 1.96 sd–1.96 sd TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT One-sided t tests

38 37 probability density function of b 2 0 If you use a two-sided 5% significance test, your estimate must be 1.96 standard deviations above or below 0 if you are to reject H 0. 2.5% null hypothesis:H 0 :  2 = 0 alternative hypothesis:H 1 :  2 = 0 reject H 0 do not reject H 0 1.96 sd–1.96 sd TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT One-sided t tests

39 38 probability density function of b 2 0 However, if you can justify the use of a one-sided test, for example with H 0 :  2 > 0, your estimate has to be only 1.65 standard deviations above 0. reject H 0 do not reject H 0 1.65 sd 5% null hypothesis:H 0 :  2 = 0 alternative hypothesis:H 1 :  2 > 0 TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT One-sided t tests

40 probability density function of b 2 0 reject H 0 do not reject H 0 1.65 sd 5% null hypothesis:H 0 :  2 = 0 alternative hypothesis:H 1 :  2 > 0 This makes it easier to reject H 0 and thereby demonstrate that Y really is influenced by X (assuming that your model is correctly specified). 39 TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT One-sided t tests

41 probability density function of b 2 0 reject H 0 do not reject H 0 1.65 sd 5% null hypothesis:H 0 :  2 = 0 alternative hypothesis:H 1 :  2 > 0 Suppose that Y is genuinely determined by X and that the true (unknown) coefficient is  2, as shown. 40 TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT One-sided t tests 22

42 probability density function of b 2 0 reject H 0 do not reject H 0 1.65 sd 5% null hypothesis:H 0 :  2 = 0 alternative hypothesis:H 1 :  2 > 0 Suppose that we have a sample of observations and calculate the estimated slope coefficient, b 2. If it is as shown in the diagram, what do we conclude when we test H 0 ? 41 TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT One-sided t tests 22 b2b2

43 probability density function of b 2 0 reject H 0 do not reject H 0 1.65 sd 5% null hypothesis:H 0 :  2 = 0 alternative hypothesis:H 1 :  2 > 0 The answer is that b 2 lies in the rejection region. It makes no difference whether we perform a two-sided test or a one-sided test. We come to the correct conclusion. 42 TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT One-sided t tests 22 b2b2

44 probability density function of b 2 0 reject H 0 do not reject H 0 1.65 sd 5% null hypothesis:H 0 :  2 = 0 alternative hypothesis:H 1 :  2 > 0 What do we conclude if b 2 is as shown? We fail to reject H 0, irrespective of whether we perform a two-sided test or a two-dsided test. We would make a Type II error in either case. 43 TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT One-sided t tests 22 b2b2

45 probability density function of b 2 0 reject H 0 do not reject H 0 5% null hypothesis:H 0 :  2 = 0 alternative hypothesis:H 1 :  2 > 0 What do we conclude if b 2 is as shown here? In the case of a two-sided test, b 2 is not in the rejection region. We are unable to reject H 0. 44 TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT One-sided t tests 22 b2b2

46 probability density function of b 2 0 reject H 0 do not reject H 0 5% null hypothesis:H 0 :  2 = 0 alternative hypothesis:H 1 :  2 > 0 This means that we are unable to demonstrate that X has a significant effect on Y. This is disappointing, because we were hoping to demonstrate that X is a determinant of Y. 45 TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT One-sided t tests 22 b2b2

47 probability density function of b 2 0 reject H 0 do not reject H 0 5% null hypothesis:H 0 :  2 = 0 alternative hypothesis:H 1 :  2 > 0 However, if we are in a position to perform a one-sided test, b 2 does lie in the rejection region and so we have demonstrated that X has a significant effect on Y (at the 5% significance level, of course). 46 TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT One-sided t tests 22 b2b2

48 probability density function of b 2 0 reject H 0 do not reject H 0 5% null hypothesis:H 0 :  2 = 0 alternative hypothesis:H 1 :  2 > 0 Thus we get a positive finding that we could not get with a two-sided test. 47 TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT One-sided t tests 22 b2b2

49 probability density function of b 2 0 reject H 0 do not reject H 0 5% null hypothesis:H 0 :  2 = 0 alternative hypothesis:H 1 :  2 > 0 To put this reasoning more formally, the power of a one-sided test is greater than that of a two-sided test. The blue area shows the probability of making a Type II error using a two- sided test. It is the area under the true curve to the left of the rejection region. 48 TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT One-sided t tests 22 1.65 sd

50 probability density function of b 2 0 reject H 0 do not reject H 0 5% null hypothesis:H 0 :  2 = 0 alternative hypothesis:H 1 :  2 > 0 The red area shows the probability of making a Type II error using a one-sided test. It is smaller. Since the power of a test is (1 – probability of making a Type II error when H 0 is false), the power of a one-sided test is greater than that of a two-sided test. 49 TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT One-sided t tests 22 1.65 sd

51 probability density function of b 2 0 reject H 0 do not reject H 0 1.65 sd 5% null hypothesis:H 0 :  2 = 0 alternative hypothesis:H 1 :  2 > 0 In all of this, we have assumed that we knew the standard deviation of the distribution of b 2. In practice, of course, the standard deviation has to be estimated as the standard error, and the t distribution is the relevant distribution. However, the logic is exactly the same. 50 TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT One-sided t tests

52 probability density function of b 2 0 reject H 0 do not reject H 0 1.65 sd 5% null hypothesis:H 0 :  2 = 0 alternative hypothesis:H 1 :  2 > 0 At any given significance level, the critical value of t for a one-sided test is lower than that for a two-sided test. 51 TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT One-sided t tests

53 probability density function of b 2 0 reject H 0 do not reject H 0 1.65 sd 5% null hypothesis:H 0 :  2 = 0 alternative hypothesis:H 1 :  2 > 0 Hence, if H 0 is false, the risk of not rejecting it, thereby making a Type II error, is smaller, and so the power of a one-sided test is greater than that of a two-sided test. 52 TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT One-sided t tests

54 TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT Model: Y =  1 +  2 X + u Null hypothesis: H 0 :  2 = 0 Alternative hypothesis: H 1 :  2 ≠ 0 Reject H 0 ifor Do not reject H 0 if Confidence intervals were treated at length in the Review chapter and their application to regression analysis presents no problems. We will not repeat the graphical explanation. We will just provide the mathematical derivation in the context of a regression. Confidence intervals 53

55 TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT Model: Y =  1 +  2 X + u Null hypothesis: H 0 :  2 = 0 Alternative hypothesis: H 1 :  2 ≠ 0 Reject H 0 ifor Do not reject H 0 if From the initial discussion in this section, we saw that, given the theoretical model Y =  1 +  2 X + u and a fitted model, the regression coefficient b 2 and the hypothetical value of  2 are incompatible if either of the inequalities shown is valid. Confidence intervals 54

56 TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT Model: Y =  1 +  2 X + u Null hypothesis: H 0 :  2 = 0 Alternative hypothesis: H 1 :  2 ≠ 0 Reject H 0 ifor Do not reject H 0 if Multiplying through by the standard error of b 2, the conditions for rejecting H 0 can be written as shown. Confidence intervals 55

57 TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT Model: Y =  1 +  2 X + u Null hypothesis: H 0 :  2 = 0 Alternative hypothesis: H 1 :  2 ≠ 0 Reject H 0 ifor Do not reject H 0 if The inequalities may then be re-arranged as shown. Confidence intervals 56

58 TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT Model: Y =  1 +  2 X + u Null hypothesis: H 0 :  2 = 0 Alternative hypothesis: H 1 :  2 ≠ 0 Reject H 0 ifor Do not reject H 0 if We can then obtain the confidence interval for  2, being the set of all values that would not be rejected, given the sample estimate b 2. To make it operational, we need to select a significance level and determine the corresponding critical value of t. Confidence intervals 57

59 TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT For an example of the construction of a confidence interval, we will return to the earnings function fitted earlier. We will construct a 95% confidence interval for  2.. reg EARNINGS S Source | SS df MS Number of obs = 540 -------------+------------------------------ F( 1, 538) = 112.15 Model | 19321.5589 1 19321.5589 Prob > F = 0.0000 Residual | 92688.6722 538 172.283777 R-squared = 0.1725 -------------+------------------------------ Adj R-squared = 0.1710 Total | 112010.231 539 207.811189 Root MSE = 13.126 ------------------------------------------------------------------------------ EARNINGS | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- S | 2.455321.2318512 10.59 0.000 1.999876 2.910765 _cons | -13.93347 3.219851 -4.33 0.000 -20.25849 -7.608444 ------------------------------------------------------------------------------ 2.455 – 0.232 x 1.965 ≤  2 ≤ 2.455 + 0.232 x 1.965 1.999 ≤  2 ≤ 2.911 Confidence intervals 58

60 TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT The point estimate  2 is 2.455 and its standard error is 0.232.. reg EARNINGS S Source | SS df MS Number of obs = 540 -------------+------------------------------ F( 1, 538) = 112.15 Model | 19321.5589 1 19321.5589 Prob > F = 0.0000 Residual | 92688.6722 538 172.283777 R-squared = 0.1725 -------------+------------------------------ Adj R-squared = 0.1710 Total | 112010.231 539 207.811189 Root MSE = 13.126 ------------------------------------------------------------------------------ EARNINGS | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- S | 2.455321.2318512 10.59 0.000 1.999876 2.910765 _cons | -13.93347 3.219851 -4.33 0.000 -20.25849 -7.608444 ------------------------------------------------------------------------------ 2.455 – 0.232 x 1.965 ≤  2 ≤ 2.455 + 0.232 x 1.965 1.999 ≤  2 ≤ 2.911 Confidence intervals 59

61 TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT The critical value of t at the 5% significance level with 538 degrees of freedom is 1.965.. reg EARNINGS S Source | SS df MS Number of obs = 540 -------------+------------------------------ F( 1, 538) = 112.15 Model | 19321.5589 1 19321.5589 Prob > F = 0.0000 Residual | 92688.6722 538 172.283777 R-squared = 0.1725 -------------+------------------------------ Adj R-squared = 0.1710 Total | 112010.231 539 207.811189 Root MSE = 13.126 ------------------------------------------------------------------------------ EARNINGS | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- S | 2.455321.2318512 10.59 0.000 1.999876 2.910765 _cons | -13.93347 3.219851 -4.33 0.000 -20.25849 -7.608444 ------------------------------------------------------------------------------ 2.455 – 0.232 x 1.965 ≤  2 ≤ 2.455 + 0.232 x 1.965 1.999 ≤  2 ≤ 2.911 Confidence intervals 60

62 TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT Hence we establish that the confidence interval is from 1.999 to 2.911. Stata actually computes the 95% confidence interval as part of its default output, 2.000 to 2.911. The discrepancy in the lower limit is due to rounding error in the calculations we have made. Confidence intervals. reg EARNINGS S Source | SS df MS Number of obs = 540 -------------+------------------------------ F( 1, 538) = 112.15 Model | 19321.5589 1 19321.5589 Prob > F = 0.0000 Residual | 92688.6722 538 172.283777 R-squared = 0.1725 -------------+------------------------------ Adj R-squared = 0.1710 Total | 112010.231 539 207.811189 Root MSE = 13.126 ------------------------------------------------------------------------------ EARNINGS | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- S | 2.455321.2318512 10.59 0.000 1.999876 2.910765 _cons | -13.93347 3.219851 -4.33 0.000 -20.25849 -7.608444 ------------------------------------------------------------------------------ 2.455 – 0.232 x 1.965 ≤  2 ≤ 2.455 + 0.232 x 1.965 1.999 ≤  2 ≤ 2.911 61

63 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 Section 2.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 http://www.oup.com/uk/orc/bin/9780199567089/http://www.oup.com/uk/orc/bin/9780199567089/. 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 http://www2.lse.ac.uk/study/summerSchools/summerSchool/Home.aspx http://www2.lse.ac.uk/study/summerSchools/summerSchool/Home.aspx or the University of London International Programmes distance learning course 20 Elements of Econometrics www.londoninternational.ac.uk/lsewww.londoninternational.ac.uk/lse. 11.07.25


Download ppt "Christopher Dougherty EC220 - Introduction to econometrics (chapter 2) Slideshow: testing a hypothesis relating to a regression coefficient (2010/2011."

Similar presentations


Ads by Google