首页 >
> 详细

MA308: Statistical Calculation and Software

Assignment 2 (Oct 9– Nov 11, 2020)

2.1 For the “PlantGrowth” dataset from R ,

(a) First draw three boxplots for the weights of three groups of plants, i.e. control

(ctrl) group, treatment1 (trt1) and treatment2 (trt2) group, put three boxplots

side by side in one figure. What will be the conclusion for testing the weight

of the control group at α = 0.05 level of significance,

H0 : µ = 5, v.s. H1 : µ 6= 5, (2.1)

with unknown variance? What if the variance is known to be the current

sample variance?

(b) Carry out the likelihood-ratio test in (2.1) for treatment1 group with unknown

variance and draw the conclusion at α = 0.05 level of significance. Compare

the result with that of using t-test.

(c) Test whether the weight of the control group and treatment1 group have the

same mean value at α = 0.05 level of significance. What if there is a “pairing”

between the control and treatment1 group?

(d) Test whether the spread of weight for the treatment1 group and the treatment2

group are the same or not.

2.2 This question should be answered using the Carseats.csv data set.

(a) Test whether Sales follow normal distribution.

(b) Fit a multiple regression model to predict Sales using Price, Urban, and US.

(c) Provide an interpretation of each coefficient in the model. Be careful some of

the variables in the model are qualitative!

2

(d) Write out the model in equation form, being careful to handle the qualitative

variables properly.

(e) For which of the predictors can you reject the null hypothesis H0 : βj = 0?

(f) On the basis of your response to the previous question, fit a smaller model that

only uses the predictors for which there is evidence of association with the

outcome.

(g) How well do the models in (b) and (f) fit the data?

(h) Using the model from (f), obtain 95% confidence intervals for the coefficient(s).

(i) Is there evidence of outliers or high leverage observations in the model from (f)?

(j) There is an indicator “US” in the “Carseat” data set, compare the mean Sales

of the “US” area with that of the “Non-US” area, show the results of the

likelihood ratio test and the Mann-Whitney test for testing the equality of

these two mean values. Can we use the Wilcoxon’s Signed-Rank test? Why?

(k) Fit a multiple regression model to predict Sales using all the other variables,

implement variable selection by stepwise methods and all-subsets regression.

(l) Consider using all the other variables to predict Sales, find out the most important

variable in predicting Sales via the concept of Relative Importance,

compare with the results in (k).

2.3 This question should be answered using the weekly.csv data set.

(a) Produce some numerical and graphical summaries of the Weekly data. Do there

appear to be any patterns?

(b) Use the full data set to perform a logistic regression with Direction as the

response and the five lag variables plus Volume as predictors. Use the summary

function to print the results. Do any of the predictors appear to be statistically

significant? If so, which ones?

(c) Compute the confusion matrix and overall fraction of correct predictions. Explain

what the confusion matrix is telling you about the types of mistakes made

by logistic regression.

3

(d) Now fit the logistic regression model using a training data period from 1990 to

2008, with Lag2 as the only predictor. Compute the confusion matrix and the

overall fraction of correct predictions for the held out data (that is, the data

from 2009 and 2010).

联系我们

- QQ：99515681
- 邮箱：99515681@qq.com
- 工作时间：8:00-23:00
- 微信：codinghelp2

- Cpslp程序语言代写、代做python编程设计、Program程序实验代写 2020-11-25
- Csci 1110作业代做、Data留学生编程代写、Java程序语言调试代做 2020-11-25
- 代写program程序、代做r课程编程、R程序实验代做代做留学生prolog 2020-11-25
- Be491留学生编程代做、代写java，Python/C++程序设计调试ma 2020-11-25
- 代写cmpt 214编程、代做programming语言、代写c/C++程序 2020-11-08
- 代写csci 2122课程、代做program编程实验、C++程序语言代写代 2020-11-08
- Fit5032语言编程代做、代写web程序实验、Web、Html程序语言代做 2020-11-08
- Com3503程序编程代做、Java，C++，Python留学生编程代写代写 2020-11-08
- 代写program程序课程、代写c++编程实验、C/C++编程语言代做 代做 2020-11-08
- Data留学生编程代做、代写python程序、Java，C++程序语言代写 2020-11-08
- 代写secj 1023实验编程、Programming程序代做、代写c++语 2020-11-08
- 代写cmpsc 465编程、代做java程序语言、Python，C++编程设 2020-11-07
- 代做mf 703语言编程、代写programming程序、Sql编程语言调试 2020-11-07
- 954246编程设计调试、代做programming程序、C++编程语言代写 2020-11-07
- Pstat 115程序实验代写、R编程语言调试、Data留学生程序代做 代写 2020-11-07
- Com1005课程编程代做、代写python程序、Java，C++程序语言调 2020-11-07
- Tcp留学生程序代写、Java程序设计调试、Java编程语言代写 帮做r语言 2020-11-07
- 代写program语言编程、代做data留学生程序、Python，Java编 2020-11-07
- 代做cosc2666编程、代写programming程序、C/C++程序语言 2020-11-07
- Digital编程设计代写、代做r程序实验、代写r留学生程序 调试matla 2020-11-07