# A function to figure and graph the power function in the
# cola filling example.
# Tom, Moore
# Feb. 21, 2006
#

powerz <- function(m=355,s=1,n=12,fn=plot,min=353.5,max=355.2)
{       # Choose max and min to spam an appropriate range on the x-axis
        x <- seq(min,max,length=100)
        y <- pnorm((m-x-1.645*s/sqrt(n))/(s/sqrt(n)))
        fn(x,y,type='l')
        axis(1,tck=1,lty=2)
        axis(2,tck=1,lty=2)
}