leonardodalinky/scider/experiment-design
Claude Code and agent skill by leonardodalinky/scider
- community
Checking that the SKILL.md file is still in the repository.
Controlled experiment design — hypothesis formation, statistical power and sample size estimation, confound control, ablation structure, baseline selection, and reproducibility requirements. Use when designing research experiments to ensure valid, reproducible results.
Install
npx vskill@latest install leonardodalinky/scider/experiment-designSKILL.md
Experiment Design
Overview
Good experimental design determines whether your results are interpretable, valid, and reproducible. This skill covers the process from hypothesis formation through post-experiment reporting, with actionable checklists and code examples.
When to Use This Skill
- Before designing any experiment: choose baselines, define metrics, plan sample sizes
- When writing a research idea: include a concrete experimental protocol
- When results look unexpected: check whether experimental design is the cause
- When a reviewer asks about confounds, baselines, or statistical power
Hard Rules
- Define your hypothesis BEFORE collecting data — post-hoc hypothesis selection inflates false positive rates
- Always include at least one trivial baseline — random, majority class, or simple heuristic
- Set random seeds everywhere — numpy, random, torch, tensorflow, sklearn
- Use held-out test data only once — never tune on it
- Report N (sample size) and how it was determined — underpowered studies mislead
1. Hypothesis Formation
A well-formed hypothesis has three parts:
| Part | Example | |
|---|---|---|
| Null hypothesis (H₀) | The proposed method performs no better than the baseline | |
| Alternative hypothesis (H₁) | The proposed method achieves higher F1 than the baseline | |
| Expected effect size | Δ = 0.03 F1 (3 percentage points) |
Directionality:
- One-tailed: you predict direction of effect (method > baseline) → more statistical power, but only justified if direction is theoretically grounded
- Two-tailed: you test for any difference → safer for exploratory work
2. Statistical Power and Sample Size
Power analysis determines how many samples you need to detect an effect of a given size.
Key parameters:
- α (Type I error rate): probability of false positive — typically 0.05
- β (Type II error rate): probability of false negative — typically 0.20
- Power = 1 - β = 0.80 (minimum), 0.90 (preferred)
- Effect size: domain-specific (Cohen's d for continuous, Cohen's h for proportions)
Rule of thumb for ML experiments: use at least 30 test examples per class for classification; for regression, aim for n ≥ 50 per parameter estimated.
3. Confound Identification and Control
Confound: a variable that affects both treatment and outcome, creating spurious correlations.
Step-by-step confound analysis:
- List all variables that could affect your outcome
- For each, ask: "Is this variable correlated with my treatment?"
- If yes → it is a potential confound
- Decide: hold constant, measure and control, or randomize
Common confounds in ML research:
- Dataset size: compare methods on same-size training data
- Compute budget: compare methods given same FLOPs or wall time
- Random seed: report mean ± std across multiple seeds
- Hardware: specify GPU/CPU for timing comparisons
- Preprocessing choices: same pipeline for all methods
Control strategies:
- Hold constant: run all conditions with the same hyperparameters
- Block and randomize: if you must vary, do so randomly across conditions
- Measure and partial out: include confound as a covariate in statistical model
4. Ablation Study Structure
Ablation studies isolate the contribution of each component.
Protocol:
- List ALL system components (e.g., data augmentation, loss function, pretraining, regularization)
- Define a "full system" (all components enabled)
- Create one ablation per component: full system minus component X
- Run each ablation on the SAME data, with the SAME random seeds
- Report delta contribution: Δ(full − ablated)
Common mistake: changing multiple things between ablations — you cannot attribute the change to any one component.
5. Baseline Selection Criteria
A valid baseline must be:
- Reproducible: from published paper or fully specified implementation
- Comparable: evaluated on the same data split and preprocessing
- Appropriate: same task, same evaluation protocol
Baseline hierarchy:
- Trivial baseline: random guess, majority class, mean prediction, constant output
- Simple heuristic: TF-IDF + logistic regression for NLP, linear regression for tabular
- Prior state of the art: best published result on same benchmark
Always include at least the trivial baseline. If your method cannot beat a trivial baseline, revisit the problem formulation.
6. Reproducibility Requirements
Random Seeds (set ALL of these)
Environment Logging
Data Integrity
7. Replication vs. Reproduction
| Term | Definition | What it verifies | |
|---|---|---|---|
| Reproduction | Same code, same data, same results | Code correctness | |
| Replication | Different implementation, same protocol → same results | Scientific claim validity |
For AI research:
- Reproduction: re-run your own code → should match
- Replication: another team implements your method → the harder, more meaningful test
Documentation for reproducibility:
- Pin all random seeds
- Record all hyperparameters (save config file, not just code)
- Log training curves, not just final metrics
- Checkpoint models at multiple points
Pre-Experiment Checklist
Before starting:
- [ ] Hypothesis is written down (H₀, H₁, expected effect size)
- [ ] Sample size / evaluation set size determined (power analysis or domain norm)
- [ ] All baselines identified and confirmed implementable
- [ ] Evaluation metric(s) chosen and justified
- [ ] Data splits created and fixed (no re-splitting after seeing results)
- [ ] Potential confounds listed and mitigation strategy defined
- [ ] Random seeds set and logged
- [ ] Ablation study components listed
After experiment:
- [ ] Results reported with confidence intervals or std across seeds
- [ ] All baselines evaluated on exact same test split
- [ ] Ablation table shows per-component delta
- [ ] Hyperparameter search budget documented
- [ ] Training/validation curves included
- [ ] Requirements file saved with pinned versions
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.scider/skills/experiment-design/SKILL.md
Popularity
- Repository stars
- 88
- Repository forks
- 7
- 7-day trend score
- 22
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/leonardodalinky/scider/experiment-design)