The CO2 dataset has 84 rows and 5 columns of data from an experiment on the cold tolerance of the grass species Echinochloa crus-galli. plant: an ordered factor with levels Qn1 < Qn2 < Qn3 < … < Mc1 giving a unique identifier for each plant. type: a factor with levels Quebec Mississippi giving the origin of the plant treatment: a factor with levels nonchilled chilled conc: a numeric vector of ambient carbon dioxide concentrations (mL/L). uptake: a numeric vector of carbon dioxide uptake rates (umol/m^2 sec).
Test whether the population mean uptake is less than 30 or not with 5% level of significance
data(CO2)
t.test(CO2$uptake,mu=30,alternative = "l")
##
## One Sample t-test
##
## data: CO2$uptake
## t = -2.3619, df = 83, p-value = 0.01026
## alternative hypothesis: true mean is less than 30
## 95 percent confidence interval:
## -Inf 29.17585
## sample estimates:
## mean of x
## 27.2131
Reject H0 at 5% level of significance.
Conclusion: Population mean uptake may be less than 30.
data("Indometh")
t.test(Indometh$conc,mu=0.3,alternative = "g")
##
## One Sample t-test
##
## data: Indometh$conc
## t = 3.7477, df = 65, p-value = 0.0001908
## alternative hypothesis: true mean is greater than 0.3
## 95 percent confidence interval:
## 0.4618886 Inf
## sample estimates:
## mean of x
## 0.5918182
Reject H0 at 5% level of significance
Result: Population mean for Plasma Concentration may be greater than 0.30.