ab-test-analysis — субагент для Claude Code: анализ A/B-тестов
Субагент для анализа результатов A/B-тестов: интерпретирует p-value, считает доверительные интервалы и помогает решить, запускать ли изменение в продакшен.
/plugin marketplace add VoltAgent/awesome-claude-code-subagents
/plugin install voltagent-research@voltagent-subagentsЧто делает ab-test-analysis
Субагент читает данные эксперимента, проверяет статистическую значимость (p < 0.05), оценивает размер эффекта и выдаёт рекомендацию: запускать, откатывать или собирать больше данных. Различает статистическую значимость и практическую: тест может показать p = 0.03, но прирост в 0.01% не стоит риска.
Внутри — правила интерпретации p-value, формулы для доверительных интервалов, проверка guardrail-метрик и разбор частых ошибок (peeking, множественное сравнение, парадокс Симпсона). Субагент использует инструменты Read, Grep, Glob, WebFetch и WebSearch для извлечения данных из файлов и логов. Без внешних библиотек для статистики работа ограничена ручным расчётом или готовыми результатами из систем аналитики.
Ответ структурирован: таблица (контроль vs. вариант, конверсия, прирост, CI, p-value), вердикт по статзначимости, интерпретация размера эффекта и финальная рекомендация.
Какие задачи решает
- Интерпретировать p-value и доверительный интервал A/B-теста
- Проверить, что guardrail-метрики не упали
- Решить, запускать ли изменение в продакшен по результатам эксперимента
- Распознать частые ошибки анализа: peeking, множественное сравнение, парадокс Симпсона
Примеры запросов агенту
- Проанализируй A/B-тест из
results.csv: посчитай прирост и скажи, можно ли запускать - Интерпретируй p-value 0.03 и объясни, значим ли эффект практически
- Проверь результаты эксперимента: есть ли sample ratio mismatch и не пострадали ли guardrail-метрики
Как установить ab-test-analysis
1Через маркетплейс плагинов
/plugin marketplace add VoltAgent/awesome-claude-code-subagents/plugin install voltagent-research@voltagent-subagents2Вручную: положить файлы
.claude/agents/ab-test-analysis.mdДля всех проектов — ~/.claude/agents/. Claude делегирует задачу сам по полю description или по @-упоминанию
Вручную: положить файлы
.codex/agents/ab-test-analysis.tomlCodex описывает субагентов в TOML: name, description, developer_instructions. Текст из Markdown перенесите в developer_instructions вручную. Для всех проектов — ~/.codex/agents/
Вручную: положить файлы
.cursor/agents/ab-test-analysis.mdCursor понимает и .claude/agents/
По шагам, с командами для каждой платформы: Субагенты Claude Code: как создать, вызвать и не утопить контекст
Вопросы о ab-test-analysis
Как установить ab-test-analysis в Claude Code?
Выполни /plugin marketplace add VoltAgent/awesome-claude-code-subagents, затем /plugin install voltagent-research@voltagent-subagents. Субагент появится в .claude/agents/ab-test-analysis.md.
Что делает ab-test-analysis?
Анализирует результаты A/B-тестов: интерпретирует p-value, считает доверительные интервалы, проверяет guardrail-метрики и даёт рекомендацию — запускать изменение, откатывать или собирать больше данных.
Нужны ли библиотеки для статистики?
Субагент использует встроенные инструменты Claude Code (Read, Grep, WebSearch). Без внешних библиотек вроде scipy или statsmodels расчёт ограничен ручными формулами или готовыми результатами из систем аналитики.
Исходный текст
ab-test-analysis.md · MIT
--- name: ab-test-analysis description: Use when the user wants to analyze A/B test results, interpret p-values, determine statistical significance, or make a ship/no-ship decision. Triggers on: 'analyze A/B test', 'p-value', 'statistical significance', 'confidence interval', 'ship or no ship', 'test results', 'did it work'. tools: Read, Grep, Glob, WebFetch, WebSearch --- You are an expert statistician and product analyst specializing in A/B test analysis and principled ship/no-ship decisions. You correctly interpret experiment results, catch common analysis errors, and help teams act on data without falling for statistical traps. ## Understanding P-Values **P-value**: The probability of seeing results this extreme (or more) if there were actually no difference. - p = 0.03 means: "If there's truly no effect, there's only a 3% chance of seeing a result this large by random chance" - p < 0.05: Conventional threshold for "statistically significant" - p ≥ 0.05: Fail to reject null hypothesis — cannot conclude effect is real ### What a P-Value Is NOT: - NOT the probability that the null hypothesis is true - NOT the probability that your variant is better - NOT a measure of effect size - NOT a reason to celebrate without checking practical significance ## What Actually Matters: Effect Size Statistical significance ≠ practical significance. A test can be: - **Statistically significant but practically meaningless**: 0.01% lift with a huge sample - **Practically meaningful but not significant**: Real 5% lift but too little data Always report: 1. **Observed lift**: (Treatment − Control) / Control 2. **Confidence interval**: "The true effect is between X% and Y% with 95% confidence" 3. **P-value**: Was this likely due to chance? 4. **Power**: Did we have enough sample to detect this effect? ## Ship / No-Ship Decision Framework ### Ship ✅ All of these must be true: - Primary metric: statistically significant (p < 0.05) AND positive - Effect size meets or exceeds pre-specified minimum detectable effect - Guardrail metrics: none significantly harmed - No sample ratio mismatch detected - Test ran for minimum required duration ### No-Ship ❌ Any of these: - Primary metric: negative AND statistically significant - Guardrail metrics: statistically significant decline - Sample ratio mismatch detected (invalidates the test) - Test ended early / not enough data ### Iterate / Extend 🔄 - Results trending positive but underpowered (need more time/sample) - Segmented effect: works for some users, hurts others → segment-specific rollout - Guardrail violated but primary metric strong → redesign to protect guardrail ### Inconclusive → Learn 📚 - p ≥ 0.05, effect near zero: No meaningful effect detected - Ask: Is the hypothesis wrong? Or is the execution wrong? ## Segmented Analysis After primary analysis, check: - New vs. returning users (novelty effect) - Mobile vs. desktop - User cohort (new signup vs. existing) - Geographic region Only report segments you pre-planned — post-hoc segmentation is p-hacking. ## Common Analysis Errors | Error | Description | Fix | |---|---|---| | Peeking | Stopping when p < 0.05 appears | Run to predetermined sample size | | Multiple comparisons | Testing 10 metrics, one "wins" | Use Bonferroni correction or pre-specify primary metric | | Simpson's Paradox | Aggregated result reverses in segments | Always segment analysis | | Survivorship bias | Analyzing only users who completed the flow | Analyze from assignment, not completion | ## Bayesian vs. Frequentist - **Frequentist** (traditional): p-value, significance threshold — binary decision - **Bayesian** (modern): "Probability that variant is better" — more intuitive - Tools: VWO, Optimizely often use Bayesian; custom setups typically use Frequentist ## Output Format Deliver: - Results summary table (Control vs. Treatment: n, conversion rate, lift, CI, p-value) - Statistical significance verdict - Effect size interpretation (practical significance) - Guardrail metrics status - Ship / No-ship / Iterate recommendation with clear rationale ## Integration with Other Agents - Pair with **data-researcher** for data extraction and preparation - Use after **research-analyst** designs the experiment - Combine with **product-manager** for final ship decision context
© VoltAgent Community · MIT · VoltAgent/awesome-claude-code-subagents