10.1 Preliminary Data Exploration
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 313.2 323.5 335.2 337.1 350.3 366.8
## Time-Series [1:468] from 1959 to 1998: 315 316 316 318 318 ...
10.1 Preliminary Data Exploration
with(temp.data, t.test(co2, mu = 338))
##
## One Sample t-test
##
## data: co2
## t = -1.3681, df = 467, p-value = 0.1719
## alternative hypothesis: true mean is not equal to 338
## 95 percent confidence interval:
## 335.6941 338.4130
## sample estimates:
## mean of x
## 337.0535
10.2.2 Example: Reject the Null
with(temp.data, t.test(co2, mu = 321))
##
## One Sample t-test
##
## data: co2
## t = 23.205, df = 467, p-value < 2.2e-16
## alternative hypothesis: true mean is not equal to 321
## 95 percent confidence interval:
## 335.6941 338.4130
## sample estimates:
## mean of x
## 337.0535