agentsclimarketplace

Ab testing

Skill Mattakushi432/Claude-Code-Skills-Custom-DevTools-Pack/plugins/devtools-pack/skills/ab-testing

A curated pack of custom Claude Code skills for developers — installable as a Claude Code plugin marketplace.

Install
npx -y skills add Mattakushi432/Claude-Code-Skills-Custom-DevTools-Pack --skill ab-testing

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

When to activate: A/B testing, split testing, experiment design, statistical significance, sample size, ICE framework, multivariate testing, conversion experiments

SKILL.md

6.5 KB, as published. Nobody here has run it

A/B Testing

Experiment Design

Hypothesis Template

We believe that [change] will cause [metric] to [increase/decrease]
because [reasoning based on data/insight].
We'll know this is true when we see [statistical significance at X% confidence].

Example:

"We believe that adding customer logos above the signup CTA will increase trial signups by ≥10% because users cite trust as their #1 objection in exit surveys. We'll know this is true when we see 95% confidence with ≥500 conversions per variant."

Variable Isolation Rule

Test ONE change at a time per experiment. Multi-variable tests need multivariate setup (MVT) with much larger sample sizes.

Control vs Treatment

ControlTreatment
DefinitionCurrent experienceModified experience
Traffic split50% (typical)50% (typical)
ChangesNoneOne specific change

Statistical Significance

Key Concepts

  • Significance level (α): Probability of false positive. Standard: α = 0.05 (5%)
  • Confidence: 1 - α = 95% confidence
  • Power (1-β): Probability of detecting a real effect. Target: 80%
  • p-value: Probability that result is due to chance. Need p < 0.05 to call a winner
  • MDE (Minimum Detectable Effect): Smallest improvement worth detecting

Sample Size Calculator (Python)

import math

def sample_size_per_variant(baseline_cr, mde_relative, alpha=0.05, power=0.80):
    """
    baseline_cr: current conversion rate (e.g. 0.05 for 5%)
    mde_relative: minimum detectable effect as relative change (e.g. 0.10 for 10% lift)
    """
    p1 = baseline_cr
    p2 = baseline_cr * (1 + mde_relative)
    
    z_alpha = 1.96  # for 95% confidence (two-tailed)
    z_beta = 0.842  # for 80% power
    
    p_avg = (p1 + p2) / 2
    n = ((z_alpha * math.sqrt(2 * p_avg * (1 - p_avg)) + 
          z_beta * math.sqrt(p1 * (1-p1) + p2 * (1-p2))) ** 2) / (p2 - p1) ** 2
    
    return math.ceil(n)

# Example: 5% baseline CR, want to detect 10% relative lift
n = sample_size_per_variant(0.05, 0.10)
print(f"Need {n} visitors per variant ({n*2} total)")
# Output: ~3,842 per variant (7,684 total)

Quick Sample Size Reference Table

Baseline CRDetect 5% liftDetect 10% liftDetect 20% lift
2%~38,000/variant~10,000/variant~2,700/variant
5%~15,000/variant~3,900/variant~1,000/variant
10%~7,400/variant~1,900/variant~490/variant
20%~3,500/variant~900/variant~230/variant

Duration Calculation

Required duration (days) = Sample size per variant / (Daily traffic × traffic_split%)

Example:
  Need: 4,000 per variant
  Daily traffic: 1,000 visitors
  Traffic split: 50%
  Duration = 4,000 / (1,000 × 0.5) = 8 days → round up to 14 days (full 2 weeks)

Always run for at least 2 full business cycles (typically 14 days) to account for day-of-week effects.

Test Prioritization

ICE Framework

CriterionQuestionScore 1–10
ImpactIf this wins, how much does the metric move?
ConfidenceHow confident are we the change will work?
EaseHow easy is it to implement and run?

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

PIE Framework (alternative)

CriterionDefinition
PotentialHow much can this page be improved? (based on analytics)
ImportanceHow much traffic / revenue does this page generate?
EaseHow easy is implementation?

Test Backlog Template

TestHypothesisICEMetricSample neededStatus
Logos above CTATrust → more signups8.3Trial CR8,000Running
Shorter formLess friction7.7Lead CR15,000Queued
Video testimonialSocial proof6.0Demo CR4,000Backlog

Common Mistakes to Avoid

MistakeWhy It's WrongFix
Stopping test early when winningPeeking problem inflates false positivesPre-commit to sample size; don't check daily
Running overlapping testsInteraction effects confound resultsSerialize tests on same page/flow
Testing during unusual periodsSales events, holidays skew resultsAvoid peak seasons unless testing those specifically
Low traffic testUnderpowered — can't reach significanceCalculate sample size first
Multiple metricsHigher chance of false positivePre-specify ONE primary metric
Not segmenting resultsWinning average hides losing segmentsAlways check results by device, source, user segment

Multivariate Testing (MVT)

Use only when you need to test COMBINATIONS of changes:

MVT vs A/B

A/BMVT
Variables12+ simultaneously
Variants24–16+
Traffic neededLow10–50× more
InsightWhich version winsWhich combination wins AND interaction effects

Full Factorial MVT Example

Testing: 2 headlines × 2 images = 4 variants:

  • A: Headline 1 + Image 1
  • B: Headline 1 + Image 2
  • C: Headline 2 + Image 1
  • D: Headline 2 + Image 2

Declaring a Winner

Decision Criteria

  1. Reached pre-specified sample size ✓
  2. p-value < 0.05 ✓
  3. Ran for minimum 2 business cycles ✓
  4. No anomalies in data (traffic spike, tracking issue) ✓
  5. Effect consistent across major segments (mobile/desktop, organic/paid) ✓

When to Ship Without Significance

  • Revenue impact is very large (directionally positive, even if not significant)
  • Test is directionally consistent across all segments
  • Cost of not shipping exceeds cost of being wrong

Result Documentation

## Test: [Name]
- Hypothesis: [stated hypothesis]
- Start: [date] | End: [date]
- Traffic: [N control] / [N treatment]
- Primary metric: [metric]
  - Control: [value] | Treatment: [value] | Δ: [%] | p-value: [p]
- Result: Winner / No significant difference / Inconclusive
- Decision: Ship / Rollback / Extend
- Learnings: [1–3 sentences on what this tells us]
- Next test: [what to test next based on this result]

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.