In: Statistics and Probability
Refer to the air-conditioning data set aircondit provided in the boot package. The 12 observations are the times in hours between failures of air-conditioning equipment
3, 5, 7, 18, 43, 85, 91, 98, 100, 130, 230, 487.
Use R software
The R output is:
The R code is:
library(boot)
t(aircondit)
length(aircondit$hours)/sum(aircondit$hours)
B <- 200
n <- 12
R <- numeric(B)
for (b in 1:B) {
i <- sample(1:n, size = n, replace = TRUE)
hours <- aircondit$hours[i]
R[b] <- length(hours)/sum(hours)
}
print(se.R <- sd(R))
theta.hat <- 0.00925212
B <- 2000
n <- 12
theta.b <- numeric(B)
for (b in 1:B) {
i <- sample(1:n, size = n, replace = TRUE)
hours <- aircondit$hours[i]
theta.b[b] <- length(hours)/sum(hours)
}
bias <- mean(theta.b - theta.hat)
bias
Our MLE for λ is 0.00925212.
Our bootstrap estimate for the standard error of the estimate is 0.004549749.
Our bootstrap estimate for the bias of the estimate is 0.001245097.