Professional Documents
Culture Documents
Introduction
This document outlines the computation of power for 1 proportion and for 2 proportions.
If we are given the power and are solving for the sample size or for the value of p, we use an iterative
algorithm. At each iteration, we must evaluate the power for a trial sample size or value of p. So this outline
applies to those calculations as well.
For the one-sided alternatives, an iterative solution is not actually necessary, since given a function to
calculate the inverse of we can solve for n directly. However, for the two-sided alternative, an
iterative solution is required.
1 Proportion
p0
p1
n
z
= hypothesized p
= alternative p
= sample size
= (p-hat p0) / sqrt( p0 (1 p0) / n )
2 Proportions
p1
p2
pc
n
z
Note.
Instead of the z defined above, we could have used
z* = (p1-hat p2-hat) / sqrt( p1 (1 p1) / n + p2 (1 p2) / n ).
Note that
p1 (1 p1) / n + p2 (1 p2) / n 2 pc (1 pc) / n
so that
| z*| |z|
This means that power values for z* are at least as large as those computed for z.