Question

In: Statistics and Probability

Need use R, and please tell me how to code. Conc,Thick 452,.14 139,.21 166,.23 175,.24 260,.26...

Need use R, and please tell me how to code.

Conc,Thick
452,.14
139,.21
166,.23
175,.24
260,.26
204,.28
138,.29
316,.29
396,.3
46,.31
218,.34
173,.36
220,.37
147,.39
216,.42
216,.46
206,.49
184,.19
177,.22
246,.23
296,.25
188,.26
89,.28
198,.29
122,.3
250,.3
256,.31
261,.34
132,.36
212,.37
171,.4
164,.42
199,.46
115,.2
214,.22
177,.23
205,.25
208,.26
320,.28
191,.29
305,.3
230,.3
204,.32
143,.35
175,.36
119,.39
216,.41
185,.42
236,.47
315,.2
356,.22
289,.23
324,.26
109,.27
265,.29
193,.29
203,.3
214,.3
150,.34
229,.35
236,.37
144,.39
232,.41
87,.44
237,.49

1.Investigate the relationship between the thickness of the shell and the amount of PCB in pelican eggs.

Preliminary data analysis:

Construct a scatterplot of PCB concentration and thickness of the egg shell, and fit the linear regression line. (You have to run the regression model here to be able to drawthe line).

Upload the graph here. Make sure you have put a title to the graph and that the X and Y variables have the correct names.

2.

Run the regression model.

Test whether concentration of PCB (Conc) is an important predictor for thickness of the shell (Thick).

  1. State the hypothesis of the test
  2. State the p-value
  3. State the conclusion

3.

QUESTION 3

  1. Obtain a 99% confidence interval for the slope.
    Lower bound: __, Upper bound: __ (use 6 decimals)

    Obtain the coefficient of determination: __ (use 5 decimals)

    and the estimate for σ : __  (use 5 decimals)

4.Estimate the (mean) egg thickness (millimeters) for a PCB concentration of 400 (parts per million).

5.

Plot the scatter plot with the regression line and the confidence bands for the mean response and for the individual response.

For help, see file "Adding prediction bands to a regression plot", ( and if you do, you may want to modify the newx as follows: newx<-data.frame(Conc=seq(46,451,by=5)); )

Upload the graph here. Make sure the graph has an appropriate title.

6.

Set up the ANOVA table. anova(model)

Source df SS MS F p-value
Regression __ __ __ __ __
Residuals (errors) __ __ __
Total __ __

7.

Conduct an F ratio test for a significant linear relationship.

Use a significance level of α =.01.

  1. State the hypothesis (null and alternative),of the test,
  2. state the decision rule (p-value),
  3. and state the conclusion.

Solutions

Expert Solution

1.

From above we see that PVB concentration and Thickness are negatively correlated but the relationship is not good.

2.

6.

Source df SS MS F p-value
Regression 1 0.02649 0.0264933 4.3015 0.04217
Residuals (errors) 63 0.38802 0.0061591
Total 64 0.02649+0.38802=0.41451

7.

Null hypothesis, H0: Two variables are not linearly related vs. Alternative hypothesis, Ha: H0 is not true.

p-value=0.04217

Since p-value>0.01 hence we fail to reject H0 at 1% level of significance and conclude that two variables are not significantly linearly related.

R code:

Conc=c(452,139,166,175,260,204,138,316,396,46,218,173,220,147,216,216,206,184,
177,246,296,188,89,198,122,250,256,261,132,212,171,164,199,115,214,177,205,
208,320,191,305,230,204,143,175,119,216,185,236,315,356,289,324,109,265,193,
203,214,150,229,236,144,232,87,237)
Thick=c(.14,.21,.23,.24,.26,.28,.29,.29,.3,.31,.34,.36,.37,.39,.42,.46,.49,.19,
.22,.23,.25,.26,.28,.29,.3,.3,.31,.34,.36,.37,.4,.42,.46,.2,.22,.23,.25,.26,
.28,.29,.3,.3,.32,.35,.36,.39,.41,.42,.47,.2,.22,.23,.26,.27,.29,.29,.3,.3,.34,
.35,.37,.39,.41,.44,.49)
plot(Conc,Thick,lwd=2,type="p",xlab="PCB concentration",ylab="Thickness",main="Scatter plot")
summary(lm(Thick~Conc))
lines(Conc,0.3749372-0.0002790*Conc,type="l",col=2,lwd=2)
anova(lm(Thick~Conc))

Output:

Call:
lm(formula = Thick ~ Conc)

Residuals:
      Min        1Q    Median        3Q       Max
-0.142852 -0.056904 -0.005656 0.054212 0.181187

Coefficients:
              Estimate Std. Error t value Pr(>|t|)  
(Intercept) 0.3749372 0.0298977 12.541   <2e-16 ***
Conc        -0.0002790 0.0001345 -2.074   0.0422 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.07848 on 63 degrees of freedom
Multiple R-squared: 0.06391,   Adjusted R-squared: 0.04906
F-statistic: 4.302 on 1 and 63 DF, p-value: 0.04217

Analysis of Variance Table

Response: Thick
          Df Sum Sq   Mean Sq F value Pr(>F)
Conc       1 0.02649 0.0264933 4.3015 0.04217 *
Residuals 63 0.38802 0.0061591                
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1


Related Solutions

I need to fix this code, and could you please tell me what was the problem...
I need to fix this code, and could you please tell me what was the problem options 1 and 9 don't work #include <stdio.h> #include <time.h> #include <stdlib.h> // generate a random integer between lower and upper values int GenerateRandomInt(int lower, int upper){     int num =(rand()% (upper - lower+1))+lower;     return num; } // use random numbers to set the values of the matrix void InitializeMatrix(int row, int column, int dimension, int mat[][dimension]){     for(int i =0; i<row; i++){...
I need this in R code please: Use the dataset ’juul’ in package ’ISwR’ to answer...
I need this in R code please: Use the dataset ’juul’ in package ’ISwR’ to answer the question. (1) Conduct one-way ANOVA test to test if the mean of igf1 of each level of tanner are the same? (2) What is the mean of igf1 in each level of tanner? (3) If there is any difference, which ones appear to be different? (Use pairwise t test for each pair of level with bonferroni method)
Hello, for c++, please expert tell me how to use unordered set to do the rest...
Hello, for c++, please expert tell me how to use unordered set to do the rest method:insert, remove, find in container, declaration, visiting all elements.
Please use R GPA ACT ITS RP    3.897 21 122 99 3.885 14 132 71...
Please use R GPA ACT ITS RP    3.897 21 122 99 3.885 14 132 71 3.778 28 119 95 2.540 22 99 75 3.028 21 131 46 3.865 31 139 77 2.962 32 113 85 3.961 27 136 99 0.500 29 75 13 3.178 26 106 97 3.310 24 125 69 3.538 30 142 99 3.083 24 120 97 3.013 24 107 55 3.245 33 125 93 2.963 27 121 80 3.522 25 119 63 3.013 31 128 78...
Please, explain to me how can I know when I need to use z- table and...
Please, explain to me how can I know when I need to use z- table and when to use t-table distribution. Please, be as detailed as you can. I want to look a problems and know which one I need.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT