TriaLab Power Studio · Method
Survey: a proportion from a simple random sample
Sizes a simple random sample drawn from a finite population — records, households, patients — to estimate a proportion such as a prevalence to within a stated margin of error or relative error, with the finite-population correction when the population’s size is known.
Also known as: prevalence survey, estimate a prevalence, finite population correction, FPC, simple random sampling, margin of error, Levy and Lemeshow, survey sample size.
Maturity
Validated: 16 published examples from 2 independent publications (Levy & Lemeshow 2008; PASS) reproduce on every build (ADR-0001 §58).
What it solves for
- Precision: offered.
- Sample size: not offered — This design estimates a proportion and runs no hypothesis test, so there is no power to solve for; the Precision target sizes the interval.
- Power: not offered — This design estimates a proportion and runs no hypothesis test, so there is no power to solve for; the Precision target sizes the interval.
- Detectable effect: not offered — This design estimates a proportion and runs no hypothesis test, so there is no power to solve for; the Precision target sizes the interval.
- Assurance: not offered — No source on disk states a prior on this design’s effect, so the assurance modifier is not admitted here.
- Duration: not offered — This design has no time axis.
Size axes:
- Units sampled (
sample_size), Count
Inputs
Every field as the form shows it, with its help. A field marked advanced sits behind Expert mode.
Common to every method
- Significance level (alpha) (
alpha): a number, above 0 and below 1; default 0.05; typically 0.01 to 0.05 (0.05 in most trials; 0.01 for confirmatory claims); entered as proportion (0-1) or percent The type I error rate. Interpreted as two-sided when testing plain equality and one-sided when a margin frame is active, following the usual convention. - Target power (
power_target): a number, above 0 and below 1; default 0.8; typically 0.8 to 0.9 (0.80 is conventional; 0.90 for definitive trials); entered as proportion (0-1) or percent The chance of a significant result if the assumed effect is real. Used when solving for sample size or detectable effect; ignored when solving for power.
The method’s own
- Anticipated proportion (P) (
p_anticipated): a number, above 0 and below 1; default 0.5; entered as proportion (0-1) or percent The proportion — a prevalence, a share of records meeting a standard — the survey expects to find. From a previous survey or a pilot; 0.5 is the conservative value when nothing is known, since it maximises P(1 − P). - Population size (N) (
population_size): a number, above 1 The number of units the sample is drawn from — the records of a year, the households of a district. Leave blank for a population so large that the sample is a negligible share of it. - Finite-population correction (
finite_population_correction): a choice; defaultn_minus_oneHow the sample’s share of a finite population shrinks the variance. The two sources on disk differ in one convention, and each reproduces under its own. Ignored when the population is left blank.n_minus_one(N − n)/(N − 1): the variance is the population’s: P(1 − P), or the variance entered, is the population variance with divisor N, and (N − n)/(N − 1) makes the correction exact — Levy & Lemeshow’s Box 3.5, and Yamane’s stratified proportion as PASS 117 prints it.n1 − n/N on the variance as entered: P(1 − P), or the variance entered, is taken as the divisor-(N − 1) variance S² and corrected by 1 − n/N — Machin et al. 2009 and PASS 116 for a proportion, PASS 118 for a stratified mean, and Levy & Lemeshow’s stratified relations (6.22)–(6.26), which assume reasonably large strata.
- Half-width of the interval (d) (
half_width_target): a number, above 0 and below 1; default 0.05; entered as proportion (0-1) or percent How far the confidence interval may reach on either side of the estimate, as a proportion: 0.05 is ±5 percentage points. PASS’s d. - Relative error (ε) (
relative_error): a number, above 0 and below 1 The fraction of the true proportion the estimate is to be within, with the confidence stated: 0.10 asks for an estimate within 10% of the true value. Levy & Lemeshow’s ε; their “virtual certainty” is a confidence of 0.9973 (z = 3).
Sizes entered when another axis is solved for
- Units sampled (
sample_size): a whole number, at least 1 Units sampled. Required when solving for power or detectable effect; produced by the solver when solving for sample size.
Ways to express an input
Precision required — How close the estimate must be to the true proportion: as the confidence interval’s half-width, or as a relative error — a fraction of the true value.
- Half-width (margin of error), the form’s default: d: the estimate ± d is the confidence interval (PASS’s form). (fields
half_width_target) - Relative error: ε: the estimate is within ε times the true value (Levy & Lemeshow’s form). (fields
relative_error)
Modifiers admitted
dropout: Dropout
Published examples it reproduces (16)
Each is a worked example: the inputs as a user enters them, and the number the source prints, which the engine reproduces within the tolerance on every build (the Validation screen runs them on your machine).
| Source | Example | Solves for | Inputs | Published |
|---|---|---|---|---|
| Levy & Lemeshow 2008, §3.7 (printed pp. 71–72), relation (3.16) | records of a hospital admitting 20,000 a year, optimal care near 80%, virtually certain (z = 3) to within 6.67% of the true proportion => 494 | Precision | alpha = 0.0027; finite_population_correction = n_minus_one; p_anticipated = 0.8; population_size = 20000; relative_error = 0.0667; precision expressed as relative_error |
sample_size = 494 ± 0 |
| PASS chapter 116, Example 1 (printed p. 116-3), after Machin et al. 2009 | population 3,000, P 0.2, half-width 0.04, 95%, correction 1 − n/N => 341 | Precision | alpha = 0.05; finite_population_correction = n; half_width_target = 0.04; p_anticipated = 0.2; population_size = 3000 |
sample_size = 341 ± 0 |
| PASS chapter 116, Example 1 (printed p. 116-3), after Machin et al. 2009 | population 3,000, P 0.25, half-width 0.04, 95%, correction 1 − n/N => 392 | Precision | alpha = 0.05; finite_population_correction = n; half_width_target = 0.04; p_anticipated = 0.25; population_size = 3000 |
sample_size = 392 ± 0 |
| PASS chapter 116, Example 1 (printed p. 116-3), after Machin et al. 2009 | population 3,000, P 0.3, half-width 0.04, 95%, correction 1 − n/N => 432 | Precision | alpha = 0.05; finite_population_correction = n; half_width_target = 0.04; p_anticipated = 0.3; population_size = 3000 |
sample_size = 432 ± 0 |
| PASS chapter 116, Example 1 (printed p. 116-3), after Machin et al. 2009 | population 3,000, P 0.35, half-width 0.04, 95%, correction 1 − n/N => 463 | Precision | alpha = 0.05; finite_population_correction = n; half_width_target = 0.04; p_anticipated = 0.35; population_size = 3000 |
sample_size = 463 ± 0 |
| PASS chapter 116, Example 1 (printed p. 116-3), after Machin et al. 2009 | population 3,000, P 0.4, half-width 0.04, 95%, correction 1 − n/N => 484 | Precision | alpha = 0.05; finite_population_correction = n; half_width_target = 0.04; p_anticipated = 0.4; population_size = 3000 |
sample_size = 484 ± 0 |
| PASS chapter 116, Example 1 (printed p. 116-3), after Machin et al. 2009 | population 3,000, P 0.2, half-width 0.06, 95%, correction 1 − n/N => 162 | Precision | alpha = 0.05; finite_population_correction = n; half_width_target = 0.06; p_anticipated = 0.2; population_size = 3000 |
sample_size = 162 ± 0 |
| PASS chapter 116, Example 1 (printed p. 116-3), after Machin et al. 2009 | population 3,000, P 0.25, half-width 0.06, 95%, correction 1 − n/N => 188 | Precision | alpha = 0.05; finite_population_correction = n; half_width_target = 0.06; p_anticipated = 0.25; population_size = 3000 |
sample_size = 188 ± 0 |
| PASS chapter 116, Example 1 (printed p. 116-3), after Machin et al. 2009 | population 3,000, P 0.3, half-width 0.06, 95%, correction 1 − n/N => 209 | Precision | alpha = 0.05; finite_population_correction = n; half_width_target = 0.06; p_anticipated = 0.3; population_size = 3000 |
sample_size = 209 ± 0 |
| PASS chapter 116, Example 1 (printed p. 116-3), after Machin et al. 2009 | population 3,000, P 0.35, half-width 0.06, 95%, correction 1 − n/N => 225 | Precision | alpha = 0.05; finite_population_correction = n; half_width_target = 0.06; p_anticipated = 0.35; population_size = 3000 |
sample_size = 225 ± 0 |
| PASS chapter 116, Example 1 (printed p. 116-3), after Machin et al. 2009 | population 3,000, P 0.4, half-width 0.06, 95%, correction 1 − n/N => 236 | Precision | alpha = 0.05; finite_population_correction = n; half_width_target = 0.06; p_anticipated = 0.4; population_size = 3000 |
sample_size = 236 ± 0 |
| PASS chapter 116, Example 1 (printed p. 116-3), after Machin et al. 2009 | population 3,000, P 0.2, half-width 0.08, 95%, correction 1 − n/N => 94 | Precision | alpha = 0.05; finite_population_correction = n; half_width_target = 0.08; p_anticipated = 0.2; population_size = 3000 |
sample_size = 94 ± 0 |
| PASS chapter 116, Example 1 (printed p. 116-3), after Machin et al. 2009 | population 3,000, P 0.25, half-width 0.08, 95%, correction 1 − n/N => 109 | Precision | alpha = 0.05; finite_population_correction = n; half_width_target = 0.08; p_anticipated = 0.25; population_size = 3000 |
sample_size = 109 ± 0 |
| PASS chapter 116, Example 1 (printed p. 116-3), after Machin et al. 2009 | population 3,000, P 0.3, half-width 0.08, 95%, correction 1 − n/N => 121 | Precision | alpha = 0.05; finite_population_correction = n; half_width_target = 0.08; p_anticipated = 0.3; population_size = 3000 |
sample_size = 121 ± 0 |
| PASS chapter 116, Example 1 (printed p. 116-3), after Machin et al. 2009 | population 3,000, P 0.35, half-width 0.08, 95%, correction 1 − n/N => 131 | Precision | alpha = 0.05; finite_population_correction = n; half_width_target = 0.08; p_anticipated = 0.35; population_size = 3000 |
sample_size = 131 ± 0 |
| PASS chapter 116, Example 1 (printed p. 116-3), after Machin et al. 2009 | population 3,000, P 0.4, half-width 0.08, 95%, correction 1 − n/N => 138 | Precision | alpha = 0.05; finite_population_correction = n; half_width_target = 0.08; p_anticipated = 0.4; population_size = 3000 |
sample_size = 138 ± 0 |
Sources
- Levy PS, Lemeshow S. Sampling of Populations: Methods and Applications. 4th ed. Hoboken: Wiley; 2008. §3.7 and Box 3.5.
- NCSS, LLC. PASS 2026 documentation, chapter 116: Confidence Intervals for One Proportion from a Finite Population. Kaysville, UT: NCSS, LLC; 2026.
- Machin D, Campbell MJ, Tan SB, Tan SH. Sample Size Tables for Clinical Studies. 3rd ed. Chichester: Wiley-Blackwell; 2009.
This page was generated from TriaLab Power Studio 2.0.1's engine, as the method is built, and is published in English only. All methods →