Chip Foundry Services Request Assessment

Sample Size Determination

Sample size determination is the process of choosing how many observations an experiment needs before data collection begins. The right number depends on the question: estimating a population value to a chosen precision is different from detecting a treatment effect. These formulas make those assumptions explicit so a study is neither too small to find a real change nor larger than necessary.

Estimating a mean to a target precision

For a two-sided confidence interval for a population mean, if the planning standard deviation is $\sigma$ and the desired margin of error is $E$, the normal-approximation sample size is:

$$n_0 = \left(\frac{z_{1-\alpha/2}\,\sigma}{E}\right)^2$$

Here, $1-\alpha$ is the confidence level and $z_{1-\alpha/2}$ is its standard-normal critical value. Round $n_0$ up to the next whole observation. For example, with 95% confidence, $\sigma = 10$, and $E = 2$, the calculation is $(1.96 \times 10 / 2)^2 = 96.04$, so at least 97 independent observations are needed. This is a planning approximation; for a small sample with an estimated standard deviation, use a $t$ critical value and solve iteratively.

Detecting a difference between two means

For two independent groups with equal allocation, a two-sided test, common standard deviation $\sigma$, target difference $\Delta$, Type I error rate $\alpha$, and power $1-\beta$, the large-sample normal approximation for the sample size in each group is:

$$n_{\mathrm{per\ group}} \approx \frac{2\left(z_{1-\alpha/2}+z_{1-\beta}\right)^2\sigma^2}{\Delta^2} = \frac{2\left(z_{1-\alpha/2}+z_{1-\beta}\right)^2}{d^2}, \qquad d = \frac{\Delta}{\sigma}$$

The factor of 2 is for two groups. Do not treat this result as the total sample size: recruit $2n$ participants before allowing for exclusions or loss to follow-up. For $\alpha = 0.05$, 80% power, and a medium standardized difference $d = 0.5$, the approximation gives $n \approx 62.8$ per group. Rounding up gives 63 per group, or 126 total. Exact $t$-test planning uses the noncentral $t$ distribution and can require a slightly different count.

Estimating a proportion

To estimate a population proportion with margin of error $E$, use the planning approximation:

$$n_0 = \frac{z_{1-\alpha/2}^2\,p(1-p)}{E^2}$$

Use a prior estimate for $p$ when available. If $p$ is unknown, setting $p=0.5$ gives the largest, conservative sample size. At 95% confidence and a 5-percentage-point margin of error, this gives $n_0 = 1.96^2(0.5)(0.5)/0.05^2 = 384.16$, or 385 independent observations after rounding up.

Adjustments before recruiting

If sampling without replacement from a finite population of size $N$, the finite-population correction changes an initial estimate $n_0$ to:

$$n = \frac{Nn_0}{N+n_0-1}$$

For expected response fraction $r$, inflate the analyzable target to $\lceil n/r\rceil$ recruits. Clustered observations are not independent; account for within-cluster similarity with a design effect or a method built for the clustered design. Unequal group allocation, one-sided tests, multiple comparisons, and non-normal outcomes also change the calculation.

A practical sizing workflow

1. Define the primary outcome and the smallest difference worth acting on.
2. Choose the study goal: estimate a value to a precision, or detect a difference with a target power.
3. Set the confidence level or $\alpha$, select a justified estimate of variability or baseline proportion, and specify the desired power when testing a difference.
4. Calculate the count for the chosen design, round up, then account for finite populations, clustering, allocation, and expected missing data.
5. Record the assumptions and recalculate if the outcome variability, minimum meaningful difference, or study design changes.

The sample-size number is only as trustworthy as its inputs. A formula cannot rescue an unrealistic effect, an unrepresentative variance estimate, or a design that treats correlated measurements as independent.