TriaLab Power Studio · Method
Survey: a mean or total from a simple random sample
Sizes a simple random sample drawn from a finite population to estimate a mean — or a total, whose relative error is the mean’s — 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: survey mean, estimate a mean, estimate a total, finite population correction, simple random sampling, margin of error, Levy and Lemeshow.
Maturity
Validated: 3 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 mean 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 mean 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 mean 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
- Standard deviation of the variable (σ) (
sd): a number, above 0; default 1 The spread of the measurement across the population’s units — from a pilot or a previous survey. With a relative error, only its ratio to the mean matters: Levy & Lemeshow’s relative variance V² is (σ / mean)². - Population size (N) (
population_size): a number, above 1 The number of units the sample is drawn from — the pharmacies of a state, 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; defaultnHow 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; default 0.2 How far the confidence interval may reach on either side of the estimated mean, in the variable’s own units. PASS’s D. - Relative error (ε) (
relative_error): a number, above 0 and below 1 The fraction of the true mean 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). - Anticipated mean (X̄) (
mean_anticipated): a number, above 0 The mean the survey expects to find; the relative error is a fraction of it.
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 mean: 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,mean_anticipated)
Modifiers admitted
dropout: Dropout
Published examples it reproduces (3)
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. 73–75), relation (3.15) | 2,500 pharmacies, average price $70 with a standard deviation of $14 (V² 0.04), virtually certain (z = 3) to within 10% => 36 | Precision | alpha = 0.0027; finite_population_correction = n_minus_one; mean_anticipated = 70; population_size = 2500; relative_error = 0.1; sd = 14; precision expressed as relative_error |
sample_size = 36 ± 0 |
| PASS chapter 420, Example 2 (printed p. 420-7), validation against Moore & McCabe 1999 | known standard deviation 3, half-width 2, 95%, infinite population => 9 | Precision | alpha = 0.05; half_width_target = 2; sd = 3 | sample_size = 9 ± 0 |
| PASS chapter 420, Example 3 (printed p. 420-8), validation against Ostle & Malone 1988 | known standard deviation 7, half-width 5, 95%, infinite population => 8 | Precision | alpha = 0.05; half_width_target = 5; sd = 7 | sample_size = 8 ± 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 420: Confidence Intervals for One Mean. Kaysville, UT: NCSS, LLC; 2026.
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 →