ab-testing

When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," "how long should I run this test," "growth experiments," "experiment velocity," "experiment backlog," "ICE score," "experimentation program," or "experiment playbook." Use this whenever someone is comparing two approaches and wants to measure which performs better, or when they want to build a systematic experimentation practice. For tracking implementation, see analytics. For page-level conversion optimization, see cro.

A/B Test Setup

You are an expert in experimentation and A/B testing. Your goal is to help design tests that produce statistically valid, actionable results.

Initial Assessment

Check for product marketing context first: If .agents/product-marketing.md exists (or .claude/product-marketing.md, or the legacy product-marketing-context.md filename, in older setups), read it before asking questions. Use that context and only ask for information not already covered or specific to this task.

Before designing a test, understand:

  1. Test Context - What are you trying to improve? What change are you considering?
  2. Current State - Baseline conversion rate? Current traffic volume?
  3. Constraints - Technical complexity? Timeline? Tools available?

Core Principles

1. Start with a Hypothesis

2. Test One Thing

3. Statistical Rigor

4. Measure What Matters


Hypothesis Framework

Structure

B0

Example

Weak: "Changing the button color might increase clicks."

Strong: "Because users report difficulty finding the CTA (per heatmaps and feedback), we believe making the button larger and using contrasting color will increase CTA clicks by 15%+ for new visitors. We'll measure click-through rate from page view to signup start."


Test Types

TypeDescriptionTraffic Needed
A/BTwo versions, single changeModerate
A/B/nMultiple variantsHigher
MVTMultiple changes in combinationsVery high
Split URLDifferent URLs for variantsModerate

Sample Size

Quick Reference

Baseline10% Lift20% Lift50% Lift
1%150k/variant39k/variant6k/variant
3%47k/variant12k/variant2k/variant
5%27k/variant7k/variant1.2k/variant
10%12k/variant3k/variant550/variant

Calculators:

For detailed sample size tables and duration calculations: See references/sample-size-guide.md


Metrics Selection

Primary Metric

Secondary Metrics

Guardrail Metrics

Example: Pricing Page Test


Designing Variants

What to Vary

CategoryExamples
Headlines/CopyMessage angle, value prop, specificity, tone
Visual DesignLayout, color, images, hierarchy
CTAButton copy, size, placement, number
ContentInformation included, order, amount, social proof

Best Practices


Traffic Allocation

ApproachSplitWhen to Use
Standard50/50Default for A/B
Conservative90/10, 80/20Limit risk of bad variant
RampingStart small, increaseTechnical risk mitigation

Considerations:


Implementation

Client-Side

Server-Side


Running the Test

Pre-Launch Checklist

During the Test

DO:

Avoid:

The Peeking Problem

Looking at results before reaching sample size and stopping early leads to false positives and wrong decisions. Pre-commit to sample size and trust the process.


Analyzing Results

Statistical Significance

These distinctions follow the American Statistical Association's p-value statement. Statistical significance alone does not establish business value or justify shipping a variant.

Analysis Checklist

  1. Reach sample size? If not, result is preliminary
  2. Statistically significant? Check confidence intervals
  3. Effect size meaningful? Compare to MDE, project impact
  4. Secondary metrics consistent? Support the primary?
  5. Guardrail concerns? Anything get worse?
  6. Segment differences? Mobile vs. desktop? New vs. returning?

Interpreting Results

ResultConclusion
Significant winnerCheck effect size, uncertainty and guardrails before implementing
Significant loserKeep control, learn why
No significant differenceReport the effect interval: it may still allow meaningful benefit and harm, or may exclude effects worth pursuing. Follow the planned stopping rule; do not extend a finished fixed-horizon test until it becomes significant. Plan a new test if needed.
Mixed signalsCheck data quality and planned metrics; label unplanned segment findings exploratory and confirm them in a new test

Documentation

Document every test with:

For templates: See references/test-templates.md


Growth Experimentation Program

Individual tests are valuable. A continuous experimentation program is a compounding asset. This section covers how to run experiments as an ongoing growth engine, not just one-off tests.

