Sample Size Using Calculator
Sample Size Using Calculator
Online Calculator
http://powerandsamplesize.com/Calculators/
Click on Calculate
Required sample size=22
Using R code for One Sample Example
mu=68
Just modify the R code from the
mu0=50 site 1-Sample, 2 Sided Equally
sd=30
alpha=0.05
beta=0.20
(n=(sd*(qnorm(1-alpha/2)+qnorm(1-beta))/(mu-
mu0))^2)
ceiling(n)# 32
z=(mu-mu0)/sd*sqrt(n)
(Power=pnorm(z-qnorm(1-alpha/2))+pnorm(-z-qnorm(1-
alpha/2)))
Using R code for One Sample Example