[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7165HF6FPJR7BBYMSX4X2PV":3,"skill-same:01M7165HF6FPJR7BBYMSX4X2PV":108},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":28,"publishedAt":49,"linkOnly":50,"markdownContent":51,"markdownBody":52,"frontMatter":53,"refName":60,"commitSha":61,"skillDirectory":62,"forksCount":14,"repositoryHtmlUrl":63,"repositoryHomepageUrl":6,"ownerHtmlUrl":64,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":65,"install":66,"resources":79},"01M7165HF6FPJR7BBYMSX4X2PV","experimental-design",null,"Design experiments and studies BEFORE data is collected — choosing a design, randomizing, blocking, and laying out treatment combinations so the results will actually be interpretable. Use whenever someone is planning a study, asks how to assign subjects\u002Fsamples to groups, mentions randomization, blocking, stratification, controls, factorial or fractional-factorial designs, design of experiments (DOE), screening many factors, response-surface optimization, crossover or repeated-measures or split-plot designs, cluster\u002Fgroup randomization, Latin squares, plate layouts, batch\u002Frun-order effects, replication vs. pseudoreplication, or sequential\u002Fadaptive\u002Fgroup-sequential designs. Trigger this even for informal phrasings like \"how should I set up this experiment\", \"how do I avoid confounding\", \"what's the best way to test these 6 factors\", or \"assign these mice to conditions\". For computing the sample size or power once the design is chosen, use statistical-power; for analyzing data already collected, use statistical-analysis.","fadrienne\u002FMyGitHub","fadrienne","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F197874571?v=4","01M6X64V8VWCRSMFZ4EPS2BWXG","Francesca Adrienne","01M6X64VD5MW4F9PHDWQKS7ZAF",0,"MIT","https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fscientific-agent-skills\u002Fskills\u002Fexperimental-design\u002FSKILL.md",[18,23],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000015","视觉设计","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":26,"taxonomyTypeDesc":27},"01JBSEEDCAT000000000000032","设计师","PROFESSION","适用职业",[29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],"experimental design","design","write","read","scripts","run","how","sample","batch","analysis","Bash","effects","analyzing data","uv","how to","design of experiments","up","power","pandas","SET","2026-11-10 10:12:30",false,"---\nname: experimental-design\ndescription: Design experiments and studies BEFORE data is collected — choosing a design, randomizing, blocking, and laying out treatment combinations so the results will actually be interpretable. Use whenever someone is planning a study, asks how to assign subjects\u002Fsamples to groups, mentions randomization, blocking, stratification, controls, factorial or fractional-factorial designs, design of experiments (DOE), screening many factors, response-surface optimization, crossover or repeated-measures or split-plot designs, cluster\u002Fgroup randomization, Latin squares, plate layouts, batch\u002Frun-order effects, replication vs. pseudoreplication, or sequential\u002Fadaptive\u002Fgroup-sequential designs. Trigger this even for informal phrasings like \"how should I set up this experiment\", \"how do I avoid confounding\", \"what's the best way to test these 6 factors\", or \"assign these mice to conditions\". For computing the sample size or power once the design is chosen, use statistical-power; for analyzing data already collected, use statistical-analysis.\nallowed-tools: Read Write Edit Bash\ncompatibility: Requires Python >=3.10. Scripts use numpy, pandas, and pyDOE3 (DOE matrices). Install with uv as shown below.\nlicense: MIT license\nmetadata: {\"version\": \"1.0\", \"skill-author\": \"K-Dense Inc.\"}\n---\n\n# Experimental Design\n\n## Overview\n\nThe 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.\n\nThe three ideas behind almost every good design (Fisher's principles):\n- **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.\n- **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.\n- **Blocking \u002F 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.\n\nThis 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.\n\n## When to Use This Skill\n\n- Planning any comparative experiment or trial and deciding how to assign units\n- Randomizing subjects\u002Fsamples to arms (simple, blocked, stratified, or cluster)\n- Removing nuisance variation by blocking or stratification\n- Designing multi-factor experiments: full or fractional factorial, screening designs\n- Optimizing a response over continuous factors (response-surface designs)\n- Within-subject \u002F repeated-measures, crossover, split-plot, or Latin-square designs\n- Cluster- or group-randomized designs (sites, clinics, classrooms, litters)\n- Deciding the number and level of replicates and avoiding pseudoreplication\n- Sequential, group-sequential, or adaptive designs with interim analyses\n- Laying out plates\u002Fbatches and randomizing run order to defeat drift\n\n## Installation\n\n```bash\nuv pip install \"numpy>=1.26\" \"pandas>=2.0\" pyDOE3\n```\n\n`pyDOE3` is the maintained successor to pyDOE\u002FpyDOE2 and supplies factorial,\nfractional-factorial, Plackett-Burman, central-composite, Box-Behnken, and\nLatin-hypercube generators. The bundled scripts wrap it to return designs in real\nfactor units with named columns and randomized run order.\n\n---\n\n## Choosing a design\n\nStart from the question and the structure of your units, not from a favorite design.\n\n```\nWhat are you trying to learn?\n│\n├─ Compare a few predefined conditions (A vs B vs C)?\n│   ├─ Units independent, possibly with a known nuisance factor (day, batch, site)?\n│   │     → Completely randomized (no nuisance) or RANDOMIZED BLOCK design.\n│   ├─ Each unit can receive every condition in sequence (washout possible)?\n│   │     → CROSSOVER \u002F repeated-measures design (more power, watch carry-over).\n│   └─ You can only randomize groups, not individuals (schools, clinics)?\n│         → CLUSTER-randomized design (analyze at the cluster level; see pseudoreplication).\n│\n├─ Screen MANY factors (5+) to find the few that matter?\n│     → FRACTIONAL FACTORIAL or PLACKETT-BURMAN screening design.\n│\n├─ Quantify main effects AND interactions among a handful of factors?\n│     → FULL 2^k FACTORIAL design.\n│\n├─ Find the settings that OPTIMIZE a response (curvature matters)?\n│     → RESPONSE-SURFACE design: central composite or Box-Behnken.\n│\n└─ Explore a simulation\u002Fcomputer model over a continuous space?\n      → SPACE-FILLING design: Latin hypercube.\n```\n\nDetailed guidance per branch:\n- **Randomization, blocking, stratification, controls** → `references\u002Frandomization_and_blocking.md`\n- **Factorial, fractional-factorial, screening, response-surface, DOE concepts (aliasing, resolution)** → `references\u002Ffactorial_and_doe.md`\n- **Crossover, repeated-measures, split-plot, Latin-square, cluster, nested designs** → `references\u002Fdesign_types.md`\n- **Sequential, group-sequential, and adaptive designs (interim analyses)** → `references\u002Fsequential_and_adaptive.md`\n\n---\n\n## Generating the design\n\nTwo scripts produce ready-to-use, reproducible layouts. Run them from the skill's\n`scripts\u002F` directory or add it to `sys.path`. Everything is seeded so the exact\nschedule can be archived and regenerated — a requirement for trial registration\nand good lab practice.\n\n### Randomization \u002F allocation schedules — `scripts\u002Frandomization.py`\n\n```python\nfrom randomization import (\n    simple_randomization, block_randomization,\n    stratified_block_randomization, cluster_randomization,\n    assign_factorial_runs, arm_balance,\n)\n\n# Permuted blocks keep the arms balanced throughout enrollment (use for n \u003C ~100\n# or sequential intake — simple randomization can drift out of balance with small n)\nsched = block_randomization(n=60, arms=[\"treatment\", \"control\"], seed=42)\n\n# Balance a prognostic variable across arms by randomizing within each stratum\nsched = stratified_block_randomization({\"siteA\": 30, \"siteB\": 30},\n                                       arms=[\"drug\", \"placebo\"], ratio=(2, 1), seed=42)\n\n# Randomize whole clusters, not individuals (the cluster is the unit)\nsched = cluster_randomization([\"clinic1\", \"clinic2\", \"clinic3\", \"clinic4\"], seed=42)\n\narm_balance(sched)            # sanity-check the counts per arm\nsched.to_csv(\"allocation_schedule.csv\", index=False)\n```\n\nChoosing among them: **simple** is fine for large n but can produce imbalance with\nsmall n; **block** guarantees balance throughout; **stratified block** additionally\nbalances a known prognostic factor; **cluster** is mandatory when the intervention\nis delivered at a group level. See `references\u002Frandomization_and_blocking.md`.\n\n### DOE matrices — `scripts\u002Fdoe_designs.py`\n\n```python\nfrom doe_designs import (\n    full_factorial, two_level_factorial, fractional_factorial,\n    plackett_burman, central_composite, box_behnken, latin_hypercube,\n)\n\n# Factors as real-world (low, high) ranges -> design comes back in real units\nfactors = {\"temp_C\": (20, 60), \"conc_mM\": (1, 10), \"pH\": (6, 8)}\n\n# Full 2^3: all main effects + all interactions (8 runs), run order randomized\ndesign = two_level_factorial(factors, seed=42)\n\n# Screen 7 factors cheaply (main effects only)\nmany = {f\"factor_{i}\": (0, 1) for i in range(7)}\ndesign = plackett_burman(many, seed=42)\n\n# Optimize over 2 factors with curvature (response-surface)\ndesign = central_composite({\"temp_C\": (20, 60), \"conc_mM\": (1, 10)}, seed=42)\n\ndesign.to_csv(\"experimental_runs.csv\", index=False)\n```\n\nRun order is randomized by default so factors aren't confounded with time\u002Fdrift\n(machine warm-up, reagent aging). See `references\u002Ffactorial_and_doe.md` for picking\ngenerators, reading the alias structure, and choosing resolution.\n\n---\n\n## The mistakes that ruin studies\n\nThese are structural — they can't be fixed in analysis, only in design.\n\n1. **Pseudoreplication.** Treating repeated measurements of one unit as independent\n   replicates: 3 mice with 100 cells each is n = 3 (mice), not n = 300 (cells), for\n   any treatment applied to the mouse. The replicate must be at the level the\n   treatment is randomized. This single error invalidates a large share of published\n   experiments. Randomize and replicate at the right level; analyze with the nesting\n   respected (mixed model). See `references\u002Fdesign_types.md`.\n2. **Confounding by a nuisance variable.** Running all treatment samples on Monday\n   and all controls on Tuesday confounds treatment with day. Randomize across, or\n   block on, every nuisance factor you can name (batch, day, plate, technician,\n   instrument, position).\n3. **No or broken randomization.** Convenience assignment (first-come → treatment)\n   lets confounders sneak in. Use a seeded schedule and follow it.\n4. **No proper control.** Without a concurrent control (and, where relevant, a\n   vehicle\u002Fsham and blinding), you can't separate the treatment effect from time,\n   placebo, or handling effects.\n5. **Batch effects mistaken for biology.** In omics especially, process samples in a\n   randomized\u002Fblocked order across batches; never let batch align with the condition.\n6. **Edge\u002Fposition effects on plates.** Evaporation and thermal gradients make plate\n   edges differ. Randomize or block sample positions; don't put all controls in\n   column 1.\n7. **Aliasing ignored in fractional designs.** A low-resolution fractional factorial\n   confounds main effects with interactions; know your alias structure before\n   concluding a factor \"has no effect.\"\n8. **Optimizing without curvature.** A two-level factorial can't detect a curved\n   response; you'll miss an interior optimum. Use a response-surface design.\n\n---\n\n## Workflow\n\n1. **State the question, the unit, and the response.** What is randomized? What is\n   measured? At what level is a true independent replicate? This determines everything.\n2. **List nuisance factors** (batch, day, site, operator, position) — plan to block,\n   stratify, or randomize across each.\n3. **Pick the design** using the decision tree and reference files.\n4. **Decide replication** at the correct level (and get n from the\n   **statistical-power** skill for the chosen design).\n5. **Generate the layout** with `randomization.py` \u002F `doe_designs.py`, seeded.\n6. **Randomize run\u002Fprocessing order** and plate\u002Fbatch positions.\n7. **Document** the design, seed, and schedule (pre-register if possible) so the\n   analysis is confirmatory and the layout is auditable.\n8. **Match the analysis to the design** — blocks, strata, clusters, and nesting must\n   appear in the model (hand off to **statistical-analysis** \u002F **statsmodels**).\n\n---\n\n## Resources\n\n### Scripts\n- `scripts\u002Frandomization.py` — seeded allocation schedules: `simple_randomization`,\n  `block_randomization`, `stratified_block_randomization`, `cluster_randomization`,\n  `assign_factorial_runs`, `arm_balance`.\n- `scripts\u002Fdoe_designs.py` — DOE matrices in real units: `full_factorial`,\n  `two_level_factorial`, `fractional_factorial`, `plackett_burman`,\n  `central_composite`, `box_behnken`, `latin_hypercube`.\n\n### References\n- `references\u002Frandomization_and_blocking.md` — randomization methods, blocking,\n  stratification, controls, blinding, batch\u002Fplate layout.\n- `references\u002Ffactorial_and_doe.md` — factorial and fractional designs, resolution\n  and aliasing, screening, and response-surface methodology.\n- `references\u002Fdesign_types.md` — completely randomized, randomized block, crossover,\n  repeated-measures, split-plot, Latin-square, cluster, and nested designs; the\n  pseudoreplication problem in depth.\n- `references\u002Fsequential_and_adaptive.md` — group-sequential designs, alpha spending,\n  interim stopping, and adaptive sample-size re-estimation.\n\n### Related skills\n- **statistical-power** — required sample size \u002F power for the design you've chosen.\n- **statistical-analysis** — running and reporting the analysis after collection.\n- **statsmodels** \u002F **pymc** — fitting the models the design implies.\n\n### Key references\n- Fisher, R. A. (1935). *The Design of Experiments*.\n- Montgomery, D. C. (2019). *Design and Analysis of Experiments* (10th ed.).\n- Hurlbert, S. H. (1984). Pseudoreplication and the design of ecological field\n  experiments. *Ecological Monographs*, 54(2), 187–211.\n- Lazic, S. E. (2016). *Experimental Design for Laboratory Biologists*.\n","# Experimental Design\n\n## Overview\n\nThe 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.\n\nThe three ideas behind almost every good design (Fisher's principles):\n- **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.\n- **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.\n- **Blocking \u002F 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.\n\nThis 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.\n\n## When to Use This Skill\n\n- Planning any comparative experiment or trial and deciding how to assign units\n- Randomizing subjects\u002Fsamples to arms (simple, blocked, stratified, or cluster)\n- Removing nuisance variation by blocking or stratification\n- Designing multi-factor experiments: full or fractional factorial, screening designs\n- Optimizing a response over continuous factors (response-surface designs)\n- Within-subject \u002F repeated-measures, crossover, split-plot, or Latin-square designs\n- Cluster- or group-randomized designs (sites, clinics, classrooms, litters)\n- Deciding the number and level of replicates and avoiding pseudoreplication\n- Sequential, group-sequential, or adaptive designs with interim analyses\n- Laying out plates\u002Fbatches and randomizing run order to defeat drift\n\n## Installation\n\n```bash\nuv pip install \"numpy>=1.26\" \"pandas>=2.0\" pyDOE3\n```\n\n`pyDOE3` is the maintained successor to pyDOE\u002FpyDOE2 and supplies factorial,\nfractional-factorial, Plackett-Burman, central-composite, Box-Behnken, and\nLatin-hypercube generators. The bundled scripts wrap it to return designs in real\nfactor units with named columns and randomized run order.\n\n---\n\n## Choosing a design\n\nStart from the question and the structure of your units, not from a favorite design.\n\n```\nWhat are you trying to learn?\n│\n├─ Compare a few predefined conditions (A vs B vs C)?\n│   ├─ Units independent, possibly with a known nuisance factor (day, batch, site)?\n│   │     → Completely randomized (no nuisance) or RANDOMIZED BLOCK design.\n│   ├─ Each unit can receive every condition in sequence (washout possible)?\n│   │     → CROSSOVER \u002F repeated-measures design (more power, watch carry-over).\n│   └─ You can only randomize groups, not individuals (schools, clinics)?\n│         → CLUSTER-randomized design (analyze at the cluster level; see pseudoreplication).\n│\n├─ Screen MANY factors (5+) to find the few that matter?\n│     → FRACTIONAL FACTORIAL or PLACKETT-BURMAN screening design.\n│\n├─ Quantify main effects AND interactions among a handful of factors?\n│     → FULL 2^k FACTORIAL design.\n│\n├─ Find the settings that OPTIMIZE a response (curvature matters)?\n│     → RESPONSE-SURFACE design: central composite or Box-Behnken.\n│\n└─ Explore a simulation\u002Fcomputer model over a continuous space?\n      → SPACE-FILLING design: Latin hypercube.\n```\n\nDetailed guidance per branch:\n- **Randomization, blocking, stratification, controls** → `references\u002Frandomization_and_blocking.md`\n- **Factorial, fractional-factorial, screening, response-surface, DOE concepts (aliasing, resolution)** → `references\u002Ffactorial_and_doe.md`\n- **Crossover, repeated-measures, split-plot, Latin-square, cluster, nested designs** → `references\u002Fdesign_types.md`\n- **Sequential, group-sequential, and adaptive designs (interim analyses)** → `references\u002Fsequential_and_adaptive.md`\n\n---\n\n## Generating the design\n\nTwo scripts produce ready-to-use, reproducible layouts. Run them from the skill's\n`scripts\u002F` directory or add it to `sys.path`. Everything is seeded so the exact\nschedule can be archived and regenerated — a requirement for trial registration\nand good lab practice.\n\n### Randomization \u002F allocation schedules — `scripts\u002Frandomization.py`\n\n```python\nfrom randomization import (\n    simple_randomization, block_randomization,\n    stratified_block_randomization, cluster_randomization,\n    assign_factorial_runs, arm_balance,\n)\n\n# Permuted blocks keep the arms balanced throughout enrollment (use for n \u003C ~100\n# or sequential intake — simple randomization can drift out of balance with small n)\nsched = block_randomization(n=60, arms=[\"treatment\", \"control\"], seed=42)\n\n# Balance a prognostic variable across arms by randomizing within each stratum\nsched = stratified_block_randomization({\"siteA\": 30, \"siteB\": 30},\n                                       arms=[\"drug\", \"placebo\"], ratio=(2, 1), seed=42)\n\n# Randomize whole clusters, not individuals (the cluster is the unit)\nsched = cluster_randomization([\"clinic1\", \"clinic2\", \"clinic3\", \"clinic4\"], seed=42)\n\narm_balance(sched)            # sanity-check the counts per arm\nsched.to_csv(\"allocation_schedule.csv\", index=False)\n```\n\nChoosing among them: **simple** is fine for large n but can produce imbalance with\nsmall n; **block** guarantees balance throughout; **stratified block** additionally\nbalances a known prognostic factor; **cluster** is mandatory when the intervention\nis delivered at a group level. See `references\u002Frandomization_and_blocking.md`.\n\n### DOE matrices — `scripts\u002Fdoe_designs.py`\n\n```python\nfrom doe_designs import (\n    full_factorial, two_level_factorial, fractional_factorial,\n    plackett_burman, central_composite, box_behnken, latin_hypercube,\n)\n\n# Factors as real-world (low, high) ranges -> design comes back in real units\nfactors = {\"temp_C\": (20, 60), \"conc_mM\": (1, 10), \"pH\": (6, 8)}\n\n# Full 2^3: all main effects + all interactions (8 runs), run order randomized\ndesign = two_level_factorial(factors, seed=42)\n\n# Screen 7 factors cheaply (main effects only)\nmany = {f\"factor_{i}\": (0, 1) for i in range(7)}\ndesign = plackett_burman(many, seed=42)\n\n# Optimize over 2 factors with curvature (response-surface)\ndesign = central_composite({\"temp_C\": (20, 60), \"conc_mM\": (1, 10)}, seed=42)\n\ndesign.to_csv(\"experimental_runs.csv\", index=False)\n```\n\nRun order is randomized by default so factors aren't confounded with time\u002Fdrift\n(machine warm-up, reagent aging). See `references\u002Ffactorial_and_doe.md` for picking\ngenerators, reading the alias structure, and choosing resolution.\n\n---\n\n## The mistakes that ruin studies\n\nThese are structural — they can't be fixed in analysis, only in design.\n\n1. **Pseudoreplication.** Treating repeated measurements of one unit as independent\n   replicates: 3 mice with 100 cells each is n = 3 (mice), not n = 300 (cells), for\n   any treatment applied to the mouse. The replicate must be at the level the\n   treatment is randomized. This single error invalidates a large share of published\n   experiments. Randomize and replicate at the right level; analyze with the nesting\n   respected (mixed model). See `references\u002Fdesign_types.md`.\n2. **Confounding by a nuisance variable.** Running all treatment samples on Monday\n   and all controls on Tuesday confounds treatment with day. Randomize across, or\n   block on, every nuisance factor you can name (batch, day, plate, technician,\n   instrument, position).\n3. **No or broken randomization.** Convenience assignment (first-come → treatment)\n   lets confounders sneak in. Use a seeded schedule and follow it.\n4. **No proper control.** Without a concurrent control (and, where relevant, a\n   vehicle\u002Fsham and blinding), you can't separate the treatment effect from time,\n   placebo, or handling effects.\n5. **Batch effects mistaken for biology.** In omics especially, process samples in a\n   randomized\u002Fblocked order across batches; never let batch align with the condition.\n6. **Edge\u002Fposition effects on plates.** Evaporation and thermal gradients make plate\n   edges differ. Randomize or block sample positions; don't put all controls in\n   column 1.\n7. **Aliasing ignored in fractional designs.** A low-resolution fractional factorial\n   confounds main effects with interactions; know your alias structure before\n   concluding a factor \"has no effect.\"\n8. **Optimizing without curvature.** A two-level factorial can't detect a curved\n   response; you'll miss an interior optimum. Use a response-surface design.\n\n---\n\n## Workflow\n\n1. **State the question, the unit, and the response.** What is randomized? What is\n   measured? At what level is a true independent replicate? This determines everything.\n2. **List nuisance factors** (batch, day, site, operator, position) — plan to block,\n   stratify, or randomize across each.\n3. **Pick the design** using the decision tree and reference files.\n4. **Decide replication** at the correct level (and get n from the\n   **statistical-power** skill for the chosen design).\n5. **Generate the layout** with `randomization.py` \u002F `doe_designs.py`, seeded.\n6. **Randomize run\u002Fprocessing order** and plate\u002Fbatch positions.\n7. **Document** the design, seed, and schedule (pre-register if possible) so the\n   analysis is confirmatory and the layout is auditable.\n8. **Match the analysis to the design** — blocks, strata, clusters, and nesting must\n   appear in the model (hand off to **statistical-analysis** \u002F **statsmodels**).\n\n---\n\n## Resources\n\n### Scripts\n- `scripts\u002Frandomization.py` — seeded allocation schedules: `simple_randomization`,\n  `block_randomization`, `stratified_block_randomization`, `cluster_randomization`,\n  `assign_factorial_runs`, `arm_balance`.\n- `scripts\u002Fdoe_designs.py` — DOE matrices in real units: `full_factorial`,\n  `two_level_factorial`, `fractional_factorial`, `plackett_burman`,\n  `central_composite`, `box_behnken`, `latin_hypercube`.\n\n### References\n- `references\u002Frandomization_and_blocking.md` — randomization methods, blocking,\n  stratification, controls, blinding, batch\u002Fplate layout.\n- `references\u002Ffactorial_and_doe.md` — factorial and fractional designs, resolution\n  and aliasing, screening, and response-surface methodology.\n- `references\u002Fdesign_types.md` — completely randomized, randomized block, crossover,\n  repeated-measures, split-plot, Latin-square, cluster, and nested designs; the\n  pseudoreplication problem in depth.\n- `references\u002Fsequential_and_adaptive.md` — group-sequential designs, alpha spending,\n  interim stopping, and adaptive sample-size re-estimation.\n\n### Related skills\n- **statistical-power** — required sample size \u002F power for the design you've chosen.\n- **statistical-analysis** — running and reporting the analysis after collection.\n- **statsmodels** \u002F **pymc** — fitting the models the design implies.\n\n### Key references\n- Fisher, R. A. (1935). *The Design of Experiments*.\n- Montgomery, D. C. (2019). *Design and Analysis of Experiments* (10th ed.).\n- Hurlbert, S. H. (1984). Pseudoreplication and the design of ecological field\n  experiments. *Ecological Monographs*, 54(2), 187–211.\n- Lazic, S. E. (2016). *Experimental Design for Laboratory Biologists*.\n",{"name":5,"license":54,"metadata":55,"description":7,"allowed-tools":58,"compatibility":59},"MIT license",{"version":56,"skill-author":57},"1.0","K-Dense Inc.","Read Write Edit Bash","Requires Python >=3.10. Scripts use numpy, pandas, and pyDOE3 (DOE matrices). Install with uv as shown below.","main","4aa39efd1cdab0b4657ecee16c92a92011a5b10f","scientific-agent-skills\u002Fskills\u002Fexperimental-design","https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub","https:\u002F\u002Fgithub.com\u002Ffadrienne","2026-10-28 00:43:09",{"source":8,"skillName":5,"commands":67,"prompt":77,"zipAvailable":78},[68,71,74],{"tool":69,"command":70},"npx","npx skills add fadrienne\u002FMyGitHub --skill experimental-design",{"tool":72,"command":73},"bunx","bunx skills add fadrienne\u002FMyGitHub --skill experimental-design",{"tool":75,"command":76},"pnpm","pnpm dlx skills add fadrienne\u002FMyGitHub --skill experimental-design","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fscientific-agent-skills\u002Fskills\u002Fexperimental-design\u002FSKILL.md",true,[80,86,90,94,98,104],{"path":81,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":84,"sourceHtmlUrl":85},"references\u002Fdesign_types.md","REFERENCE","参考文档",7323,"https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fscientific-agent-skills\u002Fskills\u002Fexperimental-design\u002Freferences\u002Fdesign_types.md",{"path":87,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":88,"sourceHtmlUrl":89},"references\u002Ffactorial_and_doe.md",7073,"https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fscientific-agent-skills\u002Fskills\u002Fexperimental-design\u002Freferences\u002Ffactorial_and_doe.md",{"path":91,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":92,"sourceHtmlUrl":93},"references\u002Frandomization_and_blocking.md",6360,"https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fscientific-agent-skills\u002Fskills\u002Fexperimental-design\u002Freferences\u002Frandomization_and_blocking.md",{"path":95,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":96,"sourceHtmlUrl":97},"references\u002Fsequential_and_adaptive.md",5488,"https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fscientific-agent-skills\u002Fskills\u002Fexperimental-design\u002Freferences\u002Fsequential_and_adaptive.md",{"path":99,"resourceType":100,"resourceTypeDesc":101,"sizeBytes":102,"sourceHtmlUrl":103},"scripts\u002Fdoe_designs.py","SCRIPT","脚本",7762,"https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fscientific-agent-skills\u002Fskills\u002Fexperimental-design\u002Fscripts\u002Fdoe_designs.py",{"path":105,"resourceType":100,"resourceTypeDesc":101,"sizeBytes":106,"sourceHtmlUrl":107},"scripts\u002Frandomization.py",7046,"https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fscientific-agent-skills\u002Fskills\u002Fexperimental-design\u002Fscripts\u002Frandomization.py",[109,133,160,191,218,242],{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":118,"publishedAt":49},"01M7167B28PK20HP7R7ZED2DY0","statistical-power","Sample size calculation, power analysis, and effect size conversion for scientific studies. Use BEFORE data collection (a priori) to determine required N, or after (post-hoc) to compute achieved power. Covers parametric tests (t-test, ANOVA, chi-square, proportions, correlation, regression), simulation-based power for complex\u002Fclustered\u002Fnested designs, and power curves. Use this skill when someone asks 'how many samples do I need', 'what is my power', 'what effect size can I detect', or any variant. Pairs with \u002Fexperimental-design (choose design first, then compute power) and \u002Fstatistical-analysis (analyze data after collection).","https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fscientific-agent-skills\u002Fskills\u002Fstatistical-power\u002FSKILL.md",[115],{"categoryNo":116,"categoryName":117,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[46,119,120,121,122,123,30,42,124,39,125,38,126,127,128,129,130,131,132,36],"statistical power","effect","scipy","regression","choose","when","collection","calculation","ANOVA","conversion","analyze","t-test","chi-square","simulation",{"skillNo":134,"name":135,"nameZh":6,"description":136,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":137,"categories":138,"keywords":142,"publishedAt":49},"01M71677EBCM8EPCE9BZCK8505","statistical-analysis","Guided statistical analysis with test selection and reporting. Use when you need help choosing appropriate tests for your data, assumption checking, power analysis, and APA-formatted results. Best for academic research reporting, test selection guidance. For implementing specific models programmatically use statsmodels.","https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fscientific-agent-skills\u002Fskills\u002Fstatistical-analysis\u002FSKILL.md",[139],{"categoryNo":140,"categoryName":141,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量",[38,143,46,144,145,146,124,147,148,149,150,151,152,153,154,155,156,157,158,159],"statistical analysis","academic research","implementing","selection","you","reporting","data","for","tests","use","with","test","research","results","statsmodels","models","help",{"skillNo":161,"name":162,"nameZh":6,"description":163,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":164,"categories":165,"keywords":173,"publishedAt":49},"01M71673R93XAHFH81DBNVNG7H","scientific-writing","Core skill for the deep research and writing tool. Write scientific manuscripts in full paragraphs (never bullet points). Use two-stage process with (1) section outlines with key points using research-lookup then (2) convert to flowing prose. IMRAD structure, citations (APA\u002FAMA\u002FVancouver), figures\u002Ftables, reporting guidelines (CONSORT\u002FSTROBE\u002FPRISMA), for research papers and journal submissions.","https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fscientific-agent-skills\u002Fskills\u002Fscientific-writing\u002FSKILL.md",[166,169,170],{"categoryNo":167,"categoryName":168,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":116,"categoryName":117,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":171,"categoryName":172,"taxonomyType":26,"taxonomyTypeDesc":27},"01JBSEEDCAT000000000000036","内容创作者",[174,175,176,177,178,179,180,181,182,183,39,184,185,186,187,188,189,32,148,190],"writing","scientific","scientific writing","Citations","deep","deep research","never","papers","journal","false","api","prisma","structure","openrouter","Outlines","core skill","features",{"skillNo":192,"name":193,"nameZh":6,"description":194,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":195,"categories":196,"keywords":201,"publishedAt":49},"01M7166ZPKXBF4EBPHVTJPQBB1","scientific-visualization","Meta-skill for publication-ready figures. Use when creating journal submission figures requiring multi-panel layouts, significance annotations, error bars, colorblind-safe palettes, and specific journal formatting (Nature, Science, Cell). Orchestrates matplotlib\u002Fseaborn\u002Fplotly with publication styles. For quick exploration use seaborn or plotly directly.","https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fscientific-agent-skills\u002Fskills\u002Fscientific-visualization\u002FSKILL.md",[197,200],{"categoryNo":198,"categoryName":199,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000013","分析与可视化",{"categoryNo":116,"categoryName":117,"taxonomyType":21,"taxonomyTypeDesc":22},[202,175,203,204,205,206,207,208,209,182,124,210,211,212,213,214,215,216,150,217],"visualization","scientific visualization","error","ready","quick","exploration","meta-skill","Meta","safe","plotly","annotations","formatting","Publication","figures","panel","submission",{"skillNo":219,"name":220,"nameZh":6,"description":221,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":222,"categories":223,"keywords":230,"publishedAt":49},"01M7166VXJWQSSC3RQZP60WBGR","research-code","Debug, profile, review, and restructure Python research and analysis code. Use when analysis scripts crash, produce wrong results, run too slowly, or need a correctness review. Covers: reading tracebacks and diagnosing root causes, hypothesis-driven debugging, reviewing code for common statistical\u002Fnumerical errors, profiling data pipelines, improving reproducibility (seeds, environments, determinism), and structuring analysis scripts for sharing. Distinct from \u002Fexploratory-data-analysis (which understands data) and \u002Fstatistical-analysis (which chooses and runs tests) — this skill focuses on the code itself.","https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fscientific-agent-skills\u002Fskills\u002Fresearch-code\u002FSKILL.md",[224,227],{"categoryNo":225,"categoryName":226,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000021","资料检索与研究",{"categoryNo":228,"categoryName":229,"taxonomyType":26,"taxonomyTypeDesc":27},"01JBSEEDCAT000000000000030","开发工程师",[231,232,155,233,234,235,236,42,237,124,39,38,238,239,240,34,33,241,32,31],"code","research code","which","memory","data-analysis","errors","debugging","common","review","data pipelines","line",{"skillNo":243,"name":244,"nameZh":6,"description":245,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":246,"licenseFileUrl":6,"sourceHtmlUrl":247,"categories":248,"keywords":255,"publishedAt":49},"01M7166CF5HSR7SVZYZFWTDX55","markdown-mermaid-writing","Comprehensive markdown and Mermaid diagram writing skill. Use when creating any scientific document, report, analysis, or visualization. Establishes text-based diagrams as the default documentation standard with full style guides (markdown + mermaid), 24 diagram type references, and 9 document templates.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fscientific-agent-skills\u002Fskills\u002Fmarkdown-mermaid-writing\u002FSKILL.md",[249,252,253,254],{"categoryNo":250,"categoryName":251,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000002","文档处理",{"categoryNo":167,"categoryName":168,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":116,"categoryName":117,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":171,"categoryName":172,"taxonomyType":26,"taxonomyTypeDesc":27},[174,256,257,258,259,260,202,261,262,124,39,38,263,264,265,266,267,268,175,32],"markdown mermaid writing","mermaid","markdown","community","diagrams","project","default","team","guides","text","documentation","references","diagram"]