How many replications?

The significance level

We draw $n$ pairs of samples of size $r$ from a normal population $N(0, \sigma)$. We calculate the statistic, which is the normalized difference of the means. We compute type I error rate as the fraction of $n$ of those experiments for which the statistic exceeded $z_{\alpha/2}$ value.

The power

We draw $n$ pairs of samples of size $r$ from two normal population $N(0, \sigma)$ and $N(\delta,\sigma)$. We calculate the statistic, which is the normalized difference of the means. We compute type II error rate as the fraction of $n$ of those experiments for which the absolute value of the statistic fell below $z_{\alpha/2}$ value.

Estimated r and observed error rates

z.alpha.half: 1.959964
z.beta: 0.8416212
Number of replications (r): 16
Type I error rate: 0.054
Type II error rate: 0.196

R code to estimate the number of replications