The Experiment Loop

B1

Hypothesis Generation

Feed your experiment backlog from multiple sources:

SourceWhat to Look For
AnalyticsDrop-off points, low-converting pages, underperforming segments
Customer researchPain points, confusion, unmet expectations
Competitor analysisFeatures, messaging, or UX patterns they use that you don't
Support ticketsRecurring questions or complaints about conversion flows
Heatmaps/recordingsWhere users hesitate, rage-click, or abandon
Past experiments"Significant loser" tests often reveal new angles to try

ICE Prioritization

Score each hypothesis 1-10 on three dimensions:

DimensionQuestion
ImpactIf this works, how much will it move the primary metric?
ConfidenceHow sure are we this will work? (Based on data, not gut.)
EaseHow fast and cheap can we ship and measure this?

ICE Score = (Impact + Confidence + Ease) / 3

Run highest-scoring experiments first. Re-score monthly as context changes.

Experiment Velocity

Track your experimentation rate as a leading indicator of growth:

MetricTarget
Experiments launched per month4-8 for most teams
Win rate20-30% is common for mature programs (sustained higher rates may indicate conservative hypotheses)
Average test duration2-4 weeks
Backlog depth20+ hypotheses queued
Cumulative liftCompound gains from all winners

The Experiment Playbook

When a test wins, don't just implement it — document the pattern:

B2

Over time, your playbook becomes a library of proven growth patterns specific to your product and audience.

Experiment Cadence

Weekly (30 min): Review running experiments for technical issues and guardrail metrics. Don't call winners early — but do stop tests where guardrails are significantly negative.

Bi-weekly: Conclude completed experiments. Analyze results, update playbook, launch next experiment from backlog.

Monthly (1 hour): Review experiment velocity, win rate, cumulative lift. Replenish hypothesis backlog. Re-prioritize with ICE.

Quarterly: Audit the playbook. Which patterns have been applied broadly? Which winning patterns haven't been scaled yet? What areas of the funnel are under-tested?


Common Mistakes

Test Design

Execution

Analysis


Task-Specific Questions

  1. What's your current conversion rate?
  2. How much traffic does this page get?
  3. What change are you considering and why?
  4. What's the smallest improvement worth detecting?
  5. What tools do you have for testing?
  6. Have you tested this area before?


References

Sample Size Guide

sample-size-guide.md

Sample Size Guide

Reference for calculating sample sizes and test duration.

Contents

Sample Size Fundamentals

Required Inputs

  1. Baseline conversion rate: Your current rate
  2. Minimum detectable effect (MDE): Smallest change worth detecting
  3. Statistical significance level: Usually α = 0.05 (5%)
  4. Statistical power: Usually 80% (β = 0.20)

What These Mean

Baseline conversion rate: If your page converts at 5%, that's your baseline.

MDE (Minimum Detectable Effect): The smallest improvement you care about detecting. Set this based on:

Significance level (α = 0.05): For the planned test and its assumptions, limits the long-run probability of rejecting a true null hypothesis to 5%. It is not the probability that an observed difference is “due to chance.” Repeated unadjusted looks or multiple comparisons do not retain that error rate. See the ASA's interpretation guidance.

Statistical power (80%): Means if there's a real effect of size MDE, you have 80% chance of detecting it.


Sample Size Quick Reference Tables

Conversion Rate: 1%

Lift to DetectSample per VariantTotal Sample
5% (1% → 1.05%)1,500,0003,000,000
10% (1% → 1.1%)380,000760,000
20% (1% → 1.2%)97,000194,000
50% (1% → 1.5%)16,00032,000
100% (1% → 2%)4,2008,400

Conversion Rate: 3%

Lift to DetectSample per VariantTotal Sample
5% (3% → 3.15%)480,000960,000
10% (3% → 3.3%)120,000240,000
20% (3% → 3.6%)31,00062,000
50% (3% → 4.5%)5,20010,400
100% (3% → 6%)1,4002,800

Conversion Rate: 5%

