Skip to content
Back to skills

Experiment Methodology

ASecurity

Use when designing experiments, calculating sample sizes, formulating hypotheses, or interpreting A/B test results

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 5, 2026
ai-agentsrailsgitdatabase

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned October 5, 2026

npx -y skills add mariomile/builder-os --skill experiment-methodology --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Experiment Methodology?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Experiment Methodology
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mariomile-experiment-methodology/badge)](https://www.skillsdirectory.com/skills/mariomile-experiment-methodology)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: experiment-methodology
description: "Use when designing experiments, calculating sample sizes, formulating hypotheses, or interpreting A/B test results"
---

# Experiment Methodology

Follow `../../references/operating-modes.md` for standalone versus lifecycle work. Design and analysis below are analytical modes, separate from that choice. Use only the steps the question needs: a sample-size request does not require a full preregistration.

Load `evidence-ledger` when recording claims, the relevant shapes in `references/analytics-contract.md` when querying, and `references/capability-map.md` before a new data source. Skill-local resources resolve relative to this `SKILL.md`:

- [Calculations and readout](references/proportions.md) for sample size and significance.
- [Design reference](references/design.md) for the hypothesis template, metric and randomization specification, runtime rule, worked examples, experiment types and the full common-mistakes list.
- [Output contracts](references/output-contracts.md) when writing the design or the readout.

## Capabilities

| Capability | Used for | Floor when absent |
|-----------|----------|-------------------|
| `analytics.query` | Baseline and results readout | Ask the user for the baseline, tag it, and state that the power calculation inherits its uncertainty |
| `analytics.events` | Whether output and guardrail metrics are emitted | Search the repository for the call sites |
| `db.query` | Outcomes in the application database | Same floor: ask |
| `repo.read` | Flag and assignment code, to verify randomization | Ask how assignment works |
| `files.read` / `files.write` | The pre-registration and the readout | Always present |

Design mode needs nothing connected. Analysis mode needs numbers, and a user pasting two conversion counts is a legitimate source.

## Procedure

A change not yet shipped is **design**; results in hand are **analysis**.

### Design mode

1. **Resolve capabilities and establish the baseline:** the current output-metric rate, tagged. A guessed baseline gives a confidently wrong sample size.
2. **Write the hypothesis** from the template: the change, the metric, the direction, the effect size worth detecting, and the mechanism.
3. **Define the metrics triad:** one preregistered primary (output) outcome, an input indicator when useful, and the applicable guardrails. Without a guardrail the experiment cannot catch a win that breaks something else.
4. **Verify the metrics are instrumented.** An unemitted output metric makes the experiment unreadable: that is the finding, handed to `tracking-standards` before anything ships.
5. **Calculate sample size and runtime** from the baseline, the minimum detectable effect and the traffic, then state the calendar date of the first read.
6. **Pre-register before the experiment starts:** what ships it, what kills it, whether a preregistered sequential or blinded extension is permitted, its maximum sample/duration, and who decides.

### Analysis mode

1. **Collect the results** for every metric, per variant, each tagged.
2. **Check validity before significance:** full planned duration covering whole weeks, the intended split, no mid-flight instrumentation change.
3. **Compute significance** with the preselected method in `references/proportions.md`, on the one pre-registered primary metric.
4. **Read the guardrails.** A guardrail breach overrides an output win.
5. **Apply the pre-registered decision rule**, and say plainly when the result is inconclusive. Nonsignificance does not establish zero or a small effect: inspect the interval for both meaningful benefit and harm. Never extend a fixed-horizon test merely because its p-value is close to a threshold.
6. **Report**, including what the experiment cannot conclude.

End with `## EXPERIMENT DESIGN COMPLETE` or `## EXPERIMENT ANALYSIS COMPLETE` in its output contract.

## Common Mistakes

| Mistake | Correction |
|---------|------------|
| Mixing pp and relative percent | Convert both to the alternative probability before powering |
| Lookup table disagrees with formula | Generate it from `scripts/proportions.mjs`; regression tests check equality |
| Treating users in one account as independent | Randomize/analyze at the account level or use a clustered method |
| Applying normal tests to zero conversions | Use a suitable exact/rare-event method and state approximation limits |

Files in this skill

  • SKILL.md8.9 KB
  • references/proportions.md4.3 KB
  • scripts/proportions.mjs2.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.