## HyLown Power and Sample Size Calculators

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

PowerAndSampleSize.com.

For testing equivalence to a gold standard:

$H_0:|p_1-p_0|\ge\delta$ versus $H_1:|p_1-p_0|<\delta$
.

Sample Size

Power

X-axis

min

max

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

• $n$ is sample size
• $p_1$ is the rate, proportion, or probability to be tested
• $\Phi^{-1}$ is the standard Normal quantile function
• $\alpha$ is Type I error
• $\beta$ is Type II error, meaning $1-\beta$ is power
• $\delta$ is the testing margin

R code to implement this function:

p0=0.6
p1=0.6
delta=0.2
alpha=0.05
beta=0.20
(n=ceiling(p1*(1-p1)*((qnorm(alpha)+qnorm(beta/2))/(abs(p1-p0)-delta))^2)) # 52

Reference: Chow, page 87