Lift to DetectSample per VariantTotal Sample
5% (5% → 5.25%)280,000560,000
10% (5% → 5.5%)72,000144,000
20% (5% → 6%)18,00036,000
50% (5% → 7.5%)3,1006,200
100% (5% → 10%)8101,620

Conversion Rate: 10%

Lift to DetectSample per VariantTotal Sample
5% (10% → 10.5%)130,000260,000
10% (10% → 11%)34,00068,000
20% (10% → 12%)8,70017,400
50% (10% → 15%)1,5003,000
100% (10% → 20%)400800

Conversion Rate: 20%

Lift to DetectSample per VariantTotal Sample
5% (20% → 21%)60,000120,000
10% (20% → 22%)16,00032,000
20% (20% → 24%)4,0008,000
50% (20% → 30%)7001,400
100% (20% → 40%)200400

Duration Calculator

Formula

B0

Examples

Scenario 1: High-traffic page

Scenario 2: Medium-traffic page

Scenario 3: Low-traffic with partial exposure

Minimum Duration Rules

Even with sufficient sample size, run tests for at least:

Maximum Duration Guidelines

Avoid running tests longer than 4-8 weeks:


Online Calculators

Evan Miller's Calculator https://www.evanmiller.org/ab-testing/sample-size.html

Optimizely's Calculator https://www.optimizely.com/sample-size-calculator/

AB Test Guide Calculator https://www.abtestguide.com/calc/

VWO Duration Calculator https://vwo.com/tools/ab-test-duration-calculator/


Adjusting for Multiple Variants

With more than 2 variants (A/B/n tests), you need more sample:

VariantsMultiplier
2 (A/B)1x
3 (A/B/C)~1.5x
4 (A/B/C/D)~2x
5+Consider reducing variants

Why? More comparisons increase chance of false positives. You're comparing:

Apply Bonferroni correction or use tools that handle this automatically.


Common Sample Size Mistakes

1. Underpowered tests

Problem: Not enough sample to detect realistic effects Fix: Be realistic about MDE, get more traffic, or don't test

2. Overpowered tests

Problem: Waiting for sample size when you already have significance Fix: This is actually fine—you committed to sample size, honor it

3. Wrong baseline rate

Problem: Using wrong conversion rate for calculation Fix: Use the specific metric and page, not site-wide averages

4. Ignoring segments

Problem: Calculating for full traffic, then analyzing segments Fix: If you plan segment analysis, calculate sample for smallest segment

5. Testing too many things

Problem: Dividing traffic too many ways Fix: Prioritize ruthlessly, run fewer concurrent tests


When Sample Size Requirements Are Too High

Options when you can't get enough traffic:

  1. Increase MDE: Accept only detecting larger effects (20%+ lift)
  2. Lower confidence: Use 90% instead of 95% (risky, document it)
  3. Reduce variants: Test only the most promising variant
  4. Combine traffic: Test across multiple similar pages
  5. Test upstream: Test earlier in funnel where traffic is higher
  6. Don't test: Make decision based on qualitative data instead
  7. Longer test: Accept longer duration (weeks/months)

Sequential Testing

If you must check results before reaching sample size:

What is it?

Statistical method that adjusts for multiple looks at data.

When to use

Tools that support it

Tradeoff


Quick Decision Framework

Can I run this test?

B1

Test Templates

test-templates.md

A/B Test Templates Reference

Templates for planning, documenting, and analyzing experiments.

Contents

Test Plan Template

B0


Results Documentation Template

B1


Test Repository Entry Template

For tracking all tests in a central location:

B2


Quick Test Brief Template

For simple tests that don't need full documentation:

B3


Stakeholder Update Template

B4


Experiment Prioritization Scorecard

For deciding which tests to run:

FactorWeightTest ATest BTest C
Potential impact30%
Confidence in hypothesis25%
Ease of implementation20%
Risk if wrong15%
Strategic alignment10%
Total

Scoring: 1-5 (5 = best)


Hypothesis Bank Template

For collecting test ideas:

B5


Exported from Marketing Skills on 2026-10-12