In [1]:
require(ggplot2)
In [2]:
power <- function(lam) {
# Return power of test in problem 22 for given lambda
return (1 - ppois(7, 8*lam))
}
In [3]:
lstep <- 0.01
lmax <- 2
lambda <- seq(0.5+lstep, lmax, by=lstep)
In [4]:
df <- data.frame(lambda=lambda, power=power(lambda))
In [5]:
ggplot(df, aes(lambda, power)) + geom_point()
In [ ]: