# Calculate sample size when data has large mean and small variance

I encounter an issue when trying to calculate sample size for a two-sample t test, which may due to very large mean and very small variance of the data. Suppose I have some control group data simulated as below:

set.seed(1)
x = rnorm(10, 1000, 1)


And from prior knowledge, treatment group has a 10% larger mean than control group. Significant level is 5%, power is 80%. Per my understanding, effect size can be calculated as

D = mean(x)*10%/sd(x)
# 1281.258


Clearly, this effect size is too large, and if I use package 'pwr' to sample size n

pwr.t.test(d = D, power = 0.8, sig.level = 0.05, type = 'two.sample')


Function returns error due to this large effect size.

So, in such a situation, is there a way to calculate sample size, maybe by transforming data or something else; or do I even need to calculate sample size since 10% of mean is quite large to variance, and people can easily tell which group the data come from?

• If the two means are 1000 and 1100 (10% larger) and the sd is 1 then you will have a huge effect size (100, not 1281.258). There is no need to draw a random sample here either. – mdewey Aug 2 '16 at 16:03
• If the first population has mean 1000, your means are a hundred standard deviations apart! Do you really believe that? If so, the smallest sample sizes (even say $n_1=2$ and $n_2=1$) will give better power at substantially lower type I error rate. (if my calculations are right you should be able to have power 0.99 at $\alpha=0.01$ with those minimal sample sizes) – Glen_b Aug 3 '16 at 0:57