Example 7.14

01/30/13

# Observations
x <- c(152, 115, 109, 94, 88, 137, 152, 77, 160, 165, 125, 40, 128, 123, 136, 
    101, 62, 153, 83, 69)

xbar <- sum(x)/length(x)
xbar
## [1] 113.5
x2bar <- sum(x^2)/length(x)
x2bar
## [1] 14088

Plug in formula for \( \hat{\alpha} \) and \( \hat{\beta} \).

alphahat <- xbar^2/(x2bar - xbar^2)
alphahat
## [1] 10.58
betahat <- (x2bar - xbar^2)/xbar
betahat
## [1] 10.73