Sample Size Calculation (n): The Essential Formula
Plan observations from confidence, absolute precision and an anticipated proportion, with rounding and model limitations.
Updated:
Plan the sample around the decision
There is no fixed visit count for estimating a proportion. Define the population, category, two-sided confidence level, absolute margin, and initial proportion. Cover the conditions relevant to the decision: a large count collected in one morning does not represent an entire week.
The initial approximation is:
n₀ = z² × p₀ × (1−p₀) / e².
Round upward when converting it to readings. This is normal-approximation planning, not a guaranteed maximum error. NIST describes proportion sample-size planning.
Choose p, e, and confidence
p₀ is a planning assumption, not a known truth. p₀=0.5 maximizes p₀(1−p₀) and is conservative within this formula when defensible prior information is unavailable. A pilot helps, but its estimate is uncertain: automatically substituting an extreme estimate from a small pilot can under-size the study.
Express e as a proportion: 0.03 means three percentage points. For relative error s against p₀, convert e=s×p₀ before applying the formula. Select confidence according to the decision, not a rule based solely on investment value.
Two teaching examples
With p₀=0.5, z=1.96, and e=0.05:
n₀ = 384.16; n = 385.
With p₀=0.75, z=1.96, and e=0.03:
n₀ = 800.333…; n = 801.
These are not workforce sizes. If forty people are recorded per round, within-round correlation matters. Dividing 801 by forty does not automatically retain the planned precision.
When finite-population correction applies
n = n₀/[1+(n₀−1)/M] applies to a finite frame of M units sampled without replacement under the appropriate design. M is not automatically the number of workers or shift hours. A bounded study period alone does not justify reducing the sample.
If there were a frame of exactly 2,000 eligible instants sampled without replacement and the assumptions held, n₀=800.333… would yield approximately 572. That is a specific scenario, not the general recommendation for the preceding example.
Check precision and execution
Halving e quadruples n₀: the relationship is inverse quadratic, not exponential. Useful effort also depends on travel, coverage, and decision cost; sample count alone does not establish wastefulness.
Document completed visits, missed records, and plan changes. Analyze strata with their denominators and weights. Use an appropriate reporting interval, such as Wilson for a binomial proportion, without ignoring dependence or classification. See NIST.
Make the decision within the measurement's limits
Sampling describes activity states. It does not replace quality counts, cycle timing, or causal assessment. It neither eliminates observer effects nor guarantees privacy. Before turning a percentage into a cost or standard, identify the additional information and procedures required.