代做Econ 312: Homework Assignment # 2代做留学生SQL 程序
- 首页 >> CSEcon 312: Homework Assignment # 2
Questions 1 and 2 must be answered in clean answer sheets. Question 3 must be carried out in EXCEL
and the EXCEL sheet must be attached to your answer sheets. Question 4 must be the STATA printout.
1. Prove that in a simple classical linear regression the following are true:
(i) ei = 0 , note that this result comes from the first normal equation when you minimize the sum of squares of the residuals
(ii) ; note that both formulas represent the formula for R2.
b2 = r , where b2 is the slope estimator, r is the sample correlation between the
dependent variable ( y ) and the explanatory variable ( x ); and sx and sx are the standard deviation of x and standard deviation of y , respectively.
2. A sample of 12 homes sold last week in St. Paul, Minnesota was selected. Data on home size ( x , in hundreds of squared feet) and selling price ( y , in thousands of dollars) are collected to investigate if home size has any influence on the selling price. Following intermediate results are obtained:
Σx = 138, Σy = 1155, Σx2 = 1626, Σy2 = 111493, Σxy = 13394, x = 11.5, y = 96.25
a. (5-Points) Estimate a linear regression equation (selling price as a function of home size). Write down the estimated OLS regression model in your answer sheet.
b. (5-Points) Interpret the estimated slope coefficient in the context of the problem.
c. (5-Points) Compute and interpret the coefficient of determination (R2).
d. (5-Points) Compute the sample correlation between square footage and selling price and check to see if the relationship r 2 = R 2 holds. You must calculate r2 using the formula for r2, not excel features.
e. (5-Points) Compute the unbiased estimate the variance of the error term, that is, se(2) . Using this,
compute the unbiased estimate of the variance of the slope coefficient, that is var(b2 ) . Compute the standard error of the slope coefficient, that is, sb2 .
f. (5-Points) Test the significance of the home size variable (i.e., significance of the slope coefficient) at 5% level. State the hypotheses, the decision rule, test the hypothesis against a two-sided alternative, and interpret the result. Also, find the p-value for the test.
g. (5-Points) Find a 95 percent confidence interval for the unknown slope parameterβ2 .
3. The following observations pertain to home size ( x , in hundreds of squared feet) and selling price ( y , in thousands of dollars). Use EXCEL spreadsheet and use the following data to do problems (i) through (v).
x: 14 13 12 11 14 10 13 8 12 9 11 11
y: 105 100 98 95 103 92 100 86 97 90 94 95
(i) (5-Points) Estimate the slope and intercept coefficients. Write down the estimated OLS
regression model in your answer sheet.
(ii) (5-Points) Find TSS, ESS, and RSS for this regression.
(iii) (5-Points) Find R-squared for this regression.
(iv) (5-Points) Carry out the test of significance of the slope coefficient at 5 percent level using the p-value approach.
(v) (5-Points) Find a 95 percent confidence interval for the population slope coefficient.
4. Copy the EXCEL data in problem 3 above into a STATA data file with the variable x labeled as homesize and the variable y labeled as sellprice. Now use the STATA features to perform the following:
(i) (5-Points) Use “summarize” or “sum” command to produce summary statistics of the variables homesize and sellprice.
(ii) (5-Points) Use correlate command to produce the correlation matrix of the two variables homesize and sellprice.
(iii) (5-Points) Use the “regress” or “reg” command to generate the STATA output to estimate the OLS regression parameters and other necessary results for this problem. Compare the results obtained in problem 3 (i) through
(v). They should match exactly.
(iv) (5-Points) Print the STATA output from question (iii) and attach it with your assignment.