${n}_{i}=\left\{p\left(1-p\right)+p\left(1-p\right)\right\}\text{\hspace{0.17em}}{\left(\frac{Z}{E}\right)}^{2}=\left\{0.12\left(1-0.12\right)+0.12\left(1-0.12\right)\right\}\text{\hspace{0.17em}}{\left(\frac{1.96}{0.04}\right)}^{2}=507.1$

Description:

Math equation. Using the previous equation for sample sizes for two independent samples with a dichotomous outcome, the samples sizes in this example will be computed by taking the quantity 0.12 times (1-0.12) plus 0.12 times (1-0.12) and multiplying this times the square of 1.96 divided by 0.04. The final answer is 507.1.