Math & Statistics
Sample Size Step-by-Step Calculator
Derive a sample size for estimating a population mean from a pilot standard deviation, confidence level, target half-width, finite population, design effect, and planned attrition, with each rounding decision exposed.
ROUNDING-AWARE DERIVATION
Every transformation from pilot variability to recruitment target
A calculation staircase shows the unrounded values and ceiling operations; a precision rail checks the achieved half-width after rounding.
PILOT-SD STRESS TEST
Sample size under alternative variability assumptions
The target half-width is fixed while pilot SD is perturbed to reveal the square-law sensitivity.
| Pilot SD | Uncorrected n0 | Finite n | Design completes | Recruit target | Achieved half-width |
|---|
PILOT EVIDENCE
Use a variability estimate that represents the planned measurement
- Define the mean and measurement unit.
- Use a pilot SD from a comparable population and protocol.
- Choose half-width in practical units.
- Apply design effect only when the sampling design warrants it.
- Round completed observations before grossing up attrition.
SQUARE-LAW SENSITIVITY
A small SD or precision change can move n sharply
Because n0 contains the squared ratio s/E, doubling the SD or halving the target half-width roughly quadruples the uncorrected sample.
Pilot SD uncertainty therefore deserves a scenario table rather than a single overly precise recruitment number.
MEAN-PRECISION DERIVATION
Square the signal-to-precision ratio, then apply planning corrections
The normal approximation converts pilot variability into a continuous n. Finite correction, design effect, and attrition are applied in sequence, with upward rounding only where people or units are counted.
Detailed calculation process and general formulas
n0 = (z s / E)^2nF = n0 N / (N + n0 - 1)nD = ceil(DEFF x nF)nR = ceil(nD / (1-a))E_achieved = z s sqrt[(N-nD)/(nD(N-1))]Symbols, meanings, and units
- s
- pilot estimate of population SDoutcome units
- E
- target confidence-interval half-widthoutcome units
- n0
- large-population continuous sample sizeobservations
- a
- unusable or attrition fractiondecimal
- E_achieved
- approximate half-width after roundingoutcome units
ROUNDING CONTROL
Upward rounding is part of the design, not formatting
Each integer boundary protects the target differently.
Continuous core
-Keep n0 and nF unrounded for the next calculation.
Completed observations
-Ceiling after design effect preserves analytic precision.
Recruitment reserve
-Attrition gross-up protects usable completes but does not improve their variance.
Decision takeaway: Archive the pilot SD source, unrounded intermediates, and the final ceiling operations.
Applied decisions
Mean-estimation planning cases
Laboratory precision study
A pilot SD estimates assay variability and the study requires a four-unit half-width.
What the result clarifies: The stress table shows the recruitment cost of a noisier production environment.
Finite employee census frame
A bounded workforce is sampled for a mean score.
What the result clarifies: Finite correction becomes visible when the target sample is a meaningful share of the frame.
Worked current scenario
Substitution, intermediate values, and reconciliation
Method references
Sources for this calculator's specific method
Scope and limitations
This planning approximation uses a normal critical value and a pilot SD. Small-sample t iteration, nonnormal outcomes, repeated measures, unequal allocation, clustering beyond a scalar design effect, subgroup targets, and missing-not-at-random attrition require a tailored design.
Sample Size Step-by-Step Calculator | Mean Precision with Pilot SD FAQ
Why use a pilot SD rather than the range?
The formula is variance-based; a range-to-SD conversion adds assumptions and is unstable in small pilots.
Why not round n0 immediately?
Early rounding can compound across finite correction and design inflation.
Does recruiting extra people always improve precision?
Only usable completed observations contribute to the modeled precision.