联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp

您当前位置:首页 >> Algorithm 算法作业Algorithm 算法作业

日期:2019-04-17 10:29

1. Suppose X1, X2, . . . , X9 are iid N(μ, 4) variables. We wish to test H0 :

μ = 1 against H1 : μ = 3

(a) Calculate the size and power of the test with rejection region X >ˉ

2.

(b) Find k so that the test with rejection region X > k ˉ has size 0.05.

Calculate the power of this test.

2. The data set big.mac is part of a larger data set described in Cook and

Weisberg, “Applied Regression Including Computing and Graphics,”

Wiley, 1999.

Download the data file, the data is available on moodle. Read the data

into R.

The Big Mac hamburger is a simple commodity that is virtually identical

throughout the world. One might expect that the price of a Big

Mac should be the same everywhere, but of course it is not the same.

The Economist magazine has published a Big Mac parity index, which

compares the costs of a Big Mac in various places, as a measure of

inefficiency in currency exchange. We will use these data to study how

the cost of a Big Mac varies with economic indicators that describe

each city. The variables in the data are logBigMac (log of minutes of

labour required by an average worker to buy a Big Mac and french fries)

logBusFare (log of lowest cost of 10km public transit in US dollars)

logTeachSal (log of annual salary of a primary teacher in US dollars)

and logTeachTax (log of tax rate paid by a primary teacher).

For the following, please provide R scripts that you use and the corresponding

output, including any relevant graphs to support your answers.

(a) Fit a linear model with logBigMac as the response and the remaining

variables as predictors.

(b) Is there any evidence that any of the assumptions of the linear

regression model is not satisfied?

(c) Examine residuals and other diagnostics for the fitted model. Are

there any unusual or influential points?

2

(d) Examine the summary output: based on the summary output, do

you think that any of the predictors could be deleted from the

model? Please state any relevant statistical tests you used to base

your conclusion on.

(e) Consider two alternative models: the model including all predictors,

and the model where the predictor logBusFare and logTeachTax

are deleted. Use the F statistic, stating clearly any hypothesis

being tested, and the conclusions reached regarding the two predictors.

3


版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp