Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please, show all work using R-software--t hank you in advance. A pH level of the

ID: 3290010 • Letter: P

Question

Please, show all work using R-software--thank you in advance.

A pH level of the soil between 5.3 and 6.5 is optimal for strawberries. To measure the pH level, 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). (a) Using a statistical software, verify the assumption that the two populations are normally distributed. (b) Using a statistical software, asses the assumption that the two populations have equal variances. (c) Test the hypothesis H_0: mu_1 = mu_2 against H_0: mu_1 notequal mu_2, where mu_1 is the mean pH level of the soil in lot 1, and mu_2 is the mean pH level of the soil in lot 2. State your conclusion. Use level alpha = 0.10. (d) Give a 90% confidence interval for the difference mu_1 - mu_2, where mu_1 is the mean pH level of the soil in lot 1, and mu_2 is the mean pH level of the soil in lot 2. Using this interval, can we say that there is enough evidence that the average amount of pH level of the soil is different in two lots?

Explanation / Answer

Solution1a:

lot1 <- 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.30,5.65)
  
lot2 <- 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.90,5.76,6.07)

qqnorm(lot1)
qqline(lot1)
qqnorm(lot2)
qqline(lot2)

Data is normally distributed

Solutionb:

var(lot1)
ans: 0.03157474
> var(lot2)
ans: 0.2613042

both variances are different

var.test(lot1,lot2,conf.level=0.90)

Result:

data: lot1 and lot2
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
90 percent confidence interval:
0.05572931 0.26200104
sample estimates:
ratio of variances
0.1208352

Deciosn:

p<0.05 Reject null hypothesis

there is sufficient evidence at 10% level of confidence to support the cliam tht the population variances of two lots are different

SOlution3:

t.test(lot1,lot2,conf.level=0.90)

output:

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

Solution4: