with one click
a-b-testing
Experimentation design and A/B testing standards for product teams
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Experimentation design and A/B testing standards for product teams
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Expert reference for application security — OWASP Top 10 mitigations, auth/authz, secrets management, cryptography, input validation, dependency hygiene, and secure-by-default code patterns
Expert reference for token counting, prompt compression, cost estimation, and quality preservation when optimizing prompts for Claude models
Expert reference for digital accessibility — WCAG conformance, ARIA, and inclusive design patterns
Authoritative reference for agent architecture selection, multi-agent orchestration, tool design, memory systems, and failure mode prevention
Expert reference for evaluating LLM systems, RAG pipelines, and AI features in production
Machine learning engineering patterns for model selection, feature engineering, training pipelines, evaluation, and production deployment.
| name | a-b-testing |
| description | Experimentation design and A/B testing standards for product teams |
| version | 1 |
The Pre-Registration Contract Before enrollment begins, document in writing: hypothesis, primary metric, guardrail metrics, MDE, sample size, runtime, and analysis plan. Changes to any of these after data collection begins are protocol deviations and must be disclosed. Pre-registration is not bureaucracy — it is the mechanism that makes the result credible.
Power as a Budget Statistical power is determined by four variables: alpha, effect size (MDE), sample size, and variance. You control three of them (alpha, sample size, MDE). Set alpha and MDE based on business stakes, then solve for required sample size. Accepting low power to run a faster experiment is borrowing from future decision quality.
The Two-Error Cost Matrix Type I error (false positive): you ship a change that does nothing or causes harm. Cost: wasted engineering, possible user harm, misleading roadmap. Type II error (false negative): you fail to ship a change that would have helped. Cost: missed improvement. The appropriate alpha and power settings depend on which error is more costly in your context. For irreversible changes (pricing, data deletion), use alpha = 0.01.
Practical vs. Statistical Significance Statistical significance answers "could this be noise?" Practical significance answers "is this large enough to matter?" Both gates must be passed to ship. A 0.1% lift in conversion is statistically significant at n = 1,000,000 — it is not a reason to prioritize engineering resources.
| Term | Precise Meaning |
|---|---|
| MDE (Minimum Detectable Effect) | The smallest effect size the experiment is designed to detect with the specified power and alpha. Set before enrollment; determines required sample size. |
| Statistical Power (1 - beta) | The probability of correctly rejecting the null hypothesis when the true effect equals the MDE. Standard minimum: 80%. |
| Alpha (significance level) | The maximum acceptable false positive rate. Standard: 0.05 (5%). Lowering alpha reduces false positives but requires larger samples. |
| p-value | The probability of observing this result (or more extreme) if the null hypothesis were true. Not the probability the hypothesis is true. |
| Confidence Interval | The range of effect sizes consistent with the observed data at the specified confidence level. Narrower intervals require more data. |
| Novelty Effect | A temporary treatment effect caused by users' response to change itself, not the change's inherent value. Diagnoses by plotting weekly cohort effects. |
| Guardrail Metric | A metric monitored to prevent harm — not the success criterion. Uses a more sensitive threshold (p < 0.10 one-tailed) to catch regressions early. |
| Holdout Group | A user segment permanently excluded from all experiments during a measurement window, used to measure cumulative long-term effects. |
| Peeking | Checking results and making ship/no-ship decisions before the pre-registered runtime ends. Inflates effective false positive rate to ~26% at alpha = 0.05 with sequential peeking. |
| Bonferroni Correction | Adjusting alpha downward when making multiple comparisons: adjusted alpha = alpha / number of comparisons. Conservative but valid. |
| Network Effect Invalidation | The failure of SUTVA (Stable Unit Treatment Value Assumption) when treatment assignment of one user affects outcomes for other users. Requires cluster randomization. |
| SRM (Sample Ratio Mismatch) | A discrepancy between the expected and observed assignment ratio. A significant SRM (chi-squared p < 0.01) invalidates the experiment — investigate before analyzing results. |
Mistake 1: Stopping Early on Significance (Peeking)
Mistake 2: No Guardrail Metrics
Mistake 3: Running Without an MDE
Mistake 4: Multiple Comparisons Without Correction
Mistake 5: Ignoring Sample Ratio Mismatch
Bad Experiment Design Brief
Experiment: New checkout button color (green vs. blue)
Goal: Improve conversions
Runtime: We'll check daily and stop when significant
Metrics: Conversion rate
Sample: Whatever we get
Problems: No hypothesis, no MDE, no power calculation, no runtime, no guardrails, peeking baked in as the plan, no sample size target.
Good Experiment Design Brief
Experiment ID: EXP-2026-041
Hypothesis: Changing the primary CTA color from blue (#1A73E8) to high-contrast
green (#1B7F3A) will increase checkout initiation rate by ≥ 3% relative,
because green CTAs showed stronger contrast ratios in our accessibility audit
and correlate with higher click-through in prior heatmap analysis.
Primary Metric: Checkout initiation rate (clicks on "Proceed to Checkout" / sessions
reaching cart page)
Baseline: 24.1% (30-day average, n=42,000 sessions/week)
MDE: 3% relative (24.1% → 24.8%)
Guardrail Metrics: Revenue per session (halt if drops > 2%), cart abandonment rate
Assignment Unit: User (logged-in user ID; logged-out by cookie)
Traffic Allocation: 50% control / 50% treatment
Required Sample: 38,400 users per variant (calculated at power=0.80, alpha=0.05,
two-tailed, using proportion z-test)
Runtime: 14 days (targeting ~42,000 users/variant at current traffic; provides
buffer above minimum)
Analysis Plan: Two-proportion z-test, two-tailed, alpha=0.05. SRM check
(chi-squared) before metric analysis. Bonferroni not required (one primary
comparison). Novelty effect check: plot daily conversion rate by cohort.
Decision Rule:
- p < 0.05 AND lift ≥ MDE (3% relative) AND no guardrail regression → Ship
- p < 0.05 AND lift < MDE → No ship (trivial effect)
- Any guardrail metric regression at p < 0.10 → Halt and investigate
- p ≥ 0.05 → No detected effect; document and move on