| name | alterlab-ssci-sampling-gate |
| description | Gates who is sampled, how, and how many before data collection — checks that the sampling FRAME matches the target population (coverage error), that the METHOD is named (probability vs non-probability: simple random, stratified, cluster, systematic, quota, convenience, snowball), that sample SIZE follows the inference paradigm (an a-priori power analysis for hypothesis tests, a precision/margin-of-error target for estimation, or saturation/information power for qualitative studies — never a rule of thumb or collect-until-significant), and that the generalization claim matches the sample (statistical generalization only from probability samples). Use when asking how many participants are needed, planning recruitment, running or checking a power analysis, or judging whether a sample supports a population claim. For questionnaire items prefer alterlab-survey-design; for choosing the statistical test prefer alterlab-test-selection-guard. Part of the AlterLab Academic Skills suite. |
| license | MIT |
| allowed-tools | Read Bash(python:*) |
| compatibility | No API key required. A discipline-enforcing sampling-and-power skill; the optional sample-size calculator runs locally via `uv run python` (standard library only). |
| metadata | {"skill-author":"AlterLab","version":"1.0.0","depends_on":"alterlab-survey-design (instrument), alterlab-qualitative-methods (saturation depth), alterlab-test-selection-guard, alterlab-statistical-analysis"} |
Sampling Gate — The Sample Decides Who the Answer Is About
Skill type: DISCIPLINE-ENFORCING. Before a single case is collected, this gate fixes three
things — the frame, the method, and the size logic — and ties the generalization claim to
them. It does not run the study or pick the test; it refuses to let sizing and recruitment happen
by habit.
The Core Rule
WHO YOU SAMPLE AND HOW MANY MUST FOLLOW THE INFERENCE YOU WANT —
POWER FOR TESTS, PRECISION FOR ESTIMATES, SATURATION FOR THEORY.
A BIGGER N NEVER FIXES A BROKEN FRAME.
Sample size is not one calculation; it is whichever logic matches the inference. A hypothesis
test needs an a-priori power analysis (effect size + alpha + power ⇒ N). An estimation goal
needs a precision target (a margin of error at a confidence level). A qualitative study is
governed by saturation / information power, not a formula. And none of these matters if the
frame — the list you actually draw from — omits or over-represents part of the target
population. Coverage error and self-selection are not cured by collecting more.
When to Use This Skill
- "How many participants / interviews / respondents do I need?"
- "Is my sample big enough to detect the effect?" (← a-priori power)
- "I surveyed 300 students; can I generalize to all adults?" (← frame + method)
- "My result was not significant — should I just collect more until it is?" (← no; pre-specify)
- "What sampling method should I use — stratified, cluster, quota…?"
Does NOT Trigger
| The request is really about… | Route to | Why not this skill |
|---|
| Writing / wording the questionnaire items | alterlab-survey-design | Instrument construction, not sampling. |
| Which statistical test to run once data are in | alterlab-test-selection-guard | Test choice, downstream of sampling. |
| Executing the power analysis / analysis in software | alterlab-statistical-analysis | Computation; this gate sets the logic, hands execution off. |
| Deep grounded-theory / coding mechanics | alterlab-qualitative-methods | This gate sets saturation logic; that skill does the qual depth. |
|