# Water content of antifreeze data (Wetherill and Brown, 1991, p. 120)
x <- c(2.23, 2.53, 2.62, 2.63, 2.58, 2.44, 2.49, 2.34, 2.95, 2.54, 2.60, 2.45,
2.17, 2.58, 2.57, 2.44, 2.38, 2.23, 2.23, 2.54, 2.66, 2.84, 2.81, 2.39,
2.56, 2.70, 3.00, 2.81, 2.77, 2.89, 2.54, 2.98, 2.35, 2.53)
sigma <- NA
k <- 2:24
for (j in k)
sigma[j] <- sd.xbar.one(x, k=j)
# plot estimates of sigma for different values of k
plot(k, sigma[k], type="b")
# "as the size inceases further, we would expect sigma-hat to settle down
# at a value close to the overall sigma-hat" (p. 121)
abline(h=sd(x), col=2, lty=2)
# the Shewhart control chart for one-at-time data
qcc(x, type="xbar.one", data.name="Water content (in ppm) of batches of antifreeze")Run the code above in your browser using DataLab