TriaLab Power Studio · Method
Survey: a mean or total from a stratified sample
Sizes a stratified random sample to estimate an overall mean — or a total — to within a stated margin of error or relative error, and shares the total between the strata proportionally, optimally (Neyman) or equally.
Also known as: stratified survey mean, stratified sampling, Neyman allocation, optimal allocation, proportional allocation, Levy and Lemeshow.
Maturity
Validated: 21 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 (all strata) (
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
- Number of strata (L) (
strata): a whole number, at least 1 and at most 64; default 3 How many groups the population is divided into before sampling — age bands, districts, hospital types — each sampled separately. - Population of each stratum (N_h) (
stratum_population): one number per element, as many asstrata; default (1000, 1000, 1000) How many units each stratum holds. Their sum is the population size, and their shares weight the strata’s estimates. - Standard deviation within each stratum (S_h) (
stratum_sd): one number per element, as many asstrata; default (1, 1.5, 2) The spread of the variable inside each stratum — from national data or a previous survey. Stratification pays when these are small beside the differences between the strata’s means. - Allocation of the sample to the strata (
allocation): a choice; defaultproportionalHow the total is shared between the strata. Proportional allocation samples every stratum at the same rate; Neyman’s optimum (at equal costs) samples a stratum in proportion to its size times its standard deviation and needs the smallest total for a given precision; equal allocation takes the same number from each, and the total is then a multiple of the number of strata.proportionalProportional: n_h = n N_h / N — a self-weighting sample (Levy & Lemeshow §6.5.2).neymanOptimal (Neyman, equal costs): n_h = n N_h S_h / Σ N_h S_h (Levy & Lemeshow §6.5.3; PASS’s “optimal”).equalEqual: n_h = n / L in every stratum; the total is rounded up to a multiple of L.
- 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 for the overall mean may reach on either side of the estimate, in the variable’s own units. PASS’s d. - Relative error (ε) (
relative_error): a number, above 0 and below 1 The fraction of the overall 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 overall mean (X̄) (
mean_anticipated): a number, above 0 The population mean the survey expects to find — the strata’s means weighted by their populations; the relative error is a fraction of it.
Sizes entered when another axis is solved for
- Units sampled (all strata) (
sample_size): a whole number, at least 1 Units sampled (all strata). 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 overall 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 (21)
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, §6.7 (printed pp. 176–179), relations (6.22) and (6.25) | HMO members 600/500/400 by age, episode variances 0.245/0.296/0.436, means 0.164/0.166/0.236, within 20% with virtual certainty, proportional allocation => sample_size 872 | Precision | allocation = proportional; alpha = 0.0027; finite_population_correction = n; mean_anticipated = 0.183867; relative_error = 0.2; strata = 3; stratum_population = (600, 500, 400); stratum_sd = (0.494975, 0.544059, 0.660303); precision expressed as relative_error |
sample_size = 872 ± 0 |
| Levy & Lemeshow 2008, §6.7 (printed pp. 176–179), relations (6.22) and (6.25) | HMO members 600/500/400 by age, episode variances 0.245/0.296/0.436, means 0.164/0.166/0.236, within 20% with virtual certainty, proportional allocation => stratum_1_size 349 | Precision | allocation = proportional; alpha = 0.0027; finite_population_correction = n; mean_anticipated = 0.183867; relative_error = 0.2; strata = 3; stratum_population = (600, 500, 400); stratum_sd = (0.494975, 0.544059, 0.660303); precision expressed as relative_error |
stratum_1_size = 349 ± 0 |
| Levy & Lemeshow 2008, §6.7 (printed pp. 176–179), relations (6.22) and (6.25) | HMO members 600/500/400 by age, episode variances 0.245/0.296/0.436, means 0.164/0.166/0.236, within 20% with virtual certainty, proportional allocation => stratum_2_size 291 | Precision | allocation = proportional; alpha = 0.0027; finite_population_correction = n; mean_anticipated = 0.183867; relative_error = 0.2; strata = 3; stratum_population = (600, 500, 400); stratum_sd = (0.494975, 0.544059, 0.660303); precision expressed as relative_error |
stratum_2_size = 291 ± 0 |
| Levy & Lemeshow 2008, §6.7 (printed pp. 176–179), relations (6.22) and (6.25) | HMO members 600/500/400 by age, episode variances 0.245/0.296/0.436, means 0.164/0.166/0.236, within 20% with virtual certainty, proportional allocation => stratum_3_size 232 | Precision | allocation = proportional; alpha = 0.0027; finite_population_correction = n; mean_anticipated = 0.183867; relative_error = 0.2; strata = 3; stratum_population = (600, 500, 400); stratum_sd = (0.494975, 0.544059, 0.660303); precision expressed as relative_error |
stratum_3_size = 232 ± 0 |
| Levy & Lemeshow 2008, §6.7 (printed pp. 176–179), relations (6.22) and (6.25) | HMO members 600/500/400 by age, episode variances 0.245/0.296/0.436, means 0.164/0.166/0.236, within 20% with virtual certainty, neyman allocation => sample_size 860 | Precision | allocation = neyman; alpha = 0.0027; finite_population_correction = n; mean_anticipated = 0.183867; relative_error = 0.2; strata = 3; stratum_population = (600, 500, 400); stratum_sd = (0.494975, 0.544059, 0.660303); precision expressed as relative_error |
sample_size = 860 ± 0 |
| Levy & Lemeshow 2008, §6.7 (printed pp. 176–179), relations (6.22) and (6.25) | HMO members 600/500/400 by age, episode variances 0.245/0.296/0.436, means 0.164/0.166/0.236, within 20% with virtual certainty, neyman allocation => stratum_1_size 306 | Precision | allocation = neyman; alpha = 0.0027; finite_population_correction = n; mean_anticipated = 0.183867; relative_error = 0.2; strata = 3; stratum_population = (600, 500, 400); stratum_sd = (0.494975, 0.544059, 0.660303); precision expressed as relative_error |
stratum_1_size = 306 ± 0 |
| Levy & Lemeshow 2008, §6.7 (printed pp. 176–179), relations (6.22) and (6.25) | HMO members 600/500/400 by age, episode variances 0.245/0.296/0.436, means 0.164/0.166/0.236, within 20% with virtual certainty, neyman allocation => stratum_2_size 281 | Precision | allocation = neyman; alpha = 0.0027; finite_population_correction = n; mean_anticipated = 0.183867; relative_error = 0.2; strata = 3; stratum_population = (600, 500, 400); stratum_sd = (0.494975, 0.544059, 0.660303); precision expressed as relative_error |
stratum_2_size = 281 ± 0 |
| Levy & Lemeshow 2008, §6.7 (printed pp. 176–179), relations (6.22) and (6.25) | HMO members 600/500/400 by age, episode variances 0.245/0.296/0.436, means 0.164/0.166/0.236, within 20% with virtual certainty, neyman allocation => stratum_3_size 273 | Precision | allocation = neyman; alpha = 0.0027; finite_population_correction = n; mean_anticipated = 0.183867; relative_error = 0.2; strata = 3; stratum_population = (600, 500, 400); stratum_sd = (0.494975, 0.544059, 0.660303); precision expressed as relative_error |
stratum_3_size = 273 ± 0 |
| PASS chapter 118, Example 1 (printed p. 118-6) | four strata, standard deviations 10/15/20/30, proportional allocation, half-width 1, 95% => 1312 | Precision | allocation = proportional; alpha = 0.05; finite_population_correction = n; half_width_target = 1; strata = 4; stratum_population = (14000, 18000, 6000, 10000); stratum_sd = (10, 15, 20, 30) |
sample_size = 1312 ± 0 |
| PASS chapter 118, Example 1 (printed p. 118-6) | four strata, standard deviations 10/15/20/30, proportional allocation, half-width 3, 95% => 150 | Precision | allocation = proportional; alpha = 0.05; finite_population_correction = n; half_width_target = 3; strata = 4; stratum_population = (14000, 18000, 6000, 10000); stratum_sd = (10, 15, 20, 30) |
sample_size = 150 ± 0 |
| PASS chapter 118, Example 1 (printed p. 118-6) | four strata, standard deviations 10/15/20/30, proportional allocation, half-width 5, 95% => 54 | Precision | allocation = proportional; alpha = 0.05; finite_population_correction = n; half_width_target = 5; strata = 4; stratum_population = (14000, 18000, 6000, 10000); stratum_sd = (10, 15, 20, 30) |
sample_size = 54 ± 0 |
| PASS chapter 118, Example 3 (printed p. 118-12) | four strata, standard deviations 10/15/20/30, neyman allocation, half-width 1, 95% => 1118 | Precision | allocation = neyman; alpha = 0.05; finite_population_correction = n; half_width_target = 1; strata = 4; stratum_population = (14000, 18000, 6000, 10000); stratum_sd = (10, 15, 20, 30) |
sample_size = 1118 ± 0 |
| PASS chapter 118, Example 3 (printed p. 118-12) | four strata, standard deviations 10/15/20/30, neyman allocation, half-width 3, 95% => 128 | Precision | allocation = neyman; alpha = 0.05; finite_population_correction = n; half_width_target = 3; strata = 4; stratum_population = (14000, 18000, 6000, 10000); stratum_sd = (10, 15, 20, 30) |
sample_size = 128 ± 0 |
| PASS chapter 118, Example 3 (printed p. 118-12) | four strata, standard deviations 10/15/20/30, neyman allocation, half-width 5, 95% => 46 | Precision | allocation = neyman; alpha = 0.05; finite_population_correction = n; half_width_target = 5; strata = 4; stratum_population = (14000, 18000, 6000, 10000); stratum_sd = (10, 15, 20, 30) |
sample_size = 46 ± 0 |
| PASS chapter 118, Example 4 (printed p. 118-14) | four strata, standard deviations 10/15/20/30, equal allocation, half-width 1, 95% => 1280 | Precision | allocation = equal; alpha = 0.05; finite_population_correction = n; half_width_target = 1; strata = 4; stratum_population = (14000, 18000, 6000, 10000); stratum_sd = (10, 15, 20, 30) |
sample_size = 1280 ± 0 |
| PASS chapter 118, Example 4 (printed p. 118-14) | four strata, standard deviations 10/15/20/30, equal allocation, half-width 3, 95% => 148 | Precision | allocation = equal; alpha = 0.05; finite_population_correction = n; half_width_target = 3; strata = 4; stratum_population = (14000, 18000, 6000, 10000); stratum_sd = (10, 15, 20, 30) |
sample_size = 148 ± 0 |
| PASS chapter 118, Example 4 (printed p. 118-14) | four strata, standard deviations 10/15/20/30, equal allocation, half-width 5, 95% => 56 | Precision | allocation = equal; alpha = 0.05; finite_population_correction = n; half_width_target = 5; strata = 4; stratum_population = (14000, 18000, 6000, 10000); stratum_sd = (10, 15, 20, 30) |
sample_size = 56 ± 0 |
| PASS chapter 118, Example 2 (printed p. 118-10), validating Yamane 1967 | strata of 600/300/100, standard deviations 20/30/50, half-width 3, confidence 0.9973, proportional => sample_size 432 | Precision | allocation = proportional; alpha = 0.0027; finite_population_correction = n; half_width_target = 3; strata = 3; stratum_population = (600, 300, 100); stratum_sd = (20, 30, 50) |
sample_size = 432 ± 0 |
| PASS chapter 118, Example 2 (printed p. 118-10), validating Yamane 1967 | strata of 600/300/100, standard deviations 20/30/50, half-width 3, confidence 0.9973, proportional => stratum_1_size 259 | Precision | allocation = proportional; alpha = 0.0027; finite_population_correction = n; half_width_target = 3; strata = 3; stratum_population = (600, 300, 100); stratum_sd = (20, 30, 50) |
stratum_1_size = 259 ± 0 |
| PASS chapter 118, Example 2 (printed p. 118-10), validating Yamane 1967 | strata of 600/300/100, standard deviations 20/30/50, half-width 3, confidence 0.9973, proportional => stratum_2_size 130 | Precision | allocation = proportional; alpha = 0.0027; finite_population_correction = n; half_width_target = 3; strata = 3; stratum_population = (600, 300, 100); stratum_sd = (20, 30, 50) |
stratum_2_size = 130 ± 0 |
| PASS chapter 118, Example 2 (printed p. 118-10), validating Yamane 1967 | strata of 600/300/100, standard deviations 20/30/50, half-width 3, confidence 0.9973, proportional => stratum_3_size 43 | Precision | allocation = proportional; alpha = 0.0027; finite_population_correction = n; half_width_target = 3; strata = 3; stratum_population = (600, 300, 100); stratum_sd = (20, 30, 50) |
stratum_3_size = 43 ± 0 |
Sources
- Levy PS, Lemeshow S. Sampling of Populations: Methods and Applications. 4th ed. Hoboken: Wiley; 2008. §6.5 and §6.7.
- NCSS, LLC. PASS 2026 documentation, chapter 118: Confidence Intervals for One Mean in a Stratified Design. 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 →