In: Statistics and Probability
Cadmium | Nickel | Distance | Angle |
105 | 85 | 1 | 320 |
48 | 72 | 2 | 189 |
39 | 60 | 3 | 175 |
28 | 49 | 5 | 348 |
18 | 31 | 7 | 63 |
9 | 20 | 9 | 182 |
8 | 16 | 13 | 240 |
6 | 11 | 18 | 318 |
2 | 4 | 20 | 280 |
this is the data for these set of questions . thank you very much
1.)A plant species is being studied for the presence of cadmium and nickel levels near a former industrial waste site. Specifically, a researcher would like to know if distance to the industrial waste site is a predictor of Cadmium levels in the plant species. Perform the appropriate analysis using the Question 14 dataset in the Excel file. We can assume assumptions of test have been met. What is the slope of the equation from your analysis of the data? Use one of the following formats -9.999 or 9.999 depending on which is appropriate.
2.)You decide see how the addition of a second independent variable influences the results of the analysis from Question 14 (Cadmium vs. Distance and Angle). You add to the analysis the direction the plants were located in reference to the industrial waste site. The data is in the Angle column and represents the degrees off of magnetic north to where the plants were located. What is the p value from the analysis for Angle? Use the 0.999 format.
3.)For Question 14, the researcher would now like to know if there is a difference in mean Cadmium and Nickel concentrations in the plant species under investigation with both distance and angle from the industrial waste site. What kind of analysis should the research run?
4.)The researcher believes that there is a relationship between concentrations of Cadmium and Nickel. Run the appropriate analysis using the dataset for Question 14 in the Excel file and report on the r value.
Please find below R code :
> d = data.frame(sep)
> head(d)
Cadmium Nickel Distance Angle
1 105 85 1 320
2 48 72 2 189
3 39 60 3 175
4 28 49 5 348
5 18 31 7 63
6 9 20 9 182
> summary(lm(d$Cadmium~d$Distance))
Call:
lm(formula = d$Cadmium ~ d$Distance)
Residuals:
Min 1Q Median 3Q Max
-19.046 -14.163 -5.928 9.718 48.719
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 59.810 12.624 4.738 0.00211 **
d$Distance -3.529 1.162 -3.037 0.01893 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 22.83 on 7 degrees of freedom
Multiple R-squared: 0.5685, Adjusted R-squared:
0.5069
F-statistic: 9.223 on 1 and 7 DF, p-value: 0.01893
> summary(lm(d$Cadmium~d$Distance+d$Angle))
Call:
lm(formula = d$Cadmium ~ d$Distance + d$Angle)
Residuals:
Min 1Q Median 3Q Max
-31.081 -4.840 -1.199 5.685 33.987
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 31.28435 20.20018 1.549 0.17242
d$Distance -3.93803 1.05949 -3.717 0.00989 **
d$Angle 0.13646 0.08039 1.697 0.14055
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 20.27 on 6 degrees of freedom
Multiple R-squared: 0.7085, Adjusted R-squared:
0.6113
F-statistic: 7.291 on 2 and 6 DF, p-value: 0.02477
> z = d$Cadmium-d$Nickel
> summary(lm(z~d$Distance+d$Angle))
Call:
lm(formula = z ~ d$Distance + d$Angle)
Residuals:
Min 1Q Median 3Q Max
-17.4978 -7.3959 0.5884 3.3901 25.6223
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -23.95166 14.07713 -1.701 0.140
d$Distance 0.13194 0.73834 0.179 0.864
d$Angle 0.05687 0.05602 1.015 0.349
Residual standard error: 14.13 on 6 degrees of freedom
Multiple R-squared: 0.1675, Adjusted R-squared:
-0.11
F-statistic: 0.6035 on 2 and 6 DF, p-value: 0.577
> t.test(d$Cadmium,d$Nickel,paired = TRUE)
Paired t-test
data: d$Cadmium and d$Nickel
t = -2.1131, df = 8, p-value = 0.06754
alternative hypothesis: true difference in means is not equal to
0
95 percent confidence interval:
-19.7508406 0.8619517
sample estimates:
mean of the differences
-9.444444
> t.test(d$Cadmium,d$Nickel,alternative="two.sided")
Welch Two Sample t-test
data: d$Cadmium and d$Nickel
t = -0.65075, df = 15.79, p-value = 0.5246
alternative hypothesis: true difference in means is not equal to
0
95 percent confidence interval:
-40.24435 21.35546
sample estimates:
mean of x mean of y
29.22222 38.66667