Economics 345 Applied Econometrics Problem Set 1: Solutions Prof ...

93 downloads 343 Views 10MB Size Report
Economics 345. Applied Econometrics ... I use images from this website in the answers below. Naturally .... From the Wooldridge solutions manual: C.1 (i) This is ...
Economics 345 Applied Econometrics Problem Set 1: Solutions Prof: Martin Farnham Problem sets in this course are ungraded. An answer key will be posted on the website within a few days of the release of each problem set. As noted in class, it is highly recommended that you make every effort to complete these problems before viewing the answer key. 1) Given the following set of data (using a spreadsheet, or calculating by hand), xi 12 3 7 8 5

Deviations from the mean 5 -4 0 1 -2

Deviations squared 25 16 0 1 4

a) Calculate the sample mean. mean=(12+3+7+8+5)/5 = 35/5 = 7 b) Fill in Columns 2-3 of the table. deviation=xi-mean c) What is the sum of the deviations from the mean? 0 d) Calculate the sum of squared deviations. 46 2) Consider a discrete random variable, X, where the outcome of this random variable is determined by throwing a 6-sided die. X takes on integer values 1,2,…,6. The die is fair. That is, P(X=1)= P(X=2)=…= P(X=6). a) Draw the probability distribution function for this random variable. Carefully label the graph.

b) Draw the cumulative distribution function for X.

Calculate the following: c) P(X=4) 1/6 d) P(X≠5) 5/6 e) P(X=1 or X=6) 1/3 f) P(X≤4) =1-P(X=5 or X=6)=1 - 1/3 = 2/3 g) E(X) =(1+2+3+4+5+6)/6=3.5

h) Var(X) Var(X)=E(X-µ)2=E(X2)- µ2=(1+4+9+16+25+36)/6 – (3.5)2≈15.167-12.25≈2.9167 i) sd(X)

≈1.7078 (by taking the square root of Var(X)) Consider the random variable Y where the outcome of Y is determined by throwing a second, fair, 6-sided die. Now consider the joint distribution of X and Y. Calculate j) P(X=1 and Y=1) (1/6)*(1/6)=1/36 k) P(X≠1 and Y≠2) (5/6)*(5/6)=25/36 l) P(Y=2|X=1) The outcome of X has no effect on the probability that Y takes on any given value. So the conditional (conditional on X) probability that Y=2 is the same as the unconditional probability that Y=2. That is, it’s 1/6. m) Cov(X,Y) There’s no relationship between X and Y (linear or otherwise). So Cov(X,Y)=0. 3) Consider a continuous random variable X that is normally distributed with mean 4 and variance 10. a) Draw (as accurately as you can) the pdf of X. Carefully label axes. There’s a nifty little applet on a website at UCLA that can be used to quickly plot pdfs of various distributions. http://socr.stat.ucla.edu/htmls/SOCR_Distributions.html I use images from this website in the answers below. Naturally, I wouldn’t expect your drawings to be so accurate (mine wouldn’t be!).

Note that the horizontal axis should be labeled, x. The vertical axis should be labeled f(x). b) Draw (as accurately as you can) the cdf of X. Carefully label axes.

Note: This is not a perfectly accurate representation. The applet noted above does not do cdfs!

c) At what value of x does the cdf take on the value 0.5? Label this in your diagram. The Normal distribution is symmetric. Therefore half the probability mass lies to the left of the mean, and half lies to the right. Since the cdf tells us P(X≤x) we know that if x is the mean, the probability that X takes on a value less than that is 0.5. So the cdf takes on a value of 0.5 at its mean, 4. d) In the diagram of your pdf, label the area that represents the probability that X takes on a value between 3 and 5.

3

5

e) What is the probability that X=2/3? This pdf is continuous. Therefore the probability of X taking on any particular value is zero. 4) Suppose X is a normally distributed random variable with mean µ and variance σ2. Suppose we define a new random variable, W=2X + 3. a) What is E(W)? E(W)=2µ+3 b) What is Var(W)? Var(W)=4σ2. 5) Suppose you have the following information about two random variables, X and Y: sd(X)=20 sd(Y)=30 Cov(X,Y)=-200

What is the correlation coefficient for X and Y?

ρ XY =

−200 −200 1 = =− 20 * 30 600 3

6) Suppose the random variables X and Y are jointly distributed. Define a new random variable, W=2X+3Y. a) What is Var(W). Var(W)=4Var(X)+9Var(Y)+12Cov(X,Y) b) What is Var(W) if X and Y are independent? Var(W)=4Var(X)+9Var(Y) (because Cov(X,Y)=0 if X and Y are independent. 7) (proof) Consider a random sample {Y1, Y2,…, Yn} drawn from a distribution that is Normal(µ,σ2). a) Show that the random variable

1 n Y = ∑ Yi . n i =1 has a mean of µ. This is actually straight out of the notes and text. But easy enough to do without looking.

⎛ 1⎞ n ⎛ 1⎞ n ⎛ 1⎞ E ⎜ ⎟ ∑ Yi = ⎜ ⎟ ∑ E(Y )i = ⎜ ⎟ nµ = µ ⎝ n ⎠ i =1 ⎝ n ⎠ i =1 ⎝ n⎠ b) Show that it has a variance of σ2/n. Also from the notes.

1 1 ⎡⎛ 1 ⎞ n ⎤ 1 n Var ⎢⎜ ⎟ ∑ Yi ⎥ = 2 ∑ Var(Yi ) = 2 nσ 2 = σ 2 n n ⎣⎝ n ⎠ i =1 ⎦ n i =1 These two proofs are worth knowing, because they’re essential to understanding sampling distributions. The second one shows clearly why larger sample sizes lead to more precise estimates. 8) Problem B.2 in your text.

