Experiment design basics
Skill Amey-Thakur/AI-SKILLS/skills/research/experiment-design-basics
Plug-and-play skills and prompts for every AI coding agent
npx -y skills add Amey-Thakur/AI-SKILLS --skill experiment-design-basicsAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 19 days oldThe repository was created 19 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Design experiments with controls, randomization, confound awareness, and pre-registered analysis. Use when testing a hypothesis empirically and needing the result to actually mean something.
SKILL.md
3.6 KB, as published. Nobody here has run it
Experiment design basics
An experiment isolates cause from correlation. Its validity is decided before any data is collected: what you control, how you assign, what confounds you accounted for, and whether you decided the analysis in advance. A poorly designed experiment produces confident, wrong conclusions that are worse than no experiment.
Method
- Define the causal claim and the measurable outcome. Exactly what causes what, measured how: "adding onboarding step X increases 7-day retention" with retention defined precisely (see product-metrics, ml-problem-framing's target definition). A fuzzy outcome ("improves engagement") lets you find success in any result, which means the experiment cannot fail and therefore proves nothing.
- Establish a control. Compare the treatment against a baseline (a control group, a before-period, the current version): the difference is the effect. Without a control, you cannot separate your intervention from everything else that changed (seasonality, other releases, the news): the single most common experimental failure is no control (see ab-test-design's control arm).
- Randomize assignment. Assign subjects to treatment and control randomly, so the groups differ only by the treatment and not by some pre-existing trait (motivated users self-selecting into the new feature would fake an effect). Randomization is what turns correlation into causation; non-random assignment reintroduces the confounds (see train-test-discipline's leakage cousin).
- Identify and control confounds. A confound is a variable affecting the outcome that also differs between groups: control for known ones (blocking, stratification, or including them in analysis), and randomize to handle unknown ones (see statistical-analysis, experimental- design for the rigorous versions). The confound you did not think of is why the surprising result later evaporates.
- Pre-register the analysis. Decide the primary metric, the sample size (see statistical-power, ab-test-design's sizing), and the analysis method before collecting data: so you cannot (even unconsciously) fish for a significant result among many comparisons (see the peeking and p-hacking traps in ab-test-design). Analysis chosen after seeing data inflates false positives dramatically.
- Account for validity threats. Internal validity (does the design really isolate the cause), external validity (does the result generalize beyond this sample and setting), and statistical validity (enough power, right test): a result strong on one axis and weak on another over-claims. State the threats you did not fully control so the conclusion is honest about its reach.
Boundaries
- This is the pragmatic core; rigorous experimental design (factorial designs, power analysis, mixed models: see experimental-design, statistical-power, statistical- analysis) goes deeper where stakes and publication demand it.
- Not everything can be experimented on (ethics, cost, irreversibility); observational methods and natural experiments substitute, with weaker causal claims that must be stated as such (see scientific-critical-thinking).
- A well-designed experiment can still be wrong if underpowered or if the effect does not replicate; single experiments are evidence, not proof (see the replication ethic in reading-papers).