Good News! These calculators have earned their own website! We'll leave these calculators here for now, but for our latest calculators please visit

When you have $k$ treatment levels or $k$ comparison groups, there are a total of $K=k(k-1)/2$ possible pairwise comparisons that could be made. Suppose you wish to make $\tau\le K$ pairwise equality-comparisons between two group means. That is, we have $\tau$ hypotheses of the form

where $\mu_A$ and $\mu_B$ represent the means of two of the $k$ groups, groups 'A' and 'B'.

Power

This sample size calculator uses the following formula: $$n=\left(p_0(1-p_0)+p_1(1-p_1)\right)\left(\frac{\Phi^{-1}(\alpha/(2\tau))+\Phi^{-1}(\beta)}{p_0-p_1}\right)^2$$ where

- $n$ is sample size
- $p_1$ is the rate, proportion, or probability to be tested
- $p_0$ is the comparison value
- $\Phi^{-1}$ is the standard Normal quantile function
- $\alpha$ is Type I error
- $\tau$ is the number of comparisons to be made
- $\beta$ is Type II error, meaning $1-\beta$ is power

R code to implement this function:

p0=0.2 p1=0.4 tau=2 alpha=0.05 beta=0.20 (n=ceiling((p0*(1-p0)+p1*(1-p1))*((qnorm(alpha/2/tau)+qnorm(beta))/(p0-p1))^2)) # 96

Reference: Chow, page 100