Thank you so much in advance. Please use the R program and you can also attach t
ID: 3290396 • Letter: T
Question
Thank you so much in advance. Please use the R program and you can also attach the R workspace photos.
Part (II) (20 marks) Use R to solve the following problems 1. A plI level of the soil between 5.3 and 6.5 is optimal for strawberries. To measure the plI level, 1. A p level of the soil a field is divided into two lots. In each lot, we randomly select 20 samples of soil. (Consider the data from the tab delimited text file DatapH.txt). lot 5.66 5.73 5.68 5.77 5.73 5.71 5.68 5.58 6.11 5.375.67 5.53 5.59 5.94 5.84 5.53 5.645.73 5.30 5.65 lot 2 5.25 6.73 6.25 5.21 5.63 6.41 5.89 6.76 5.13 5.64 5.94 6.16 5.64 6.54 5.79 5.91 6.17 6.90 5.76 6.07 (a) Using a statistical software, verify the assumption that the two populations are normally (b) Using a statistical software, asses the assumption that the two populations have equal (c) Test the hypothesis Ho : -2 against Ho : 12, where 1 is the mean pH level of distributed variaices. the soil in lot 1, and 2 is the mean pH level of the soil in lol 2. State your conclusion. Use level 0.10. (d) Give a 90% confidence interval for the difference 1-12, where is the mean pH level of the soil in lot l, and 2 is the mean p11 level of the soil in lot 2. Using this interval, is dfferent in two lots?Explanation / Answer
> x1 <- c (5.66 ,5.73,5.68,5.77,5.73,5.71,5.68,5.58,6.11,5.37,5.67,5.53,5.59,5.94,5.84,5.53,5.64,5.73,5.3,5.65)
> x2 <- c(5.25,6.73,6.25,5.21,5.63,6.41,5.89,6.76,5.13,5.64,5.94,6.16,5.64,6.54,5.79,5.91,6.17,6.9,5.76,6.07)
> shapiro.test (x1)
Shapiro-Wilk normality test
data: x1
W = 0.94882, p-value = 0.3495
> shapiro.test (x2)
Shapiro-Wilk normality test
data: x2
W = 0.96766, p-value = 0.705
> var.test(x1,c2)
Error in var.test.default(x1, c2) : object 'c2' not found
> var.test(x1,x2)
F test to compare two variances
data: x1 and x2
F = 0.12084, num df = 19, denom df = 19, p-value = 2.566e-05
alternative hypothesis: true ratio of variances is not equal to 1
95 percent confidence interval:
0.04782803 0.30528411
sample estimates:
ratio of variances
0.1208352
> t.test(x1,x2,conf.level = 0.9)
Welch Two Sample t-test
data: x1 and x2
t = -2.6196, df = 23.526, p-value = 0.01516
alternative hypothesis: true difference in means is not equal to 0
90 percent confidence interval:
-0.5242052 -0.1097948
sample estimates:
mean of x mean of y
5.672 5.989
a) both population are normally distributed as p-value > 0.05
b) variance are not equal as p-value < < 0.05
c) p-value of t-test is 0.01516 < 0.10
hence we can reject the null and conclude that there is significant evidence that there is differencein mean
d) 90 percent confidence interval:
( -0.5242052 -0.1097948)
since 0 is not present in confidence interval ,we can say that there is enough evidence that the mean is different
Please rate my solution
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.