BOSTON COLLEGE Departmet of Ecoomics EC771: Ecoometrics Sprig 4 Prof. Baum, Ms. Uysal Solutio Key for Problem Set 1 1. Are the followig quadratic forms positive for all values of x? (a) y = x 1 8x 1 x + (11x ). (b) y = 5x 1 + x + 7x 3 + 4x 1 x + 6x 1 x 3 + 8x x 3. The first may be writte [ ] [ ] [ ] 1 14 x1 x 1 x. The determiat of the matrix is 11-196=-85, so it is ot positive defiite. Thus, the first 14 11 x quadratic form eed ot be positive. The secod uses the matrix 5 3 1 4 3 4 7 There are several ways to check the defiiteess of a matrix. Oe way is to check the sigs of the pricipal miors, which must be positive. The first two are 5 ad 5(1)-()=1, but the third, determiat is -34. Therefore, the matrix is ot positive defiite. Its three characteristic roots are 11.1,.9, ad -1. It follows, therefore, that there are values of x 1, x, ad x 3 for which the quadratic form is egative.. Compute the characteristic roots of 4 3 A = 4 8 6. 3 6 5. The roots are determied by A-λI =. For the matrix above, this is A-λI = ( λ)(8 λ)(5 λ) + 7 + 7 9(8 λ) 36( λ) 16(5 λ) = λ 3 + 15λ 5λ = λ(λ 15λ + 5) =. Oe solutio is obviously zero.(this might have bee apparet. The secod colum of the matrix is twice the first, so it has rak o more tha two, ad therefore o more tha two ozero roots.) The other two roots are (15± 5)/=.341 ad 4.659. 3. If x has a ormal distributio with mea 1 ad stadard deviatio 3, what are the followig? (a) P rob [ x > ]. (b) P rob [x > 1 x < 1.5]. Usig the ormal table, (a)p rob [ x > ] = 1 P rob [ x ] 1
= 1 P rob [ x ] = 1 P rob [( 1)/3 z ( 1)/3] = 1 [F (1/3) F ( 1)] = 1.636 +.1587 =.581. (b)p rob [x > 1 x < 1.5] = P rob [ 1 < x < 1.5] /P rob [x < 1.5] P rob [ 1 < x < 1.5] = P rob [( 1 1)/3 < z < (1.5 1)3] = P rob [z < 1/6] P rob [z < /3] =.566.55 =.3137. The coditioal probability is.3137/.566=.554. 4. If x has a ormal distributio with mea µ ad stadard deviatio σ, what is the probability distributio of y = e x? If y = e x, the x = ly ad the Jacobia is dx/dy = 1/y. substitutio, 1 f(y) = σy π e 1 [(ly µ)/σ] Makig the This is the desity of the logormal distributio. 5. The followig sample is draw from a ormal distributio with mea µ ad stadard deviatio σ: x = 1.3,.1,.4, 1.3,.5,., 1.8,.5, 1.9, 3.. Usig the data, test the followig hypotheses: (a) µ., (b) µ.7, (c) σ =.5. (d)usig a likelihood ratio test, test the hypothesis µ = 1.8, σ =.8. Mea, variace ad stadard deviatio of the sample are as follows, x = x i = 1.5, s = (x i x) =.9418, 1 s =.97 (a) We would reject the hypothesis if 1.5 is too small relative to the hypothesized value of. Sice the data are sampled from a ormal distributio, we may use a t-test to test the hypothesis. The t-ratio is t[9] = (1.5 )/[.97/ 1] = 1.47.
The 95% critical value from the t-distributio for a oe tailed test is -1.833. Therefore, we would ot reject the hypothesis at a sigificace level of 95%. (b) We would reject the hypothesis if 1.5 is excessively large relative to the hypothesized mea of.7. The t-ratio is t[9] = (1.5.7)/[.97/ 1] =.673. Usig the same critical value as i the previous problem, we would reject this hypothesis. (c) The statistic ( 1)s /σ is distributed as χ with 9 degrees of freedom. This is 9(.94)/.5=16.9. The 95% critical values from the chi-squared table for a two tailed test are.7 ad 19.. Thus we would ot reject the hypothesis. (d) The log-likelihood for a sample from a ormal distributio is l L = (/) l(π) (/) l σ 1 σ (x i µ) The sample values are ˆµ = x = 1.5, ˆσ = (xi x) =.8476. The maximized log-likelihood for the sample is -13.363. A useful shortcut for computig the log-likelihood at the hypothesized value is (x i µ) = (x i x) + ( x µ). For the hypothesized value of µ = 1.8, this is (x i 1.8) = 9.6. The log-likelihood is 5 l(π) 5 l.8 (1/1.6)9.6 = 13.861. The likelihood ratio statistic is -(l L r l L u )=.996. The critical value for a chi-squared with degrees of freedom is 5.99, so we would ot reject the hypothesis. 6. A commo method of simulatig radom draws from the stadard ormal distributio is to compute the sum of 1 draws from the uiform [,1] distributio ad subtract 6. Ca you justify this procedure? The uiform distributio has mea ad variace 1/1. Therefore, the statistic 1( x 1/) = 1 x i 6 is equivalet to z = ( x µ)/σ. As, this coverges to a stadard ormal variable. Experiece suggests that a sample of 1 is large eough to approximate this result. However, more recetly developed radom umber geerators usually use differet procedures based o the trucatio error which occurs i represetig real umbers i a digital computer. 7. The radom variable x has a cotiuous distributio f(x) ad cumulative distributio fuctio F (x). What is the probability distributio of the sample maximum?[hit: I a radom sample of observatios, x 1, x,..., x, if z is the maximum, the every observatio i the sample is less tha or equal to z. Use the cdf.] If z is the maximum, the every sample observatio is less tha or equal to z. The probability of this is Prob[x 1 z, x z,..., x z]=f (z)f (z)... F (z) = [F (z)]. The desity is the derivative, [F (z)] 1 f(z). 3
8. Testig for ormality. Oe method that has bee suggested for testig whether the distributio uderlyig a sample is ormal is to refer the statistics L = [skewess /6 + (kurtosis 3) /4] to the chi-squared distributio with two degrees of freedom. Usig the data i Exercise 5, carry out the test. The skewess coefficiet is.1419 ad the kurtosis is 1.8447. (These are the third ad fourth momets divided by the third ad fourth power of the sample stadard deviatio.) Isertig these i the expressio i the questio produces L= 1{.1419 /6 + (1.8447 3) /4} =.59. The critical value from the chi-squared distributio with degrees of freedom (95%) is 5.99. Thus, the hypothesis of ormality caot be rejected. 9. Mixture distributio. Suppose that the joit distributio of the two radom variables x ad y is f(x, y) = θe (β+θ)y (βy) x, β, θ >, y, x =, 1,,... x! Fid the maximum likelihood estimators of β ad θ ad their asymptotic joit distributio. The log-likelihood is l L = l θ (β + θ) y i + l β x i + x ilogy i log(x i!) The first ad secod derivatives are L/ θ = /θ l L/ β = y i + y i l L/ θ = /θ l L/ θ = x i /β l L/ β θ =. x i /β Therefore, the maximum likelihood estimators are[ ˆθ = 1/ȳ ad ˆβ = x/ȳ ad the /θ asymptotic covariace matrix is the iverse of E ]. x i/β I order to complete the derivatio, we will require the expected value of x i = E[x i ]. I order to obtai E[x i ], it is ecessary to obtai the margial distributio of x i, which is f(x) = θe (β+θ)y (βy) x /x! dy = β x (θ/x!) e (β+θ)y y x dy. This is β x (θ/x!) times a gamma itegral. This is f(x) = β x (θ/x!)[γ(x+1)]/(β + θ) x+1. But, Γ(x + 1) = x!, so the expressio reduces to f(x) = [θ/(β + θ)][β/(β + θ)] x. 4
Thus, x has a geometric distributio with parameter π = θ/(β +θ). (This is the distributio of the umber of tries util the first success of idepedet trials each with success probability 1-π.) Fially, we require the expected value of x i, which is E[x] = [θ/(β + θ)] x[β/(β + θ)] x ] = β/θ. x= The, the required asymptotic covariace matrix is [ ] /θ 1 [ /θ (β/θ)/β = (βθ)/ ]. 1. Empirical exercise. Usig the caed dataset discrim, which you may access with the commad.use http://fmwww.bc.edu/ec-p/data/wooldridge/discrim (a) How may of the observatios are from Pesylvaia? (hit: describe may be useful) (b) What is the average startig wage (first wave)? What are the mi ad max of this variable? (c) Test the hypothesis that average icomes i NJ ad PA are equal. (hit: help ttest) (d) Test the hypothesis that the average price of a etree (first wave) was $1.39. (e) Write a Stata program, usig the ml sytax, which will estimate the parameters of a k-variable liear regressio model with a costat term, icludig the σ parameter, via maximum likelihood. Use your program to estimate the model: pfries i = β + β 1 icome i + β prpblck i + ɛ i over the whole sample, ad (f) oly over the New Jersey observatios (those for which state equals 1). (g) Use Stata s regress commad to estimate the same liear regressio, ad use bootstrap to geerate bootstrap stadard errors for the ˆβ parameters. Discuss how the bootstrap cofidece itervals for icome ad prpblk compare with the covetioal cofidece itervals computed by regress. Tur i a pritout of your program illustratig the results of each estimatio. 5