ab-test-analysis
Skill0 starsChanged 6 months agoMITView on GitHub
Analyzes A/B test results with significance testing, confidence intervals, sample ratio mismatch check, guardrail evaluation, and a stakeholder-ready readout. Use when the user mentions A/B test results, experiment readout, test analysis, lift, significance, p-value, treatment vs control, or asks "did the experiment work.
12 other projects use a version of this.
Adopted by
Most recently taken up by
- henrique-simoes/Istaratheir own version, first seen Sep 27, 2026
- chaakresh/claude-skillstheir own version, first seen Sep 7, 2026
- yuusakuri/agent-skillstheir own version, first seen Jul 30, 2026
- xeroc/skillstheir own version, first seen Jul 17, 2026
- shinzoxD/knackboxtheir own version, first seen Jul 10, 2026
- jshsakura/awesome-opencode-skillstheir own version, first seen Jul 8, 2026
Other versions12 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 12
- jshsakura/awesome-opencode-skills★ 29same name
- henrique-simoes/Istara★ 15same name
- shisuidata/ss-data-skills★ 8same name
- risadams/ink-and-agency★ 2same name
- skytiger6724/qwen-skills★ 2same name
- yuusakuri/agent-skills★ 2same name
- miovrag/claude-skills★ 1same name
- sp1e/claude-skills★ 1same name
- xeroc/skills★ 1same name
- chaakresh/claude-skills★ 0same name
2 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository14 other files it gives its agents.
- ab-test-designSkill
- causal-inferenceSkill
- cohort-analysisSkill
- data-quality-auditSkill
- funnel-analysisSkill
- linear-regressionSkill
- logistic-regressionSkill
- metric-definitionSkill
- modular-sql-ctesSkill
- sql-correctness-reviewSkill
- sql-query-reviewSkill
- stakeholder-readoutSkill
- survival-analysisSkill
- warehouse-query-optimizationSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 7 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 10 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
If the experiment is still being planned, use ab-test-design.
- Distinctive: line 30
If pre-registration is missing, flag it loudly in the readout.
- Distinctive: line 35
Verify variant labels match the design
- Distinctive: line 37
Check date range matches the experiment window
- Distinctive: line 43
If p < 0.001, stop. SRM means broken assignment — results are invalid.
- Distinctive: line 134
Peeking: if the user asks for an analysis before planned sample size, refuse to make a ship decision.
- Distinctive: line 136
Multiple primary metrics: if there are more than one, you cannot ship on "any" being significant.
- Distinctive: line 138
Day-of-week effects: if runtime isn't a multiple of 7 days, day-of-week imbalance can bias results.
“Common” is measured: kept by at least 6 in 10 of the 10 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
A/B Test Analysis
When to use this skill
The experiment has finished (or has reached planned sample size) and the user needs to interpret the results. Triggers:
- "Analyze this experiment…"
- "Did the test win?"
- "Was the lift significant?"
- "Write a readout for experiment X"
- "Compare treatment vs control on…"
If the experiment is still being planned, use ab-test-design.
Required inputs
| Input | Format |
| Per-unit assignment data | unit_id, variant, metric_value (or aggregate) |
| Variant labels | Which is control |
| Primary metric definition | From the pre-registration |
| Guardrail metrics | From the pre-registration |
| Test design | Sample size targets, MDE, allocation |
If pre-registration is missing, flag it loudly in the readout. Post-hoc analysis without a pre-reg should be labeled exploratory.
Workflow
- Sanity check the data.
- Verify variant labels match the design
- Confirm there's exactly one record per unit per variant
- Check date range matches the experiment window
- Strip any users who appeared in multiple variants (assignment errors)
- Run Sample Ratio Mismatch (SRM) check.
- Compute observed vs expected ratio
- χ² test against design allocation
- If p < 0.001, stop. SRM means broken assignment — results are invalid.
- Compute primary metric per variant.
- Point estimate
- 95% confidence interval (use bootstrap for ratio metrics)
- Absolute lift and relative lift vs control
- Test significance.
- Proportion: two-proportion z-test
- Mean: Welch's t-test
- Ratio: delta method or bootstrap
- Report p-value AND CI (CI is more useful than p-value alone)
- Evaluate guardrails. Each guardrail gets one of three statuses:
- PASS — within threshold with 95% confidence
- WATCH — point estimate breaches but CI overlaps zero
- FAIL — CI clears the threshold in the wrong direction
- Decision recommendation. Apply this matrix:
| Primary | Guardrails | Recommendation |
| Significant win | All PASS | Ship |
| Significant win | Any WATCH | Ship + monitor the WATCH metric |
| Significant win | Any FAIL | Hold — investigate guardrail tradeoff |
| Not significant, CI excludes MDE | All PASS | No ship — effect smaller than MDE |
| Not significant, CI includes MDE | All PASS | Inconclusive — extend or kill |
| Negative significant | — | Kill the treatment |
- Write the readout using the template below.
Output format
# Experiment Readout: <name>
## TL;DR
**Recommendation:** <Ship | Hold | Kill | Inconclusive>
<Primary metric> changed by <X%> ([<low>, <high>] 95% CI, p=<value>) over <N> days.
## Sample Ratio Mismatch
| Variant | Expected | Observed | Delta |
|---|---|---|---|
| Control | 50.0% | 49.8% | -0.2pp |
| Treatment | 50.0% | 50.2% | +0.2pp |
χ² p-value: <value> — **<PASS|FAIL>**
## Primary metric: <name>
| Variant | N | Value | 95% CI |
|---|---|---|---|
| Control | <N> | <val> | [<low>, <high>] |
| Treatment | <N> | <val> | [<low>, <high>] |
- Absolute lift: <X> ([<low>, <high>])
- Relative lift: <X%> ([<low>, <high>])
- Test: <z-test | t-test | bootstrap>, p = <value>
## Guardrails
| Metric | Threshold | Result | Status |
|---|---|---|---|
| <metric> | <threshold> | <delta + CI> | <PASS|WATCH|FAIL> |
## Subgroup analysis (pre-specified only)
<table or "No pre-specified subgroups">
## Decision
<Ship | Hold | Kill | Inconclusive>, because <reason>.
## Caveats
- <pre-registration deviations if any>
- <data quality notes>
- <known confounds>
## Next steps
- <action 1>
- <action 2>Validation checks
- Total sample reached the pre-registered target
- SRM check ran and passed
- Confidence interval reported (not just p-value)
- All pre-registered guardrails evaluated
- Any subgroup analysis flagged as pre-specified vs exploratory
- Recommendation matches the decision matrix
Edge cases & failure modes
- Peeking: if the user asks for an analysis before planned sample size, refuse to make a ship decision. Compute confidence intervals only and label "interim — do not act on this."
- One-sided tests: convert to two-sided unless pre-registered as one-sided. Two-sided is the default.
- Multiple primary metrics: if there are more than one, you cannot ship on "any" being significant. Either pick one or apply Bonferroni correction.
- Heavy-tailed metrics (revenue): trimmed mean (winsorize at 99th percentile) is often more robust than raw mean. Note this in caveats.
- Day-of-week effects: if runtime isn't a multiple of 7 days, day-of-week imbalance can bias results. Note in caveats.
Scripts
scripts/analyze_experiment.py— End-to-end analysis from a CSV ofunit_id, variant, metric_value.
python scripts/analyze_experiment.py \
--input results.csv \
--metric-type proportion \
--control-label control \
--treatment-label treatmentRelated skills
ab-test-design— pre-experiment planningmetric-definition— clarify guardrail thresholdsstakeholder-readout— for non-experiment analyses needing similar structurecausal-inference— when randomization is broken or unavailable
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

