Question

In: Statistics and Probability

Answer IN R CODE to get the following. Using the data below, Create a scatterplot of...

Answer IN R CODE to get the following. Using the data below,

  1. Create a scatterplot of y vs x
  2. Fit a simple linear regression model using y as the response and plot the regression line (with the data)
  3. Test whether x is a significant predictor and create a 95% CI around the slope coefficient.
  4. Report and interpret the coefficient of determination.
  5. For x=20, create a CI for E(Y|X=20).
  6. For x=150, can you use the model to estimate E(Y|X=150)? Discuss.
  7. Does the model appear to be linear with respect to x? Discuss, and if not, provide alternative model and repeat steps 1-6.

y

x

1

311.8481

30.77326

2

440.9428

32.40036

3

41.6744

13.89724

4

417.7435

30.82836

5

177.3642

21.17247

6

639.0727

41.70052

7

179.9235

20.52949

8

19.64963

16.78782

9

1030.218

47.05621

10

211.6078

24.73312

11

468.797

33.30568

12

281.9641

27.20706

13

360.4149

28.98507

14

626.3254

33.98696

15

692.872

40.61913

16

840.8116

44.14024

17

71.51774

14.71966

18

97.75643

18.69047

19

251.0697

26.53534

20

81.51288

19.51529

21

270.3445

28.00065

22

1221.873

49.81578

23

110.3152

20.3347

24

595.4412

38.29436

25

126.2188

13.26268

26

11.15999

16.73084

27

230.5542

24.64804

28

77.3025

15.99319

29

1117.463

48.8532

30

122.5684

18.10108

31

932.665

44.75007

32

911.0599

44.23208

33

255.6625

24.33537

34

810.0097

41.18667

35

210.4745

20.06741

36

9.884425

11.10681

37

75.98362

11.67823

38

153.6595

20.20392

39

578.7254

38.05732

40

93.28379

12.89079

41

378.1102

27.82776

42

203.9408

25.8318

43

837.9018

43.87759

44

44.45671

11.49288

45

1145.79

48.94833

46

1073.485

47.3091

47

431.1394

30.53461

48

343.5504

28.65658

49

810.0665

41.25828

Please provide all relevant work in R code. The commands, the output and any interpretations/conclusions that are necessary.

Solutions

Expert Solution

R code along with output and explaination is attached herewith.


Related Solutions

Answer IN R CODE please. Using the data below, Create a scatterplot of y vs x...
Answer IN R CODE please. Using the data below, Create a scatterplot of y vs x (show this) and fit it a simple linear regression model using y as the response and plot the regression line (with the data). Show this as well. Test whether x is a significant predictor and create a 95% CI around the slope coefficient. What does the coefficient of determinations represent? For x=20, create a CI for E(Y|X=20). Show this. For x=150, can you use...
*Please answer the following question using R code* 3. A bank wants to get new customers...
*Please answer the following question using R code* 3. A bank wants to get new customers for their credit card. They try two different approaches in their marketing campaign. The first promises a "cash back" reward, and the second promises low interest rates. A sample of 500 people is mailed the first brochure; of these, 125 get the credit card. A separate sample of 500 people is mailed the second brochure; 150 get the credit card. Are the two campaigns...
Data from 5.7: Problem Set 5.7: Scatterplot in SPSS Criterion: Create a scatterplot using SPSS. Data:...
Data from 5.7: Problem Set 5.7: Scatterplot in SPSS Criterion: Create a scatterplot using SPSS. Data: Dr T wanted to see if mindfulness training is related to stress levels. He recruited 10 participants to undergo mindfulness training and examined their reported stress levels on the DRT Stress Inventory. These were his results: Minutes of Mindfulness Training DRT Stress Inventory Score 61 8 122 6 201 3 133 9 55 7 329 1 10 9 1 10 93 7 144 5...
The Book of R (Question 20.2) Please answer using R code. Continue using the survey data...
The Book of R (Question 20.2) Please answer using R code. Continue using the survey data frame from the package MASS for the next few exercises. The survey data set has a variable named Exer , a factor with k = 3 levels describing the amount of physical exercise time each student gets: none, some, or frequent. Obtain a count of the number of students in each category and produce side-by-side boxplots of student height split by exercise. Assuming independence...
Use the following scatterplot to answer the question below. A scatterplot has a horizontal axis labeled...
Use the following scatterplot to answer the question below. A scatterplot has a horizontal axis labeled "x" with values from 30 to 110 and a vertical axis labeled "y" with values from 30 to 110. The scatterplot has 15 points. A pattern goes up and right from (49, 43) to (94, 76). The points are as follows. (49, 50) (59, 60) (65, 43) (65, 71) (66, 51) (66, 76) (67, 69) (70, 65) (71, 75) (75, 59) (75, 65) (75,...
Using the following data, X- 3,6,9,12, 15, 18 Y - 6,10,15,24,21,20 a Create a scatterplot. b...
Using the following data, X- 3,6,9,12, 15, 18 Y - 6,10,15,24,21,20 a Create a scatterplot. b Find the least-squares line. c Plot the line on the diagram. d Predict: Y if X is 10. Y if X is 17
(Be sure to paste the R Console Output and code!!!) Using the following data and R,...
(Be sure to paste the R Console Output and code!!!) Using the following data and R, write a brief paragraph about whether the in-home treatment is equally effective as the out-of-home treatment for two separate groups. Here are the data. The outcome variable is level of anxiety after treatment on a scale from 1 to 10. In-Home Treatment Out-of-Home Treatment 3 7 4 6 1 7 1 8 1 7 3 6 3 5 6 6 5 4 1 2...
Answer the following bootstrap question by showing the R code : A set of data X...
Answer the following bootstrap question by showing the R code : A set of data X contains the following numbers: 119.7 104.1 92.8 85.4 108.6 93.4 67.1 88.4 101.0 97.2 95.4 77.2 100.0 114.2 150.3 102.3 105.8 107.5 0.9 94.1 We generated n = 20 observations Xi = 10 Wi+100, where Wi has a contaminated normal distribution with proportion of contamination 20% and σc = 4. Suppose we are interested in testing: H0 : μ = 90 versus H1 :...
Using the R package to answer the following two questions. You MUST submit your R code...
Using the R package to answer the following two questions. You MUST submit your R code for analysis. 2. Below are heights for a simple random sample of n = 15 young trees (in cm). (50 pts) 27, 33, 33, 34, 36, 37, 39, 40, 40, 41, 41, 42, 44, 46, 47. (a) Test the hypothesis that the mean tree height is equal to 38 cm. (b) Calculate the 95% confidence interval for the population mean of young trees. (c)...
ANSWER USING R CODE Using the dataset 'LakeHuron' which is a built in R dataset describing...
ANSWER USING R CODE Using the dataset 'LakeHuron' which is a built in R dataset describing the level in feet of Lake Huron from 1872- 1972. To assign the values into an ordinary vector,x, we can do the following 'x <- as.vector(LakeHuron)'. From there, we can access the data easily. Assume the values in X are a random sample from a normal population with distribution X. Also assume the X has an unknown mean and unknown standard deviation. With this...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT