Hexa Scholar

Statistical power and sample size

A navy scale with a blank cream dial and brass pan beside a wooden tray of cream sample cylinders.
A scale and a tray of samples stand for an experiment still being planned.

The question

Choose the sample before collecting the measurements.

  1. 1 SeeFind the smallest sample that works.
  2. 2 TryCompare two sampling plans.
  3. 3 ProveDerive the power and sample-size formulas.
  4. 4 ApplyPlan and interpret five experiments.
Before you start · 3 quick checks on normal areas, standard errors, and testing

Two ideas before you start

2 ideas

A mean has its own spread

A normal sampling density centered at the population mean.

Switch the sample size. The curve describes the mean across fresh samples from the same population.

Exact definition

Let the observations \(X_1,\ldots,X_n\) be independent normal variables with common mean μ and known population standard deviation \(\sigma\gt0\). Their average \(\bar X\) is normal with mean μ and variance \(\sigma^2/n\). Its standard error is \(s=\sigma/\sqrt n\). The card uses a centered population with a fixed SD; its readout gives the chosen values.

The normal distribution lesson explains density and standardization. The width here describes uncertainty in a mean, not the spread of individual observations.

Two areas answer two questions

Select a model to see its density and the rejection tail.

The same decision boundary has an area under each model. Name the model whenever you name a probability.

Exact definition

For a fixed rejection region R, the Type I error is \(P_0(R)\), rejection under the null. Power at a specified alternative is \(P_1(R)\). The Type II error is \(\beta=P_1(R^c)\), so power is \(1-\beta\). The subscripts name the data-generating model. They do not assign probabilities to hypotheses.

These definitions come from hypothesis tests. Here the rule stays fixed while the selected distribution changes. This illustration uses its own cutoff, separate from the design challenge.

The sampling plan and the effect of interest

Throughout the normal calculations, the sample size is a positive integer chosen in advance. Observations are independent and identically distributed normal measurements, with the same known SD under both hypotheses. There is one upper-tail test, with its direction and significance level fixed before sampling. No interim looks or data-dependent stopping are included.

The null mean is μ₀. The planning alternative is \(\mu_1=\mu_0+\Delta\), where \(\Delta\gt0\) is an increase worth detecting. The standardized effect is \(d=\Delta/\sigma\). It is a population difference in units of the individual SD, not a difference divided by the standard error. Choose it from the scientific question before seeing a result. The power calculation is conditional on that assumed effect actually being present.

1 See

Find the smallest workable sample

2 Try

Compare two plans

3 Prove

Derive the planning formula

Refresher: normal quantiles and rounding up

Write \(\Phi(t)=P(U\le t)\) for standard normal U, and \(z_v=\Phi^{-1}(v)\) for the unique value with CDF v. This inverse is a quantile, not a reciprocal. The density is positive, so Φ is strictly increasing. Normal symmetry gives \(1-\Phi(t)=\Phi(-t)\). The ceiling \(\lceil a\rceil\) is the smallest integer at least a. It leaves an integer unchanged and rounds a noninteger upward.

Theorem: known-SD, one-sided normal test

Assume the independent normal model above, known \(\sigma\gt0\), integer \(n\ge1\), \(d=\Delta/\sigma\gt0\), and \(0\lt\alpha\lt1/2\). Define \(q=z_{1-\alpha}\) and reject the null mean μ₀ when \(Z=(\bar X-\mu_0)/(\sigma/\sqrt n)\gt q\). The rule has Type I error α. Its power at μ₀ + Δ is

\[\pi(n,d)=\Phi(d\sqrt n-q).\]

For a target \(1/2\lt p_*\lt1\), the smallest integer sample size attaining at least that power is

\[\begin{aligned} A&=\frac{q+z_{p_*}}d,\\ n_{\min}&=\lceil A^2\rceil.\end{aligned}\]

Both quantiles and d are positive in this theorem, so A is positive. Normality makes the result exact for every allowed sample size. It is not a large-sample substitute for a test with an estimated SD.

Build the sampling distribution, then translate a rejection into an area. Finally invert that area. The theorem states the result; the choices below supply its justification.

4 Apply

Plan, calculate, interpret

Use the known-SD independent normal model and a fixed upper-tail test in each planning problem. Enter probabilities as decimals without percent signs; answers within 0.001 of the exact value are accepted, so either rounded or unrounded quantiles work. For sample counts, enter a whole number. Hints and full worked solutions are available after you try.

What a power calculation does not tell you

Power is a property of a plan at a specified population effect. It is not the probability that a significant finding is true, and it is not the probability that a nonsignificant finding has no effect. Those reverse the conditioning. The p-values lesson separates tail probabilities from statements about hypotheses.

A high-powered experiment can still miss its target effect. A low-powered experiment can still reject. After observing data, report the estimated difference and its uncertainty alongside the testing rule. Substituting the observed difference into the planning formula does not turn a nonrejection into evidence of equality.

If observations are correlated, the variance of the mean need not be σ²/n. If σ is estimated, a t-test requires different quantiles and a different power distribution. Multiple tests, missing measurements, or stopping early also change the design being evaluated. The calculations here apply to the complete fixed plan stated on this page.

Key point State the population effect used for planning and the assumptions behind the standard error. A numerical sample size is only as applicable as that model.
Level IntroPrerequisites hypothesis tests, p-values, normal distributionTime about 30 min

Further reading