Economics 320: Homework 6
Please submit your homework to Eco320Fall2018@gmail.com
Due Wednesday, November 14th by 11:59 PM
Remember that homework assignments are to be done independently. Copying another student’s answers is
plagiarism, an academic fraud that implicates both students.
You will examine per-capita income data for U.S. counties in 2006–10, from a data.frame stored in
Counties.RData. This is the plain data.frame version, not the “spatialized” version we use for mapping.
The level of per capita income by county in the year 2000 was about $30,000. Take $30,000 as the
historical benchmark for Questions 1 and 2. NOTE: You can assume that per-capita income is a normally
distributed random variable.
Please provide your commented R script for Questions 1 and 2.
Question 1 (50 points) Is the expected level μ of per-capita income in 2006–10 different from the historical
benchmark level of the year 2000, when per-capita income was $30,000? The null hypothesis is that
H0 : μ = 30000 in 2006–10, and the alternative hypothesis is HA : μ 6= 30000. Choose the probability
of Type I Error to be 0.04, that is, 4 percent. Because we are assuming that the per-capita income
variable is normally distributed, the test statistic is distributed according to the t distribution with
N 1 “degrees of freedom” when the null hypothesis is true.
(a) Use R to calculate the rejection region. Explain your approach by including comments in your
R code.
(b) Calculate the test statistic T, print the rejection region, and print the value of the test statistic.
In your R program, please include the code you use to calculate T.
(c) Do you reject the null hypothesis? Why? Explain by including comments in your R code.
Question 2 (50 points) Is the expected level of per-capita income in 2006–10 higher than the historical
benchmark level of the year 2000, when per-capita income was $30,000? The null hypothesis is that
H0 : μ ≤ 30000 in 2006–10, and the alternative hypothesis is HA : μ > 30000. You are to choose the
probability of Type I Error to be 0.03, that is, 3 percent.
(a) Calculate the rejection region. Explain your approach by including comments in your R code.
(b) Calculate the test statistic T. Please include your code.
(c) Do you reject the null hypothesis? Why? Explain the result by including comments in your R
code.
版权所有:留学生编程辅导网 2020 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。