统计与机器学习 / 32

A/B测试:指标与随机化设计

从假设、目标到模型和评估。 A/B测试:指标与随机化设计。

阅读说明: 保留原笔记的编号与章节顺序;代码只供查看,没有在本站运行。历史输出不代表当前版本的复现结果。截图/外链图以独立整理的公式、表格、示意或文字替换;纠错与必要补充均作说明。

1. What is the role of A/B testing?

  • Controlled experiment
  • A decision-making procedure
  • Compare one element (control) with itself with variations
  • Splits traffic 50/50 between a control and a variation

Build a Minimum Viable Product(MVP) or feature, cheaply evaluate it with real users in A/B test

2. Why A/B Test?

  • Solve visitor pain points
  • Get better ROI
  • Make low-risk modifications
  • Achieve statistically significant improvements
  • Profitably redesign
  • Improved Content Engagement
  • Reduced Bounce Rates, Increased Conversion Rates
  • Understand your customer
  • Higher Values
  • Ease of Analysis
  • Reduced Risks

3. A/B testing design

Key Work Flow(背):

实验流程: 观察问题 → 定义假设与主/护栏指标 → 设计变体、样本量与停止规则 → 随机分流 → 核查数据 → 统计分析 → 解释实际效应 → 决定发布或迭代。

3.1 Design variation

  • A/B Testing:
    randomized experiment => statistically better (in term of certain metrics) than the current version => replace the old version with the new one and expect to have better performance in the long run
  • Experiment design
    After developing a variation, then split the traffic 50/50 between the original and the shorter variation, and wait for the experiment to run until it has achieved statistical confidence (95% confidence is the accepted standard and your chosen software should report this).
  • Data Analysis Conclusion: If the variation performs better, you implement if for all users. If it performs worse, you learn that this variation is probably not responsible for this case and go back to identifying the problem.
  • Launch Decide whether we should launch the new product variation, or refine the design, based on the A/B testing results.

整理注: 50/50分流和0.05显著性只是常用选择,应预先定义样本量、主指标、停止规则和多重检验方案,避免反复偷看直到显著。

3.2 What exactly is A/B test doing?

3.2.1 目标:判断新设计是否比现有设计更好

  1. 量化什么是‘好’=>定义合理的指标(metric)
  2. 对指标进行比较=>做对比实验
  3. 控制实验成本,风险,确保实验有效性=>实验设计
  4. 从实验数据中得出正确的结论=>假设检验

3.2.2 When is A/B test a good idea?

  • “影响大,选择难”问题
  • 存在明确的对照组和实验组,能够选择合适的指标评估此类改变
  • 通过A/B Test对很大范围的事情进行测试,比如增加一些新功能,或界面中增加的内容,网站的不同外观等
  • 用于十分复杂的改变,例如排名变动
  • App(移动APP)、web page(广告推送)、算法(推荐算法)和优化(产品优化及流程优化)

3.3 Metrics

3.3.1 Metrics

  • Quantitative measurements that help you to gain insights
    • efficacy of methods
    • evolution of their product
  • Assessing your product performance
    • meets the original business goals
    • product strategy is working
  • Key performance indicator
    • a measurable value that demonstrates how effectively achieving key business objectives
    • without product KPIs, how to make sure product is success, and what kind of success?
  • Product KPIs can be related to user requirement, size, quality, product growth, or user comfort. or evaluate architectural measures, quality measures, software complexity, or functional size.

3.3.2 Metrics comparison

  • Direct metrics vs. Compound metrics
  • High-level (Unified) metrics vs. Low-level metrics
  • Primary metrics vs. Secondary metrics
  • Customer Retention Rate (CRR)
  • Rrepurchase Rate (RR)
  • Daily Active Users (DAU)
  • Feature Usage (FU)
  • User Churn (UC)
  • Net Promoter Score (NPS)

3.3.4 Two very important metrics(背)

  • AARRR
框架维度
AARRRAcquisition获取、Activation激活、Retention留存、Referral推荐、Revenue收入
HEARTHappiness满意度、Engagement参与、Adoption采用、Retention留存、Task Success任务成功

先定义目标,再选可观测信号和指标;例如任务成功可看完成率、错误率与完成时间,不能只以停留越久越好。

  • HEART

3.4 Randomized Experiments

  • Users are randomly allocated to two different groups (experiment vs. control), where the experiment group has a treatment (new design or feature) that the control does not.
  • Randomization makes the allocation independent of the potential outcome and makes the users in the experiment group and those in the control group identical in distribution.
  • Therefore the mean difference in metric can only be attributed to the treatment.

整理注: 随机化使组间在分布上可比,不保证有限样本完全相同;还需检查分流异常、干扰、流失和实现偏差。

Random sampling vs. Randomization

整理参考资料