Instructions:

This is an individual assessment task. Your results and writing up must be your own work.

Your assignment must be word processed and converted to a single pdf file for online submission in iLearn using Assignment 1 Submission in the Assessments section.

The following file is available from the Assignment 1 folder in the Assessments section on the iLearn site:

SecondHandCars.csv

This assignment has 7 questions to answer. The end of your solutions should include the requested appen dices. These will be marked.

This assignment is worth 15%.

1Second Hand Cars

The file SecondHandCars.csv contains data collected for estimating the price of second hand cars. The following table contains a list of all variables in this file.

Variable Description

brand Manufacturer.

model Model of car.

year Year of first registration of car.

price Price in Pounds Sterling.

mileage Total distance (in miles) covered by the car.

tax Annual cost of vehicle tax.

mpg Miles per gallon, a measure of fuel efficiency.

engineSize Size of engine in litres.

1. Read the data file SecondHandCars.csv into R calling it cars. Use a scatterplot matrix to have a look at the data on all numerical variables. Add a loess curve to each sub-plot to help to see possible relationships. On the basis of the scatterplots, which variables do you think will best predict the price of used cars?

Any R output produced to answer this question along with the R commands should be placed in

Appendix 1 which should be the first appendix at the end of all of your solutions.

1. Obtain the regression of price on all the numerical predictor variables, including confidence intervals for the parameters. Is the overall regression significant, and what does this say about the situation?

Are predictors significant in the model? (Please save the model you fit in R as m1.)

Any R output produced to answer this question along with the R commands should be placed in

Appendix 2 which should be the second appendix at the end of all of your solutions.

1. Is the variable mileage significant? What hypotheses are implied by this question, and what is the result of the analysis? Give a 95% confidence interval for the associated parameter and an interpretation of what it means. What about the variable mpg?
1. We would like to investigate whether the regression on the two variables mpg and mileage is adequate,or whether the full set of variables is needed. What null and alternative hypotheses are we considering?

Using an F-test, set up an anova table to carry out the test. Report the p-value and your conclusion in statistical terms and in plain English. (Please save the reduced model you fit in R as mred and the full model you fit in R as mfull.)

Any R output produced to answer this question along with the R commands should be placed in

Appendix 4 which should be the third appendix at the end of all of your solutions. There is no

Appendix 3.

5.Compute two regressions:

a.price vs mpg

b.price vs mileage

What are your conclusions for models a and b regarding the significance of mpg and mileage and their

R2 ? (Please save the model fitted in R for part a. as ma and the model you fitted for part b. as mb.)

Any R output produced to answer this question along with the R commands should be placed in

Appendix 5 which should be the fourth appendix at the end of all of your solutions.

1. Now compute a regression with mpg and mileage as predictors. What is your conclusion? Explain

what has happened. (Please save the model fitted in R as m2.)

Any R output produced to answer this question along with the R commands should be placed in

Appendix 6 which should be the fifth appendix at the end of all of your solutions.

What do the normal probability plot and the residual plot in first model, m2, say about the success of the regression?

Any R output produced to answer this question along with the R commands should be placed in Appendix 7 which should be the sixth appendix at the end of all of your solutions. EasyDue™ 支持PayPal, AliPay, WechatPay, Taobao等各种付款方式!

E-mail: easydue@outlook.com  微信:easydue

EasyDue™是一个服务全球中国留学生的专业代写公司