We expect two proportions to be about 0.20 and 0.30, and we want an 80% chance of detecting a difference between them using a two-sided 0.05 level test.
a. Assuming equal sample sizes, how large should they be?
b. How does the sample size change if we want a 90% power?
c. How does the sample size change if we use a two-sided 0.01 level test (still keeping 80% power)?
d. How does the sample size change if we want to test a difference between 0.30 and 0.40 (still keeping 80% power, two-sided 0.05 level test)?