## Sample size to test proportions

Use this calculator to find the minimum sample size required to test the proportions $p_1-p_2$.

Sample Size to test proportion | ||
---|---|---|

Confidence Level ($1-\alpha$) | ||

Power ($1-\beta$) | ||

First group proportion: ($p_1$) | ||

Second group proportion: ($p_2$) | ||

Results | ||

Effect Size ($ES$) | ||

Z value: $Z_{1-\alpha/2}$ | ||

Z value: $Z_{1-\beta}$ | ||

Required Sample Size : ($n$) | ||

## Sample size to test proportions

The formula for determining the sample size required in each group t ensure that the test has a specified power is

`$$ n_i =2\bigg(\frac{Z_{1-\alpha/2}+Z_{1-\beta}}{ES}\bigg)^2; i=1,2. $$`

where

- $\alpha$ is the selected level of significance,
- $1-\beta$ is the selected power and
- $ES$ is the effect size.

The $ES$ is defined as

`$$ ES=\frac{|p_1-p_2|}{\sqrt{p*(1-p)}} $$`

where

- $p_1$ is the proportion for first group,
- $p_2$ is the proportion for second group,
- $p$ is the overall proportion, based on pooling the data from the two comparison groups, that is $p=\frac{p_1+p_2}{2}$.