SuperAPI AI Directory

ab-testing

Testing & quality

View repository

Updated 10-16 09:30

About this skill

A/B Testing

Applicable Scenarios

  • New feature effect validation
  • UI/UX redesign comparison
  • Pricing strategy testing
  • Recommendation algorithm comparison
  • Landing page optimization

Core Principles

1. 先有假设再实验
   "改变 X 会让 Y 提升 Z%"

2. 样本量要够
   不够 = 噪音当信号
  1. Run long enough At least 1~2 full business cycles

  2. Check guardrail metrics Primary metric improves but others worsen = cannot launch

  3. Statistical significance ≠ business significance p < 0.05 but effect 0.01% = meaningless


## 样本量计算

```text
公式因素:
  - 基线转化率(p1)
  - 最小检测效应(MDE)
  - 显著性水平(α = 0.05)
  - 统计功效(1-β = 0.8)

工具:
  - Evan Miller 样本量计算器
  - statsmodels(Python)
  - power.prop.test(R)

Workflow

1. 明确假设和目标
2. 选择主指标 + 护栏指标
3. 计算样本量
4. 确定分流方式和时长
5. 启动实验
6. 等待(不提前偷看)
7. 分析结果
8. 做决策(全量 / 放弃 / 迭代)

Supporting Templates

  • templates/ab-test-template.md — A/B test design + results + conclusion

Quality Self-Check

□ 假设明确可证伪
□ 样本量计算
□ 分流无偏(hash)
□ 跑够时长
□ 不提前偷看
□ 看护栏指标
□ 结论可行动

Common Pitfalls

  1. Drawing conclusions with insufficient sample size——noise
  2. Peeking at p-value early——inflation
  3. Only looking at the primary metric——guardrail deterioration
  4. Insufficient duration——period effect
  5. Biased traffic splitting——uneven new users vs existing users

Collaboration with other skills

上游:metric-design → 指标选择
上游:product-manager → 假设来源
下游:analysis-report → 结果纳入报告