DOC PREVIEW
UCSD ECON 120B - Problem Set #2

This preview shows page 1-2 out of 5 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 5 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 5 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 5 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Page 1Page 2Page 3Page 4Page 51Department of Economics Economics 120BWinter 2008 Prof. BermanProblem Set #2Due Tuesday, February 5Please hand in answers on this sheet and staple the output (.log) file to it.1. Hypothesis Testing: The file cps06.dta contains information about wages and education for 82,228 observations fromy the Current Population Survey of 2006. It is available on the course website. In those data : = E(Y) = 2.786 . Linearregression describes the relationship between log wages (y) and years of education (x) where the intercept of the0 1 y regression line is $ , the slope is $ and : = E(Y) = 2.786 .01y = $ + $ x + ,,01with $ =1.376 , $ = 0.1030 , Cov(x,,)=0.Treat these data as a population.a) Use Stata to reproduce these three population “parameters.” (Attach the output.)b) Generate a sample of 40 observations from the population as in the Stata log file attached below. We are interested01in the sampling variance of the least squares estimates of $ and $ .(In Stata, generating a random sample using the "bsample" command requires setting a "seed" value. Choose the seedto be some arbitrary large positive, odd number. Don* t use the same number as any of your classmates. Identical seedvalues will be interpreted in the worst possible way and marks will be deducted.) y 0 1Calculate OLS estimates of : $ and $ using your 40 observation sample. Report your sample estimates here.c) Now pretend that you don't know anything about the population except for the information in the sample. Test the1 null hypothesis that $ = 0.1030 using the data you have in your 40 observation sample, using a two-tailed test and " = 0.05.Did you reject the null hypothesis? Yes / NoWhat was the probability of that happening? d) Assuming that 100 of your classmates draw their own independent random samples and answer question (b)correctly. What’s the probability that all 100 of them reject/accept as you did?e) Did you use a normal distribution in your test in (c). Explain. How can you justify using a normal distribution when the distributions of y and x are not normal?e) Are these data experimental? Yes / NoWhy (not)?22. Least Squares. 12 NYou have a sample of N observations Y , Y , ... YYou are interested in finding a number A which has the smallest average distance from the observations, where theiimeasure of distance is the “error” term e = (Y - A) . iWhat’s the formula for the (minimand )A which minimizes the average of (Y - A) over N observations? 2Prove your claim.3Example Program in Stata 120B. log using cps_example-------------------------------------------------------------------------------- log: C:\work\120B\cps_example.smcl log type: smcl opened on: 22 Jan 2007, 20:25:11. * Example progam which treats the CPS from 2006 as a population. use cps06. descContains data from cps06.dta obs: 82,228 vars: 7 22 Jan 2007 19:51 size: 1,151,192 (94.5% of memory free)------------------------------------------------------------------------------- storage display valuevariable name type format label variable label-------------------------------------------------------------------------------age byte %19.0g agelbl Ageeduc byte %38.0g educ99lbl Educational attainment, 1990fullpart byte %9.0g fullpartlbl Worked full or part time last yearblack byte %9.0g asian byte %9.0g hwage1 float %9.0g annual earnings/annual hoursgender byte %9.0g female==1-------------------------------------------------------------------------------Sorted by: . summ Variable | Obs Mean Std. Dev. Min Max-------------+-------------------------------------------------------- age | 82228 43.38813 11.19701 25 85 educ | 82228 13.68711 2.818516 0 21 fullpart | 82228 1.130381 .3367246 1 2 black | 82228 .1036995 .3048721 0 1 asian | 82228 .0469426 .2115173 0 1-------------+-------------------------------------------------------- hwage1 | 82228 21.51597 28.03584 .0003698 2777.778 gender | 82228 .477684 .4995048 0 14. * create a new variable - the logarithm of hourly wages: . generate lhwage=log(hwage1). summ lhwage Variable | Obs Mean Std. Dev. Min Max-------------+-------------------------------------------------------- lhwage | 82228 2.786399 .7449476 -7.902487 7.929407. * Calculate a simple linear regression of log hourly wage on education. regress lhwage educ, robustRegression with robust standard errors Number of obs = 82228 F( 1, 82226) =12512.02 Prob > F = 0.0000 R-squared = 0.1520 Root MSE = .686------------------------------------------------------------------------------ | Robust lhwage | Coef. Std. Err. t P>|t| [95% Conf. Interval]-------------+---------------------------------------------------------------- educ | .103048 .0009212 111.86 0.000 .1012423 .1048536 _cons | 1.37597 .0126578 108.71 0.000 1.351161 1.400779------------------------------------------------------------------------------. * So each year of education predicts an hourly wage increase of about 10.3% in> 2006. . . * Now treat the full CPS as a population and draw a sample from it. . * i.e., y = beta_0 + beta_1 x + epsilon. * we will sample from that population and estimate the population parameters b> eta_0=1.376 and beta_1=0.103. set seed 098709870198768761. bsample 50. summ Variable | Obs Mean Std. Dev. Min Max-------------+-------------------------------------------------------- age | 50 42.06 10.66447 25


View Full Document

UCSD ECON 120B - Problem Set #2

Download Problem Set #2
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Problem Set #2 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Problem Set #2 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?