act_height <- 200
exp_err <- 1/5*(-2+(-1)+0+1+2)
# expected value for the height obtained using this instrument once
exp_val <- act_height + exp_err
exp_val
## [1] 200
# expected variance for the height obtained using this instrument once
var <- 1/5*((-2)^2+ (-1)^2+ 0^2+ 1^2+ 2^2)
var
## [1] 2
# Calculate P(199<=Sn<=201)
# calculate std error
std_err <- sqrt(var/18)
# lower and upper bound
avg_199 <- (199-act_height) / std_err
avg_201 <- (201-act_height) / std_err
# probability that average of the measurements is between 199 and 201 after 18 independent measurements
round((pnorm(avg_201) - pnorm(avg_199)), 4)
## [1] 0.9973