mudiff.freq returns the required sample sizes
to get a confidence interval of given length and confidence level for the difference between two normal means.
The desired total length of the confidence interval for the difference between the two unknown means
Known precision (reciprocal of the variance) for the first population
Known precision (reciprocal of the variance) for the second population
The desired confidence level (e.g., 0.95)
logical. Whether or not the final group sizes (n1, n2) are forced to be equal:
Assume that a random sample from each of two populations will be
collected in order to estimate the difference between two independent normal means.
Assume further that the two precisions lambda1 and lambda2 are known (where precision is the reciprocal of the variance).
mudiff.freq returns the required sample sizes to attain the
desired length len and confidence level level for the confidence interval
for the difference between the two unknown means from a frequentist point of view.
The required sample sizes (n1, n2) for each group given the inputs to the function.
The sample sizes returned by this function are exact.
Lawrence Joseph firstname.lastname@example.org and Patrick Belisle
Joseph L, Belisle P.
Bayesian sample size determination for Normal means and differences between Normal means
The Statistician 1997;46(2):209-226.
# Suppose variance1 = 2, variance2 = 4 mudiff.freq(len=0.2, lambda1=1/2, lambda2=1/4)
 2305 2305
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.