Statistical Power–Calculate Power Given Sample Size

pwr.t.test(n = 119, d = 0.2, sig.level = 0.05, power = NULL,
+type = "one.sample", alternative = "two.sided")

One-sample t test power calculation

N = 119

d = 0.2

sig.level = 0.05          Effect size

Power = 0.5808414

alternative = two.sided

58% power level with 119 samples; this is unacceptable

We would like to have 80% or 90% power level, thus we must obtain more samples.

But if the effect size is medium, i.e., d = 0.5, then the power = 0.9997192, which is acceptable


Transcript

We are going to use that 0.5 [actually 0.2 - small effect size] now as our significance level when we call the power t-test ("pwr.t.test"), here we have input 199 samples we now add to the significance level we are using, we set it to type="one sample," and the alternative is "two.sided".  We see that for a one sample t-test power calculation, N equals 119, d = 0.2 (and that was our effect size).  We saw that for a significance level (sig.level) 0.05 that the power was 0.58 and that the alternative was two sided.  That says with 119 samples, we have only had a 58% power level, and that is not very acceptable, because we'd like to have an 80% or 90% power level. That means we need to do [have] more samples!  So we could say, "Alright! What would happen if we change the effect size to medium."  Then d would be equal to 0.5, and then the power level is 0.9997192 - that is way above 90%, so we would say it's acceptable. So from this data what we've learned is that if we thought it was a small effect (d=0.2) we don't have enough samples at a 119 but if we say the effect is expected to be medium size (d=0.5) then actually 119 [samples] was more than acceptable.