H0: p=p0

α

H0: p=p0 (infection rate in general population)

Infection rate after vaccination: p1

α

β

Power = 1 - β

p0 = 0.02 (slider from 0.01 to 0.02, step 0.001)
p1 = 0.01 (slider from 0.001 to p0, step 0.001)
n = 1200 (slider from 1000 to 5000, step 100)
f = Normal(p0, sqrt((p0 * (1 - p0) / n)), x, false)
g = Normal(p1, sqrt((p1 * (1 - p1) / n)), x, false)
α = 0.05 (slider from 0.01 to 0.1, step 0.01)
a = InverseNormal(p0, sqrt((p0 * (1 - p0) / n)), α)
A: (a, 0)
power = Integral(g, -4, a)
B: (p0, f(p0))
C: (p1, g(p1))
D: (a - 0.001, f(a - 0.001) / 2)
c = Integral(g, a, 4)
E: (a + 0.001, g(a + 0.001) / 3)
text1: "Power = 1 - β 
           = " + power + ""
F: (p1 - 0.003, g(p1) / 3)
b = Integral(f, 0, a)