The sample size required to obtain a confidence interval with an expected margin of error no larger than for a population mean satisfies the constraint
where is the critical value for the desired level of confidence with degrees of freedom, and is the guessed value for the population standard deviation.
The sample sizes necessary for a two-sample confidence interval can be obtained using a similar constraint, but we would now need to guess both standard deviations and decide on an estimate for the degrees of freedom. We suggest using the smaller of and .
409