Since tests involving two samples are generally the most commonly performed in medicine, and since the same situation applies if we fail to accept a null hypothesis for two samples as a null hypothesis for one sample, we are commonly in the situation of wanting to perform power calculations for two sample studies.
Hence I have included the equation in this circumstance. Zα and Zβ are again the critical values for the p values for false positive and false negative error respectively. SD1 and SD2 are the standard deviations of the two samples. A pilot study might have determined these, and they might have been assumed to be equal. Δa is the maximum difference in means that is judged to be acceptable unimportant variation, and Δ0 is the null hypothesis difference in means, often zero:
n = (Zα + Zβ)2 (SD12 + SD22)/(Δa– Δ0)2
If one makes the assumptions about equal SDs, the number required in each sample is twice that for a single sample power calculation.
Note also that for a two-tailed test, the Zα should use the two tailed p-value, but the Zβ should use the one tailed p-value because, as we described earlier, once we have failed to reject one hypothesis, rejecting the second only goes in one direction depending on whether the first sample mean was greater or less than the second.