#### Transcript app_cINFERENCE - Memorial University of Newfoundland

ECON 4550 Econometrics Memorial University of Newfoundland Review of Statistical Inference Prepared by Vera Tabakova, East Carolina University C.1 A Sample of Data C.2 An Econometric Model C.3 Estimating the Mean of a Population C.4 Estimating the Population Variance and Other Moments C.5 Interval Estimation Principles of Econometrics, 3rd Edition Slide C-2 C.6 Hypothesis Tests About a Population Mean C.7 Some Other Useful Tests C.8 Introduction to Maximum Likelihood Estimation C.9 Algebraic Supplements Principles of Econometrics, 3rd Edition Slide C-3 Principles of Econometrics, 3rd Edition Slide C-4 Figure C.1 Histogram of Hip Sizes Principles of Econometrics, 3rd Edition Slide C-5 E[Y ] var(Y ) E[Y E(Y )]2 E[Y ]2 2 Principles of Econometrics, 3rd Edition (C.1) (C.2) Slide C-6 y yi N (C.3) N Y Yi / N (C.4) i 1 Principles of Econometrics, 3rd Edition Slide C-7 y yi N (C.3) N Y Yi / N (C.4) i 1 Principles of Econometrics, 3rd Edition Slide C-8 Principles of Econometrics, 3rd Edition Slide C-9 Y N 1 1 1 1 Y Yi Y1 Y2 ... YN N N N i 1 N (C.5) 1 1 1 E[Y ] E Y1 E Y2 ... E YN N N N 1 1 1 E Y1 E Y2 ... E YN N N N 1 1 1 ... N N N Principles of Econometrics, 3rd Edition Slide C-10 Y 1 1 1 var Y var Y1 Y2 ... YN N N N 1 1 1 = 2 var Y1 2 var Y2 ... 2 var YN N N N 1 2 1 2 1 2 2 2 ... 2 N N N 2 So the variance gets smaller as we increase N N Principles of Econometrics, 3rd Edition (C.6) Slide C-11 Y Figure C.2 Increasing Sample Size and Sampling Distribution of Y Principles of Econometrics, 3rd Edition Slide C-12 Central Limit Theorem: If Y1,…,YN are independent and identically distributed random variables with mean μ and variance σ 2, Y and Y Yi / N , then Z N N has a probability distribution that converges to the standard normal N(0,1) as N . Principles of Econometrics, 3rd Edition Slide C-13 2 y 0 y 1 f y otherwise 0 Y 2/3 ZN 1/18 N So this is just a “triangular “distribution...what happens if we look at the distribution of the transformed variable? Principles of Econometrics, 3rd Edition Slide C-14 Figure C.3 Central Limit Theorem Principles of Econometrics, 3rd Edition Slide C-15 A powerful finding about the estimator of the population mean is that it is the best of all possible estimators that are both linear and unbiased. A linear estimator is simply one that is a weighted average of the Yi’s, such as Y aiYi , where the ai are constants. “Best” means that it is the linear unbiased estimator with the smallest possible variance. Principles of Econometrics, 3rd Edition Slide C-16 r r E Y 1 1 E Y E Y 0 2 2 E Y 2 3 3 E Y 4 4 E Y Principles of Econometrics, 3rd Edition These are called “central” moments Slide C-17 var Y E Y 2 2 ˆ 2 2 Yi Y 2 N Yi Y N 1 2 (C.7) The correction from N to N-1 is needed because the mean must be estimated before the variance can be estimated. Principles of Econometrics, 3rd Edition Slide C-18 Once we estimated sigma, we can use it to estimate the population variance: var Y ˆ 2 N (C.8) And the standard deviation se Y var Y ˆ / N Principles of Econometrics, 3rd Edition (C.9) Slide C-19 r r E Y In statistics the Law of Large Numbers says that sample means converge to population averages (expected values) as the sample size N → ∞. 2 Yi Y N 2 2 3 Yi Y N 3 4 Yi Y N 4 Principles of Econometrics, 3rd Edition Slide C-20 3 skewness S 3 4 kurtosis K 4 Principles of Econometrics, 3rd Edition Slide C-21 C.5.1 Interval Estimation: σ2 Known N Y Yi N i 1 Y ~ N , 2 N Y Y Z ~ N 0,1 2 N N (C.10) PZ z z Principles of Econometrics, 3rd Edition Slide C-22 Figure C.4 Critical Values for the N(0,1) Distribution Principles of Econometrics, 3rd Edition Slide C-23 P Z 1.96 P Z 1.96 .025 P 1.96 Z 1.96 1 .05 .95 P Y 1.96 Principles of Econometrics, 3rd Edition N Y 1.96 (C.11) N .95 Slide C-24 P Y zc Y zc 1 N N Y zc Principles of Econometrics, 3rd Edition N (C.12) (C.13) Slide C-25 Principles of Econometrics, 3rd Edition Slide C-26 Principles of Econometrics, 3rd Edition Slide C-27 Any one interval estimate may or may not contain the true population parameter value. If many samples of size N are obtained, and intervals are constructed using (C.13) with (1) = .95, then 95% of them will contain the true parameter value. A 95% level of “confidence” is the probability that the interval estimator will provide an interval containing the true parameter value. Our confidence is in the procedure, not in any one interval estimate. Principles of Econometrics, 3rd Edition Slide C-28 When σ2 is unknown it is natural to replace it with its estimator ˆ 2 . Yi Y N ˆ 2 i 1 N 1 Y t ˆ N Principles of Econometrics, 3rd Edition 2 t( N 1) (C.14) Slide C-29 Y P tc tc 1 ˆ N ˆ ˆ P Y tc Y tc 1 N N Y tc Principles of Econometrics, 3rd Edition ˆ or Y tcse Y N (C.15) Slide C-30 Remark: The confidence interval (C.15) is based upon the assumption that the population is normally distributed, so that Y is normally distributed. If the population is not normal, then we invoke the central limit theorem, and say that Y is approximately normal in “large” samples, which from Figure C.3 you can see might be as few as 30 observations. In this case we can use (C.15), recognizing that there is an approximation error introduced in smaller samples. Principles of Econometrics, 3rd Edition Slide C-31 Principles of Econometrics, 3rd Edition Slide C-32 Components of Hypothesis Tests A null hypothesis, H0 An alternative hypothesis, H1 A test statistic A rejection region A conclusion Principles of Econometrics, 3rd Edition Slide C-33 The Null Hypothesis The “null” hypothesis, which is denoted H0 (H-naught), specifies a value c for a parameter. We write the null hypothesis as H 0 : c. A null hypothesis is the belief we will maintain until we are convinced by the sample evidence that it is not true, in which case we reject the null hypothesis. Principles of Econometrics, 3rd Edition Slide C-34 The Alternative Hypothesis H1: μ > c If we reject the null hypothesis that μ = c, we accept the alternative that μ is greater than c. H1: μ < c If we reject the null hypothesis that μ = c, we accept the alternative that μ is less than c. H1: μ ≠ c If we reject the null hypothesis that μ = c, we accept the alternative that μ takes a value other than (not equal to) c. Principles of Econometrics, 3rd Edition Slide C-35 The Test Statistic A test statistic’s probability distribution is completely known when the null hypothesis is true, and it has some other distribution if the null hypothesis is not true. Y t ~ t N 1 ˆ N If H 0 : c is true then Y c t ~ t N 1 ˆ N Principles of Econometrics, 3rd Edition (C.16) Slide C-36 Remark: The test statistic distribution in (C.16) is based on an assumption that the population is normally distributed. If the population is not normal, then we invoke the central limit theorem, and say that Y is approximately normal in “large” samples. We can use (C.16), recognizing that there is an approximation error introduced if our sample is small. Principles of Econometrics, 3rd Edition Slide C-37 The Rejection Region If a value of the test statistic is obtained that falls in a region of low probability, then it is unlikely that the test statistic has the assumed distribution, and thus it is unlikely that the null hypothesis is true. If the alternative hypothesis is true, then values of the test statistic will tend to be unusually “large” or unusually “small”, determined by choosing a probability , called the level of significance of the test. The level of significance of the test is usually chosen to be .01, .05 or .10. Principles of Econometrics, 3rd Edition Slide C-38 A Conclusion When you have completed a hypothesis test you should state your conclusion, whether you reject, or do not reject, the null hypothesis. Say what the conclusion means in the economic context of the problem you are working on, i.e., interpret the results in a meaningful way. Principles of Econometrics, 3rd Edition Slide C-39 Figure C.5 The rejection region for the one-tail test of H1: μ = c against H1: μ > c Principles of Econometrics, 3rd Edition Slide C-40 Figure C.6 The rejection region for the one-tail test of H1: μ = c against H1: μ < c Principles of Econometrics, 3rd Edition Slide C-41 Figure C.7 The rejection region for a test of H1: μ = c against H1: μ ≠ c Principles of Econometrics, 3rd Edition Slide C-42 Warning: Care must be taken here in interpreting the outcome of a statistical test. One of the basic precepts of hypothesis testing is that finding a sample value of the test statistic in the non-rejection region does not make the null hypothesis true! The weaker statements “we do not reject the null hypothesis,” or “we fail to reject the null hypothesis,” do not send a misleading message. Principles of Econometrics, 3rd Edition Slide C-43 p-value rule: Reject the null hypothesis when the pvalue is less than, or equal to, the level of significance α. That is, if p ≤ α then reject H0. If p > α then do not reject H0 Principles of Econometrics, 3rd Edition Slide C-44 How the p-value is computed depends on the alternative. If t is the calculated value [not the critical value tc] of the tstatistic with N−1 degrees of freedom, then: if H1: μ > c , p = probability to the right of t if H1: μ < c , p = probability to the left of t if H1: μ ≠ c , p = sum of probabilities to the right of |t| and to the left of –|t| Principles of Econometrics, 3rd Edition Slide C-45 Figure C.8 The p-value for a right-tail test Principles of Econometrics, 3rd Edition Slide C-46 Figure C.9 The p-value for a two-tailed test Principles of Econometrics, 3rd Edition Slide C-47 A statistical test procedure cannot prove the truth of a null hypothesis. When we fail to reject a null hypothesis, all the hypothesis test can establish is that the information in a sample of data is compatible with the null hypothesis. On the other hand, a statistical test can lead us to reject the null hypothesis, with only a small probability, , of rejecting the null hypothesis when it is actually true. Thus rejecting a null hypothesis is a stronger conclusion than failing to reject it. Principles of Econometrics, 3rd Edition Slide C-48 Correct Decisions The null hypothesis is false and we decide to reject it. The null hypothesis is true and we decide not to reject it. Incorrect Decisions The null hypothesis is true and we decide to reject it (a Type I error) The null hypothesis is false and we decide not to reject it (a Type II error) Principles of Econometrics, 3rd Edition Slide C-49 The probability of a Type II error varies inversely with the level of significance of the test, , which is the probability of a Type I error. If you choose to make smaller, the probability of a Type II error increases. If the null hypothesis is μ = c, and if the true (unknown) value of μ is close to c, then the probability of a Type II error is high. The larger the sample size N, the lower the probability of a Type II error, given a level of Type I error . Principles of Econometrics, 3rd Edition Slide C-50 H0 : c H1 : c If we fail to reject the null hypothesis at the level of significance, then the value c will fall within a 100(1)% confidence interval estimate of μ. If we reject the null hypothesis, then c will fall outside the 100(1)% confidence interval estimate of μ. Principles of Econometrics, 3rd Edition Slide C-51 We fail to reject the null hypothesis when tc t tc , or when Y c tc tc ˆ N Y tc Principles of Econometrics, 3rd Edition ˆ ˆ c Y tc N N Slide C-52 C.7.1 Testing the population variance Y ~ N , 2 , Y Yi N ˆ Yi Y 2 2 N 1 H 0 : 2 02 ( N 1)ˆ 2 2 V ~ ( N 1) 2 0 Principles of Econometrics, 3rd Edition Slide C-53 If H1 : 2 02 , then the null hypothesis is rejected if 2 V (.95, N 1) . If H1 : 2 02 , then we carry out a two tail test, and the null hypothesis is rejected if 2 2 V (.975, or if V N 1) .025, N 1 . Principles of Econometrics, 3rd Edition Slide C-54 Case 1: Population variances are equal 12 22 2p ˆ 2p N1 1 ˆ 12 N 2 1 ˆ 22 N1 N 2 2 If the null hypothesis H 0 : 1 2 c is true then t Principles of Econometrics, 3rd Edition Y Y c 1 2 1 1 ˆ 2p N N 2 1 ~ t( N1 N2 2) Slide C-55 Case 2: Population variances are unequal t df Principles of Econometrics, 3rd Edition * Y Y c 1 2 ˆ 12 ˆ 22 N1 N 2 ˆ 2 1 N1 ˆ N 2 2 2 2 ˆ 2 N 2 ˆ 2 N 2 1 1 2 2 N1 1 N2 1 Slide C-56 2 2 ˆ N 1 1 1 1 N1 1 ˆ 12 12 F 2 2 ~ F N1 1, N2 1 2 2 N 2 1 ˆ 2 2 ˆ 2 2 N 2 1 Principles of Econometrics, 3rd Edition Slide C-57 The normal distribution is symmetric, and has a bell-shape with a peakedness and tail-thickness leading to a kurtosis of 3. We can test for departures from normality by checking the skewness and kurtosis from a sample of data. 3 skewness S 3 4 kurtosis K 4 Principles of Econometrics, 3rd Edition Slide C-58 The Jarque-Bera test statistic allows a joint test of these two characteristics, 2 N 2 K 3 JB S 6 4 If we reject the null hypothesis then we know the data have non- normal characteristics, but we do not know what distribution the population might have. Principles of Econometrics, 3rd Edition Slide C-59 Figure C.10 Wheel of Fortune Game Principles of Econometrics, 3rd Edition Slide C-60 For wheel A, with p=1/4, the probability of observing WIN, WIN, LOSS is 1 1 3 3 .0469 4 4 4 64 For wheel B, with p=3/4, the probability of observing WIN, WIN, LOSS is Principles of Econometrics, 3rd Edition 3 3 1 9 .1406 4 4 4 64 Slide C-61 If we had to choose wheel A or B based on the available data, we would choose wheel B because it has a higher probability of having produced the observed data. It is more likely that wheel B was spun than wheel A, and pˆ 3 4 is called the maximum likelihood estimate of p. The maximum likelihood principle seeks the parameter values that maximize the probability, or likelihood, of observing the outcomes actually obtained. Principles of Econometrics, 3rd Edition Slide C-62 Suppose p can be any probability between zero and one. The probability of observing WIN, WIN, LOSS is the likelihood L, and is L p p p 1 p p 2 p3 (C.17) We would like to find the value of p that maximizes the likelihood of observing the outcomes actually obtained. Principles of Econometrics, 3rd Edition Slide C-63 Figure C.11 A Likelihood Function Principles of Econometrics, 3rd Edition Slide C-64 dL p 2 p 3 p2 dp 2 p 3 p2 0 p 2 3 p 0 There are two solutions to this equation, p=0 or p=2/3. The value that maximizes L(p) is pˆ 2 3, which is the maximum likelihood estimate. Principles of Econometrics, 3rd Edition Slide C-65 Let us define the random variable X that takes the values x=1 (WIN) and x=0 (LOSS) with probabilities p and 1−p. P X x f x | p p 1 p 1 x x f x1 , , x 0,1 , xN | p f x1 | p f xN | p N xi xi p 1 p L p | x1 , Principles of Econometrics, 3rd Edition (C.18) , xN Slide C-66 Figure C.12 A Log-Likelihood Function Principles of Econometrics, 3rd Edition Slide C-67 N ln L p ln f xi | p i 1 (C.19) N N xi ln p N xi ln 1 p i 1 i 1 d ln L p xi N xi dp p 1 p Principles of Econometrics, 3rd Edition Slide C-68 xi N xi pˆ 1 pˆ 0 1 pˆ xi pˆ N xi 0 xi pˆ N Principles of Econometrics, 3rd Edition x (C.20) Slide C-69 N ln L ln f xi | i 1 ˆ ~a N ,V ˆ c a t ~ t N 1 se ˆ Principles of Econometrics, 3rd Edition (C.21) (C.22) Slide C-70 REMARK: The asymptotic results in (C.21) and (C.22) hold only in large samples. The distribution of the test statistic can be approximated by a t-distribution with N−1 degrees of freedom. If N is truly large then the t(N-1) distribution converges to the standard normal distribution N(0,1). When the sample size N may not be large, we prefer using the t-distribution critical values, which are adjusted for small samples by the degrees of freedom correction, when obtaining interval estimates and carrying out hypothesis tests. Principles of Econometrics, 3rd Edition Slide C-71 d ln L V var ˆ E 2 d Principles of Econometrics, 3rd Edition 2 1 (C.23) Slide C-72 Figure C.13 Two Log-Likelihood Functions Principles of Econometrics, 3rd Edition Slide C-73 d 2 ln L p xi N xi 2 2 2 dp p 1 p (C.24) E xi 1 P xi 1 0 P xi 0 1 p 0 1 p p Principles of Econometrics, 3rd Edition Slide C-74 d 2 ln L p E xi N E xi E 2 2 2 dp p 1 p Np N Np 2 2 p 1 p N p 1 p Principles of Econometrics, 3rd Edition Slide C-75 1 d ln L p p 1 p V var pˆ E 2 dp N 2 p 1 p pˆ ~ N p, N a Principles of Econometrics, 3rd Edition Slide C-76 pˆ 1 pˆ ˆ V N se pˆ Vˆ Principles of Econometrics, 3rd Edition pˆ 1 pˆ N Slide C-77 se pˆ pˆ 1 pˆ .375 .625 .0342 N 200 pˆ .4 .375 .4 t .7303 se pˆ .0342 pˆ 1.96 se pˆ .375 1.96 .0342 .3075,.4425 Principles of Econometrics, 3rd Edition Slide C-78 C.8.4a The likelihood ratio (LR) test The likelihood ratio statistic which is twice the difference between ln L ˆ and ln L c . LR 2 ln L ˆ ln L c Principles of Econometrics, 3rd Edition (C.25) Slide C-79 Figure C.14 The Likelihood Ratio Test Principles of Econometrics, 3rd Edition Slide C-80 Figure C.15 Critical Value for a Chi-Square Distribution Principles of Econometrics, 3rd Edition Slide C-81 N N ˆ ˆ ln L( p) xi ln p N xi ln(1 pˆ ) i 1 i 1 Npˆ ln pˆ N Npˆ ln(1 pˆ ) N pˆ ln pˆ 1 pˆ ln(1 pˆ ) Principles of Econometrics, 3rd Edition Slide C-82 For the cereal box problem pˆ .375 and N = 200. ln L( pˆ ) 200 .375 ln(.375) (1 .375) ln(1 .375) 132.3126 Principles of Econometrics, 3rd Edition Slide C-83 The value of the log-likelihood function assuming H 0 : p .4 is true is: N N ln L(.4) xi ln(.4) N xi ln(1 .4) i 1 i 1 75 ln(.4) (200 75) ln(.6) 132.5750 Principles of Econometrics, 3rd Edition Slide C-84 The problem is to assess whether −132.3126 is significantly different from −132.5750. The LR test statistic (C.25) is: LR 2 [ln L( pˆ ) ln L(.4)] 2 132.3126 (132.575) .5247 The critical value is 2.95,1 3.84. Since .5247 < 3.84 we do not reject the null hypothesis. Principles of Econometrics, 3rd Edition Slide C-85 Figure C.16 The Wald Statistic Principles of Econometrics, 3rd Edition Slide C-86 2 d ln L ˆ W c 2 d 2 (C.26) If the null hypothesis is true then the Wald statistic (C.26) has a 2 1 distribution, and we reject the null hypothesis if W (12 ,1) . Principles of Econometrics, 3rd Edition Slide C-87 d 2 ln L 1 I E V 2 d W ˆ c I 2 W ˆ c V Principles of Econometrics, 3rd Edition 1 (C.27) 2 ˆ c (C.28) 2 V (C.29) Slide C-88 Vˆ I ˆ 1 (C.30) ˆ c ˆ c W t Vˆ se ˆ Principles of Econometrics, 3rd Edition Slide C-89 In the blue box-green box example: I pˆ Vˆ 1 N 200 853.3333 pˆ 1 pˆ .375 1 .375 W pˆ c I pˆ .375 .4 853.3333 .5333 2 Principles of Econometrics, 3rd Edition 2 Slide C-90 Figure C.17 Motivating the Lagrange multiplier test Principles of Econometrics, 3rd Edition Slide C-91 d ln L s d (C.31) s c 2 1 LM s c I I (C.32) 2 LM s c I c 2 1 2 W ˆ c I ˆ Principles of Econometrics, 3rd Edition Slide C-92 In the blue box-green box example: xi N xi s .4 c 1 c 75 200 75 20.8333 .4 1 .4 N 200 I .4 833.3333 c 1 c .4 1 .4 LM s .4 I .4 20.8333 833.3333 .5208 2 Principles of Econometrics, 3rd Edition 1 2 1 Slide C-93 C.9.1 Derivation of Least Squares Estimator N S ( yi ) 2 i 1 di ( yi ) 2 d i2 ( yi ) 2 Principles of Econometrics, 3rd Edition Slide C-94 N N S d ( yi )2 i 1 N 2 i i 1 N S y 2 yi N 2 a0 2a1 a2 2 i 1 2 i i 1 a0 yi2 14880.1909, a1 yi 857.9100, a2 N 50 Principles of Econometrics, 3rd Edition Slide C-95 Figure C.18 The Sum of Squares Parabola For the Hip Data Principles of Econometrics, 3rd Edition Slide C-96 dS 2a1 2a2 d 2a1 2a2ˆ 0 N y a1 i 1 i ˆ y a2 N N ˆ Principles of Econometrics, 3rd Edition Y i 1 N i Y Slide C-97 For the hip data in Table C.1 N yi 857.9100 ˆ 17.1582 N 50 i 1 Thus we estimate that the average hip size in the population is 17.1582 inches. Principles of Econometrics, 3rd Edition Slide C-98 N 1 1 1 Y Yi / N Y1 Y2 ... YN N N N i 1 a1Y1 a2Y2 ... aN YN N aiYi i 1 Principles of Econometrics, 3rd Edition Slide C-99 N Y aiYi i 1 1 a ai ci ci N i Principles of Econometrics, 3rd Edition Slide C-100 1 Y a Y ci Yi i 1 i 1 N N i i N N N 1 Yi ciYi i 1 N i 1 N Y ciYi i 1 Principles of Econometrics, 3rd Edition Slide C-101 N N E Y E Y ciYi ci E Yi i 1 i 1 N ci i 1 Principles of Econometrics, 3rd Edition Slide C-102 N1 N1 var(Y ) var ai Yi var ci Yi ci var(Yi ) i 1 i 1 N i 1 N 2 N 2 N N 2 2 N 1 1 2 2 2 1 ci 2 ci ci ci ci2 N i 1 N i 1 N i 1 N N i 1 2 N N 2 2 N c i 1 var(Y ) 2 2 i N (since ci 0) i 1 N ci2 i 1 Principles of Econometrics, 3rd Edition Slide C-103 alternative hypothesis asymptotic distribution BLUE central limit theorem central moments estimate estimator experimental design information measure interval estimate Lagrange multiplier test Law of large numbers level of significance likelihood function likelihood ratio test linear estimator log likelihood function maximum likelihood estimation null hypothesis Principles of Econometrics, 3rd Edition point estimate population parameter p-value random sample rejection region sample mean sample variance sampling distribution sampling variation standard error standard error of the mean standard error of the estimate statistical inference test statistic two-tail tests Type I error Type II error unbiased estimators Wald test Slide C-104