Skip to content
Skillpedia
Agents51k · #1866

experimental-design

Helps your agent plan experiments before collecting data. It's useful for deciding how participants or samples will be divided into groups to get clear results.

What it does

This tool helps plan scientific experiments or studies. It decides how to organize participants or samples into different groups, how to introduce randomness, and how to group similar units to ensure results are clear and reliable.

When to use it

  • ✓When planning a study and deciding how to divide participants.
  • ✓When wanting to ensure results are reliable, avoiding common errors.
  • ✓When needing to create a plan to test different conditions or treatments.

Example of what to ask your AI

“I want to compare two drugs. How should I divide 100 patients into two groups to be sure the comparison is fair?”

Want more? Open the sections below.

How to use

The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.

Skill link

https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/experimental-design/SKILL.md

Ready-to-paste message

Use this skill to help me: https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/experimental-design/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
How it works

The tool uses principles like randomization to avoid bias, replication to estimate variability, and blocking to control factors that might influence results. It helps choose the best plan before data collection.

Installation

Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.

In the terminal (Claude Code, Codex, Cursor), in your project folder:

npx skills add K-Dense-AI/scientific-agent-skills --skill experimental-design

Or download just the file:

curl -L https://raw.githubusercontent.com/K-Dense-AI/scientific-agent-skills/main/skills/experimental-design/SKILL.md -o SKILL.md
Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Experimental Design

Overview

The design of a study — how units are assigned to conditions, what is held constant, what is varied, and in what structure — determines what questions the data can answer. No analysis can rescue a confounded or pseudoreplicated design after the fact. This skill is about the decisions made before data collection: picking a design that isolates the effect of interest, randomizing to license causal claims, blocking to remove known nuisance variation, and structuring multi-factor experiments so effects are estimable rather than tangled together.

The three ideas behind almost every good design (Fisher's principles):

  • Randomization — assign treatments at random so that confounders, known and unknown, are balanced in expectation. This is what turns a comparison into a causal claim.
  • Replication — independent repetition at the right level, so you can estimate variability and your effects aren't artifacts of a single unit. The most common fatal error is pseudoreplication: counting repeated measurements on the same unit as independent replicates.
  • Blocking / local control — group similar units (by batch, day, site, litter) and randomize within blocks, removing that nuisance variation from the error term instead of letting it inflate noise.

This skill helps you choose among design types, generate the actual randomization or DOE layout (with reproducible scripts), and avoid the structural mistakes that make data uninterpretable.

When to Use This Skill

  • Planning any comparative experiment or trial and deciding how to assign units
  • Randomizing subjects/samples to arms (simple, blocked, stratified, or cluster)
  • Removing nuisance variation by blocking or stratification
  • Designing multi-factor experiments: full or fractional factorial, screening designs
  • Optimizing a response over continuous factors (response-surface designs)
  • Within-subject / repeated-measures, crossover, split-plot, or Latin-square designs
  • Cluster- or group-randomized designs (sites, clinics, classrooms, litters)
  • Deciding the number and level of replicates and avoiding pseudoreplication
  • Sequential, group-sequential, or adaptive designs with interim analyses
  • Laying out plates/batches and randomizing run order to defeat drift

Installation

uv venv --python 3.13 .venv-design
uv pip install --python .venv-design/bin/python "numpy==2.5.3" "pandas==3.0.6" "pydoe==1.5.0"

pyDOE3 was archived in May 2026; active development returned to pydoe. The bundled wrappers target pydoe==1.5.0, imported as lowercase pydoe, and return designs in real factor units. All seven DOE wrappers and both script demos were executed with Python 3.13, NumPy 2.5.3, pandas 3.0.6, and SciPy 1.18.1. On Windows, the environment interpreter is .venv-design/Scripts/python.exe. Archive the environment versions and exported schedules: a seed alone does not promise identical output across package or script upgrades.


Choosing a design

Start from the question and the structure of your units, not from a favorite design.

What are you trying to learn?
│
├─ Compare a few predefined conditions (A vs B vs C)?
│   ├─ Units independent, possibly with a known nuisance factor (day, batch, site)?
│   │     → Completely randomized (no nuisance) or RANDOMIZED BLOCK design.
│   ├─ Each unit can receive every condition in sequence (washout possible)?
│   │     → CROSSOVER / repeated-measures design (watch carry-over and correlation).
│   └─ You can only randomize groups, not individuals (schools, clinics)?
│         → CLUSTER-randomized design (account for clustering; see pseudoreplication).
│
├─ Screen MANY factors (5+) to find the few that matter?
│     → FRACTIONAL FACTORIAL or PLACKETT-BURMAN screening design.
│
├─ Quantify main effects AND interactions among a handful of factors?
│     → FULL 2^k FACTORIAL design.
│
├─ Find the settings that OPTIMIZE a response (curvature matters)?
│     → RESPONSE-SURFACE design: central composite or Box-Behnken.
│
└─ Explore a simulation/computer model over a continuous space?
      → SPACE-FILLING design: Latin hypercube.

Detailed guidance per branch:

  • Randomization, blocking, stratification, controls → references/randomization_and_blocking.md
  • Factorial, fractional-factorial, screening, response-surface, DOE concepts (aliasing, resolution) → references/factorial_and_doe.md

…

FAQ

What is randomization in an experiment?

It's the act of assigning treatments or groups randomly, like flipping a coin, so that unknown factors don't influence the results, allowing for conclusions about cause and effect.

What is replication and why is it important?

Replication means repeating the experiment or measurement on independent units. This is crucial for estimating the natural variability in the data and ensuring observed effects aren't just by chance.

What is blocking?

It's grouping similar units (e.g., patients from the same hospital or samples from the same batch) and then randomizing within those groups. This helps remove unwanted variation from these groups from the final result, making the main effect clearer.

Details

Original description by the author

Designs experiments and studies BEFORE data is collected — choosing a design, randomizing, blocking, and laying out treatment combinations so results are interpretable. Use whenever someone is planning a study, asks how to assign subjects/samples to groups, mentions randomization, blocking, stratification, controls, factorial or fractional-factorial designs, design of experiments (DOE), screening

repo: K-Dense-AI/scientific-agent-skills

Popularity

GitHub stars
51k
Ranking position
#1866
License
MIT
Updated
10/15/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills