ab-test-analysis

Design and analyze A/B tests with power analysis, significance testing, and result interpretation.

1|Updated Mar 21, 2026
One-click install
npx skills add https://github.com/kalilurrahman/kr-claudiator-skills-original-prompts --skill ab-test-analysis-kalilurrahman
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ab-test-analysis
Source: https://github.com/kalilurrahman/kr-claudiator-skills-original-prompts/tree/main/03-data-analytics/ab-test-analysis
Command: npx skills add https://github.com/kalilurrahman/kr-claudiator-skills-original-prompts --skill ab-test-analysis-kalilurrahman

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires scipy, numpy, pymc3, pandas.

What problem does it solve? Running A/B tests without statistical rigor leads to false conclusions: peeking at results early inflates false positive rates, underpowered tests miss real effects, and cherry-picked metrics produce misleading decisions. This Skill provides a complete workflow for designing statistically sound experiments and interpreting results correctly. ## Core Features & Use Cases - Sample Size & Power Analysis: Calculate required sample sizes using Cohen's h effect size, significance level, and statistical power with scipy. - Statistical Significance Testing: Run z-tests for proportions with confidence intervals, plus Bayesian A/B testing via PyMC3 Beta-Binomial models. - Consistent Randomization: Assign users to variants with hash-based assignment so the same user always sees the same experience across devices. - Use Case: A product team wants to test a new checkout flow. Use this Skill to determine that 3,842 users per variant are needed to detect a 2% lift on a 10% baseline, run the test for 14 days without peeking, then analyze results showing +20% lift (p=0.0023) and ship the winner. ## Quick Start Ask the AI to design an A/B test for a checkout flow change with a 10% baseline conversion rate and 2% minimum detectable effect, including sample size calculation and results analysis.

Frequently Asked Questions about ab-test-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I calculate sample size for an A/B test?

Use power analysis with scipy: compute Cohen's h effect size from baseline rate and minimum detectable effect, then apply z-scores for your alpha (typically 0.05) and power (typically 0.80). For a 10% baseline detecting a 2% lift, you need roughly 3,842 users per variant.

How to test statistical significance of conversion rates in Python?

Run a two-proportion z-test: compute the pooled proportion, standard error, and z-score from conversions and visitors per variant, then derive a two-tailed p-value with scipy.stats.norm. Report the 95% confidence interval alongside the p-value.

What is the difference between frequentist and Bayesian A/B testing?

Frequentist tests use z-tests and p-values to reject a null hypothesis at a fixed significance level. Bayesian testing with PyMC3 uses a Beta-Binomial model to directly estimate the probability that variant B beats A, plus a credible interval for the lift.

Why is peeking at A/B test results early a problem?

Checking results daily and stopping when significant inflates the false positive rate from 5% to roughly 30% due to repeated testing. The fix is fixed-horizon testing: decide sample size upfront and analyze only once when it is reached.

How do I handle multiple metrics in an A/B test?

Apply a Bonferroni correction by dividing your significance level by the number of metrics tested. Testing 20 metrics at alpha 0.05 requires p < 0.0025 per test to avoid false positives from multiple comparisons.

How do I assign users to A/B test variants consistently?

Use hash-based assignment: hash the user ID combined with the test name using MD5, then take the modulo by the number of variants. This guarantees the same user always sees the same variant across sessions and devices without cookies.