X~N(5,4) Define Z~N(0,1) where Z=(X-µ)/σ=(X-5)/2 i)

6 − 5⎞ ⎛ P(X ≤ 6) = P ⎜ Z ≤ ⎟ = P(Z ≤ 0.5) = 0.6915 ⎝ 2 ⎠ ii) 4 − 5⎞ ⎛ P(X > 4) = 1 − P(X ≤ 4) = 1 − P ⎜ Z ≤ ⎟ = 1 − P(Z ≤ −0.5) ⎝ 2 ⎠ =1-0.3085=0.6915 iii) Notice that the -5 shifts the whole distribution of this random variable to the left by 5 units. The random variable W=X-5 has a mean of zero, and a variance of 4. To normalize this, we only need to divide by the standard deviation of 2. Let Z=(X-5)/2=W/2 P ( W > 1) = P(W > 1) + P(W < −1) = 1 − P(W ≤ 1) + P(W ≤ −1) = 1 − P(Z ≤ 0.5) + P(Z ≤ −0.5) = 1 − 0.6915 + 0.3085 = 0.6170

9) True/False/Uncertain (explain): A biased estimator should never be used by an econometrician. False. Sometimes we might expect the bias of an estimator to be quite small. In such cases, a biased estimator with low sampling variance might be preferred over an unbiased estimator with larger sampling variance. Comparison of the Mean Squared Error of each estimator (where smaller MSEs are preferred) can be useful in assessing which is a better estimator. 10) Suppose you have a random sample from a normal distribution. Using this sample, you’ve estimated the sample mean to be 7.5. Your sample size is 25, and you’ve estimated the sample standard deviation to be 3. a) Calculate the 90% confidence interval on the estimated sample mean. The critical value for a 90% confidence interval (all our confidence intervals in this course will be 2-sided) is 1.711, because there are 24 degrees of freedom, for this t-

distribution. Therefore a 90% confidence interval is given by ⎛ 3 ⎞ [y ± 1.711se(y)] = [7.5 ± 1.711⎜ ] = [7.5 ± 1.711(0.6)] = [7.5 ± 1.0266] . ⎝ 25 ⎟⎠ The 90% confidence interval for this particular sample runs from 6.4734 to 8.5266. b) Calculate the 99% confidence interval. Why is this interval larger? The 99% confidence interval is given by [y ± 2.797se(y)] = [y ± 2.797(0.6)] = [7.5 ± 1.6782]

This confidence interval runs from 5.8218 to 9.1782. This interval is larger, because if we want only a 1% chance of our confidence interval failing to capture the true mean value in repeated sampling, we need to broaden the interval. With a 10% chance (using the 90% confidence interval) of the true mean falling outside our random interval, we can get away with a smaller confidence interval. The more certain we want to be that we capture the true mean in that interval, the more we need to pad the interval. c) Explain why this confidence interval would shrink if your sample size was 100 (there are two reasons). 1) There will be more degrees of freedom, so our critical values (from Table G.2) will be smaller. 2) The sample standard error of ybar will be smaller, because n will be larger. This also leads to a smaller interval. Hence, with larger samples, our interval estimates will be more precise (narrower), for a given confidence level. 11) Book Problem C.1 From the Wooldridge solutions manual: C.1 (i) This is just a special case of what we covered in the text, with n = 4: E( Y ) = µ and Var( Y ) = σ2/4. (ii) E(W) = E(Y1)/8 + E(Y2)/8 + E(Y3)/4 + E(Y4)/2 = µ[(1/8) + (1/8) + (1/4) + (1/2)] = µ(1 + 1 + 2 + 4)/8 = µ, which shows that W is unbiased. Because the Yi are independent, Var(W) = Var(Y1)/64 + Var(Y2)/64 + Var(Y3)/16 + Var(Y4)/4 = σ2[(1/64) + (1/64) + (4/64) + (16/64)] = σ2(22/64) = σ2(11/32).

(iii) Because 11/32 > 8/32 = 1/4, Var(W) > Var( Y ) for any σ2 > 0, so Y is preferred to W because each is unbiased. 12) Book Problem C.3 From the Wooldridge solutions manual: C.3 (i) E(W1) = [(n – 1)/n]E( Y ) = [(n – 1)/n]µ, and so Bias(W1) = [(n – 1)/n]µ – µ = – µ/n. Similarly, E(W2) = E( Y )/2 = µ/2, and so Bias(W2) = µ/2 – µ = –µ/2. The bias in W1 tends to zero as n → ∞, while the bias in W2 is –µ/2 for all n. This is an important difference. (ii) plim(W1) = plim[(n – 1)/n] ⋅ plim( Y ) = 1 ⋅ µ = µ. plim(W2) = plim( Y )/2 = µ/2. Because plim(W1) = µ and plim(W2) = µ/2, W1 is consistent whereas W2 is inconsistent. (iii) Var(W1) = [(n – 1)/n]2Var( Y ) = [(n – 1)2/n3]σ2 and Var(W2) = Var( Y )/4 = σ2/(4n). (iv) Because Y is unbiased, its mean squared error is simply its variance. On the other hand, MSE(W1) = Var(W1) + [Bias(W1)]2 = [(n – 1)2/n3]σ2 + µ2/n2. When µ = 0, MSE(W1) = Var(W1) = [(n – 1)2/n3]σ2 < σ2/n = Var( Y ) because (n – 1)/n < 1. Therefore, MSE(W1) is smaller than Var( Y ) for µ close to zero. For large n, the difference between the two estimators is trivial.