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:|\mu-\mu_0|\ge\delta$ versus $H_1:|\mu-\mu_0|<\delta$

where $\delta$ is the superiority or non-inferiority margin and the ratio between the sample sizes of the two groups is
$$\kappa=\frac{n_1}{n_2}$$

Sample Size

Power

X-axis

min

max

This sample size calculator uses the following formula: $$ n_1=\kappa n_2 \;\text{ and }\; n_2=\left(1+\frac{1}{\kappa}\right) \left(\sigma\frac{\Phi^{-1}(\alpha)+\Phi^{-1}(\beta/2)}{|\mu_1-\mu_0|-\delta}\right)^2$$ where

  • $n$ is sample size
  • $\kappa=n_1/n_2$ is the matching ratio
  • $\sigma$ is standard deviation
  • $\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:

mu0=5
mu1=4
delta=5
kappa=1
sd=10
alpha=0.05
beta=0.20
(n=ceiling((1+1/kappa)*(sd*(qnorm(alpha)+qnorm(beta/2))/(abs(mu1-mu0)-delta))^2)) # 108

Reference: Chow, page 62