experimental-design

Produces preregisterable experiment design cards with power analysis and validity audits.

4|1|Updated Jul 30, 2026
One-click install
npx skills add https://github.com/radarist/structured-analytic-skills --skill experimental-design-radarist
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: experimental-design
Source: https://github.com/radarist/structured-analytic-skills/tree/main/skills/experimental-design
Command: npx skills add https://github.com/radarist/structured-analytic-skills --skill experimental-design-radarist

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Experiments fail in two predictable ways: underpowered tests that report noise as findings, and peeked-at tests stopped the moment p dips below .05. This Skill fixes the hypothesis, minimum detectable effect, sample size, stop rule, and analysis plan before any data arrive, so the causal claim survives scrutiny. ## Core Features & Use Cases - Preregisterable design cards: Generates a complete design card covering hypothesis, primary metric, MDE with rationale, randomization unit and mechanism, n per arm, stop rule, exclusions, analysis plan, and surviving validity threats. - Deterministic power analysis: The bundled scripts/power.py computes sample size, achieved power, minimum detectable effect, and run duration for means, proportions, paired designs, and correlations using Cohen (1988) and Fleiss et al. (2003) formulas. - Four-validities audit: Walks internal, statistical conclusion, construct, and external validity threats (Campbell & Stanley, 1963) with a likely direction of bias for each. - Use Case: Before launching an A/B test of one-click checkout, ask for a design: the Skill sets a +2pp MDE from decision stakes, computes 3,841 users per arm at 80% power, fixes a two-week no-peeking horizon, and preregisters the analysis plan. ## Quick Start Ask the assistant to design an A/B test for your proposed change, giving the baseline conversion rate and the smallest lift that would justify shipping, and request the preregistered design card with sample size per arm.

Frequently Asked Questions about experimental-design

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I calculate sample size for an A/B test?▼

Run a power analysis with your baseline rate and minimum detectable effect at alpha .05 two-sided and 80% power. The companion script computes it directly: python3 scripts/power.py n-props --p1 0.10 --p2 0.12 returns 3,841 users per arm for a 10% to 12% lift.

How do I preregister an experiment before launch?▼

Preregistration means timestamping the hypothesis, primary metric, MDE, sample size, alpha and power, randomization mechanism, exclusions, analysis plan, and stop rule before any data arrive. A dated file or commit hash suffices, turning later changes into a visible diff.

What is a minimum detectable effect and how do I choose it?▼

The minimum detectable effect (MDE) is the smallest effect that would change a decision, chosen from decision stakes and prior evidence rather than from the available sample size. If the required n for that MDE is infeasible, accept a larger MDE, get more units, or drop the causal claim.

Why is checking results daily and stopping at p < .05 a problem?▼

Peeking with an ad-hoc stop inflates false positives severalfold because each look is another chance to cross the threshold. The design must fix the horizon in advance or use a named sequential method, decided before launch.

When should I not use a randomized experiment design?▼

Do not use it when data already exist (use significance testing instead), when reviewing someone else's finished trial (use risk-of-bias assessment), or when manipulation is impossible or unethical, where quasi-experimental designs like difference-in-differences apply.

Does the power analysis script need external Python packages?▼

No, scripts/power.py uses only the Python standard library and runs on Python 3.9+. It implements Cohen (1988) normal approximations and the Fleiss, Levin and Paik (2003) two-proportion formula, with a --selftest flag checking 56 values against published tables.