ab-test-analyzer
Skill22 starsChanged 2 months agoMITView on GitHub
Designs and analyzes A/B tests end-to-end — frames a sharp hypothesis, computes required sample size and test duration, runs significance tests (two-proportion z-test, Welch's t-test, chi-square), reports confidence intervals and lift, and flags common pitfalls like peeking, multiple comparisons, and Simpson's paradox. Use this skill when the user mentions A/B testing, split testing, experiment design, conversion-rate experiments, statistical significance, p-values, sample size or power calculations, "did this experiment win", minimum detectable effect (MDE), or asks to interpret experiment results honestly. Includes a runnable stats script (scripts/abtest.py).
We split this skill into the rules it gives an agent
12 rules. 0 are common, 8 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Use this skill whenever someone wants to plan an experiment, decide if a result is real, or sanity-check an analysis someone else did.
- Distinctive: line 23
Follow these steps in order.
- Very specific: line 37
Compute required sample size and duration: Run scripts/abtest.py size.
- Distinctive: line 43
Check for logging bugs, bot traffic, and that randomization was at the right unit.
- Very specific: line 45
Run the significance test: Use scripts/abtest.py prop (rates) or scripts/abtest.py ttest (means).
- Very specific: line 49
Account for multiplicity: If you tested multiple metrics or variants, apply a correction (Bonferroni or Benjamini-Hochberg).
- Very specific: line 51
Write it up: Use templates/experiment-report.md so decisions are reproducible and reviewable.
- Distinctive: line 71
After the test, control 5,800/58,000 = 10.00%, treatment 6,150/58,000 = 10.60%:
- Distinctive: line 80
Run for whole weeks; account for day-of-week and novelty effects.
- Distinctive: line 82
Use one primary OEC; everything else is a guardrail or exploratory.
- Distinctive: line 83
Always run an SRM check before trusting any result.
- Distinctive: line 84
Prefer two-sided tests; one-sided needs strong justification.
“Common” is measured: kept by at least 6 in 10 of the 4 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 Analyzer
Overview
This skill helps design and analyze controlled online experiments (A/B and A/B/n tests) with statistical rigor and honest interpretation. It covers the full lifecycle: hypothesis framing, sample-size and duration planning, choosing the right test, computing p-values and confidence intervals, and avoiding the traps that produce false wins.
Keywords: A/B test, split test, experiment, hypothesis, sample size, power, MDE, minimum detectable effect, statistical significance, p-value, confidence interval, conversion rate, lift, two-proportion z-test, t-test, chi-square, peeking, multiple comparisons, Simpson's paradox, SRM, novelty effect.
Use this skill whenever someone wants to plan an experiment, decide if a result is real, or sanity-check an analysis someone else did.
Core Mental Model
- An A/B test estimates a causal effect by randomizing units (usually users) into control and treatment.
- You are testing a null hypothesis (no difference) against an alternative (there is a difference). A p-value is
P(data this extreme or more | null is true)— NOT the probability the null is true, and NOT the probability your variant is better. - Two error types: Type I (false positive, rate = alpha, typically 0.05) and Type II (false negative, rate = beta; power = 1 - beta, typically 0.80).
- You must fix sample size and test duration BEFORE you start. Stopping when significant ("peeking") inflates the false-positive rate dramatically.
Workflow
Follow these steps in order. Do not skip planning steps even when only asked to "analyze results" — verify the plan was sound first.
- Frame the hypothesis. Turn the vague goal into a falsifiable statement: "Changing X will increase metric M from baseline b by at least the MDE, because [mechanism]." Identify ONE primary metric (the Overall Evaluation Criterion / OEC). Pre-register guardrail metrics. See
references/methodology.mdfor OEC selection. - Pick the metric type.
- Binary / rate (conversion, click, signup) → two-proportion test.
- Continuous (revenue per user, time on page, order value) → Welch's t-test (means).
- More than 2 variants → chi-square (rates) or ANOVA-style + correction.
- Set the design parameters.
- Baseline rate or baseline mean (
b). - Minimum Detectable Effect (MDE): the smallest lift worth detecting. Express relative (e.g. +5%) and convert to absolute.
- alpha (default 0.05), power (default 0.80), one- vs two-sided (almost always two-sided).
- Baseline rate or baseline mean (
- Compute required sample size and duration. Run
scripts/abtest.py size. Divide required N per arm by daily eligible traffic per arm to get duration in days. Round duration UP to full weeks to cover weekday/weekend seasonality (min 1 week, ideally 2). - Run the test untouched for the full pre-planned duration. No peeking-with-action. (You may monitor guardrails for catastrophic harm only.)
- Validate data quality BEFORE looking at the result.
- Sample Ratio Mismatch (SRM): is the actual split close to the planned split? Run
scripts/abtest.py srm. If p < 0.001, the experiment is broken — do NOT trust the result. - Check for logging bugs, bot traffic, and that randomization was at the right unit.
- Sample Ratio Mismatch (SRM): is the actual split close to the planned split? Run
- Run the significance test. Use
scripts/abtest.py prop(rates) orscripts/abtest.py ttest(means). Report: effect size (absolute + relative lift), confidence interval, p-value, and whether it crossed alpha. - Interpret honestly. A non-significant result is NOT proof of no effect — report the CI to show what effects are still plausible. A significant result with a CI that includes trivially small lifts may not be worth shipping. See
references/interpretation-guide.md. - Account for multiplicity. If you tested multiple metrics or variants, apply a correction (Bonferroni or Benjamini-Hochberg). See
references/methodology.md. - Write it up. Use
templates/experiment-report.mdso decisions are reproducible and reviewable.
Choosing the Test (decision table)
| Metric | Variants | Test | Script command |
| Rate / proportion | 2 | Two-proportion z-test | abtest.py prop |
| Rate / proportion | >2 | Chi-square (then pairwise + correction) | abtest.py chisq |
| Continuous mean | 2 | Welch's t-test | abtest.py ttest |
| Continuous mean | >2 | ANOVA + post-hoc (use a stats lib) | external |
| Any | — | Sample size planning | abtest.py size |
| Any | — | SRM / sanity check | abtest.py srm |
Quick Worked Example
Baseline conversion 10%, want to detect a relative +5% (→ 10.5% absolute), alpha 0.05, power 0.80, two-sided:
python scripts/abtest.py size --baseline 0.10 --mde-rel 0.05 --alpha 0.05 --power 0.80→ ~ 58,000 users per arm. At 4,000 eligible users/arm/day → ~15 days → round to 2 full weeks.
After the test, control 5,800/58,000 = 10.00%, treatment 6,150/58,000 = 10.60%:
python scripts/abtest.py prop --c-conv 5800 --c-n 58000 --t-conv 6150 --t-n 58000→ absolute lift +0.60pp, relative +6.0%, 95% CI on absolute difference, and a p-value. Decide using the CI, not just the p-value. See examples/conversion-test.md for the full walkthrough.
Best Practices
- Pre-register: hypothesis, primary metric, MDE, sample size, duration, and the decision rule BEFORE launch.
- Randomize at the right unit (usually user, not session/pageview) and keep it consistent across the funnel.
- Run for whole weeks; account for day-of-week and novelty effects.
- Report effect size + confidence interval first; treat the p-value as secondary.
- Use one primary OEC; everything else is a guardrail or exploratory.
- Always run an SRM check before trusting any result.
- Prefer two-sided tests; one-sided needs strong justification.
Common Pitfalls
- Peeking / optional stopping: checking daily and stopping at first significance turns a 5% false-positive rate into 20-30%+. Fix sample size up front, or use a proper sequential/Bayesian method.
- p-hacking / metric shopping: testing 20 metrics and reporting the one with p<0.05. Correct for multiplicity.
- Simpson's paradox: an aggregate winner can lose in every segment if traffic mix differs. Check key segments; beware mixing pre/post populations.
- Sample Ratio Mismatch: a broken split (e.g. 52/48 instead of 50/50) signals a bug that biases everything.
- Confusing significance with importance: with huge N, trivially small lifts become "significant." Use the MDE and the CI.
- Confusing non-significance with "no effect": underpowered tests fail to detect real effects. Report the CI.
- Novelty/primacy effects: early behavior differs from steady state; don't conclude from day 1-2.
- Multiple comparisons across variants: A/B/C/D testing without correction inflates false positives.
See references/pitfalls-checklist.md for a pre-launch and pre-decision checklist to run every time.
Bundled Files
scripts/abtest.py— runnable, stdlib-only calculator: sample size, two-proportion z-test, Welch's t-test, chi-square, SRM. Runpython scripts/abtest.py --help.references/methodology.md— deep dive on hypotheses, OEC, power, MDE, multiplicity corrections, sequential testing, Bayesian alternative.references/interpretation-guide.md— how to read p-values, CIs, and what each outcome (sig/non-sig × big/small effect) actually means for a ship decision.references/pitfalls-checklist.md— copy-paste checklist for design and analysis review.templates/experiment-report.md— fill-in template for documenting an experiment.examples/conversion-test.md— a complete end-to-end worked example.
Other versions6 projects use a version of this.
Word for word · 2
- JayRHa/agent-skills★ 12100% same
- JayRHa/AgentSkills★ 12100% same
Edited · 0
None found.
Wrote their own version · 4
- irinabuht12-oss/marketing-skills★ 6.5ksame name
- ilya-a11y/growthband-outbound-skills★ 13same name
- nek1987/auto-agent-harness★ 4same name
- SkillMedev/performance-marketing★ 0same name
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 repository194 other files it gives its agents.
- 0-templateSkill
- academy-guideSkill
- add-to-my-skillsSkill
- adr-authorSkill
- ai-tools-setupSkill
- algorithmic-artSkill
- api-and-interface-designSkill
- api-designerSkill
- api-docs-writerSkill
- apple-store-submitSkill
- aws-cost-optimizerSkill
- bash-script-hardeningSkill
- blog-post-writerSkill
- book-summarizerSkill
- branch-cleanupSkill
- brand-copy-landingSkill
- brand-copySkill
- brand-designSkill
- brand-guidelinesSkill
- browser-testing-with-devtoolsSkill
- canvas-designSkill
- changelog-generatorSkill
- changelog-keeperSkill
- chart-chooserSkill
- ci-cd-and-automationSkill
- ci-fix-loopSkill
- claude-apiSkill
- cloudflare-block-countriesSkill
- coderabbitloopSkill
- code-review-and-qualitySkill
- code-reviewerSkill
- code-simplificationSkill
- codexloopSkill
- comms-notionSkill
- comms-slackSkill
- comms-whatsappSkill
- competitive-analysisSkill
- concept-explainerSkill
- constraint-driven-developmentSkill
- context-engineeringSkill
- context-repoSkill
- cover-letter-writerSkill
- crash-courseSkill
- cron-schedulerSkill
- data-digestSkill
- data-pipeline-architectSkill
- debug-detectiveSkill
- debugging-and-error-recoverySkill
- decision-matrixSkill
- dependabot-triageSkill
- dependency-upgraderSkill
- deprecation-and-migrationSkill
- dev-instantdbSkill
- discernment-nudgeSkill
- doc-coauthoringSkill
- dockerfile-proSkill
- docs-index-keeperSkill
- documentation-and-adrsSkill
- docxSkill
- doubt-driven-developmentSkill
- The first 60 shown.
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.

