I'd like to know the required sample size needed to sample a population within 14.7 units of its mean, where the sd = 46, alpha = 0.01, and power = 0.99. I try R's power.t.test():

> power.t.test(delta=14.7, sd=46, sig.level=0.01, power=0.99, type="one.sample")

     One-sample t test power calculation 

              n = 238.6533
          delta = 14.7
             sd = 46
      sig.level = 0.01
          power = 0.99
    alternative = two.sided

Numerically, however, this doesn't seem right: I can run 1000 draws of n samples and it turns out n should be ~75 to be 99% certain of being within 10% of the population mean. Why? Thanks.

  • $\begingroup$ You mention a lot of percentages in your question! Can I check what you are trying to do - are you trying to calculate a sample size that gives you 99% confidence that your sample mean will be within +/- 14.7 units of the mean? (If so, I don't think that is what the power.t.test is calculating - I think it is calculating the sample size required to detect a significant difference, from your hypothetical population mean, of size 14.6, with the stated significant level and power). $\endgroup$ – Izy Apr 2 '19 at 11:30
  • $\begingroup$ @Izy That's right re what I'm trying to do. And I agree, clearly power.t.test() isn't doing what I think it's doing. Thanks. $\endgroup$ – Ben B-L Apr 2 '19 at 12:41
  • $\begingroup$ @ Ben B-L, in that case then you may find it useful to give this summary a read: brownmath.com/stat/sampsiz.htm. Your problem is 'Case 0' in the linked explanation. You have alpha=0.01, for which the corresponding z value for alpha/2 is approx. 2.58, sd=46, and margin of error E = 14.7 units. $\endgroup$ – Izy Apr 2 '19 at 13:01
  • 1
    $\begingroup$ Also, note that a 99% confidence interval is not the same as 99% power. You may want to read up on type 1 and type 2 errors and what 'confidence interval' and 'power' mean. $\endgroup$ – Izy Apr 2 '19 at 13:08
  • $\begingroup$ Also see stats.stackexchange.com/a/53309/212689 for a worked example. $\endgroup$ – Izy Apr 2 '19 at 13:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.