3.1 示范:A/B 实验项目
← 返回总纲
公开文章
A/B 实验类 bullet 是数据岗被追问最密的一类,面试官会顺着你的项目把实验设计的每一步问一遍:假设、指标、随机单位、样本量、时长、SRM 检查、检验方法、结果解读、上线决策。准备时按"实验七步"给自己的项目每一步都写出你的选择 + 为什么,再准备两三个"如果结果冲突怎么办"的情景题。
示范基于学员真实经历改写,姓名、学校和公司已匿名。方括号 [ ] 处是学员原材料里没有的信息,要换成你自己项目的真实情况,不能照抄。
简历原句
Designed statistical experiments for UI and pricing changes, including A/B and multivariate tests with power analysis; lifted CTR 13% and guided rollout decisions with the product and design teams.
2 分钟版本
| 约 80 秒 · 175 词 At a ticket marketplace, changing the ticket quantity took extra steps and added friction to the ticket-selection flow. Our hypothesis was that a redesigned quantity selector would help more users move on to checkout. The main challenge was the metric framework. The long-term goal was revenue, but revenue was too far downstream for a UI change. So I used checkout click-through as the primary metric, purchase conversion as a secondary metric, and bounce rate and page processing time as guardrails. We randomized at the anonymous visitor level with a roughly 50/50 split, and limited the test to organic traffic, since paid traffic has very different intent. Before launch, I ran a power analysis on historical CTR, which called for about 35,000 users per group, and we ran it for two full weeks to cover weekly cycles. I used CUPED with pre-experiment behavior to reduce variance. Checkout CTR rose 13% in relative terms and was statistically significant. Purchase conversion also improved, and the guardrails held. Based on that, we did a gradual rollout to 100%. |
|---|
按实验七步准备追问
| 步骤 | 这个项目的选择 | 为什么 |
|---|---|---|
| 1. 假设 | 新的数量选择器能减少摩擦,让更多用户进入结账 | 修改数量需要额外步骤,是选票流程里明确的摩擦点 |
| 2. 指标 | 主指标 checkout CTR;次要指标购买转化;护栏:跳出率、页面处理时间;诊断指标:筛选操作次数 | 收入太下游、噪声大;CTR 最直接反映这个改动 |
| 3. 随机单位 | 匿名访客 / cookie | 按 pageview 随机,同一用户可能看到两个版本 |
| 4. 样本量 | 每组约 35,000 用户;α = 0.05,power = 80% | 用历史 CTR 作基线,按双比例检验计算 |
| 5. 时长 | 2 周 | 覆盖完整的工作日和周末周期 |
| 6. 上线检查 | SRM:卡方拟合优度检验 | 先排除分流和埋点问题再看结果 |
| 7. 分析与决策 | 双比例 z 检验 + 置信区间;主指标、次要指标、护栏一起看;逐步放量 | 单看主指标可能误判 |
追问与参考答案
设计
Q:Why did you randomize at the visitor level instead of pageview?
If we randomized by pageview, the same user could see both versions across visits, which contaminates the comparison. Visitor-level randomization keeps each user in one group across visits on the same browser and device.
Q:Why only organic traffic? Doesn't that hurt external validity?
Paid traffic has very different purchase intent, so mixing it in would add variance and traffic-mix differences that make the UI effect harder to isolate. Yes, it limits the result to organic users. For the first test we prioritized internal validity; after validating the effect, the next step would be to test on paid segments.
Q:Visitor IDs are cookie-based. What about users who clear cookies or switch devices?
They can be counted as new visitors and may land in a different group. That adds some noise and slightly dilutes the measured effect, but it shouldn't bias the direction. [如果当时做过登录用户的子集分析,在这里补一句]
这是对随机单位的进一步追问,学员原材料没有覆盖,属于需要提前准备的问题。
统计
Q:How did you determine the sample size?
CTR is a proportion, so I used a two-sample proportion test. Inputs were the historical baseline CTR, the minimum detectable effect, alpha of 0.05, 80% power, and a 50/50 split. That gave roughly 35,000 users per group, and historical traffic showed we could reach that within the test window.
Q:What MDE did you use and why?
[X]% relative lift. It came from what the product team considered worth shipping, balanced against how much traffic we had.
MDE 学员原材料没有给出。被问到时要能说出数值和来源,否则前面的样本量计算站不住。
Q:What test did you use, and what were H0 and H1?
A two-proportion z-test. H0: treatment and control have the same checkout CTR. H1: they differ. I looked at both the p-value and the confidence interval for the difference; p was below 0.05 and the interval excluded zero.
Q:Was the 13% relative or absolute? What was the baseline?
Relative. For planning, the baseline was recent historical CTR; for the analysis, the baseline was the control group's actual CTR during the test.
Q:How did CUPED work here? What about new visitors with no pre-period data?
CUPED uses a pre-experiment covariate that's correlated with the outcome, here prior engagement, to remove predictable variance, which tightens the confidence interval without biasing the estimate. For visitors without pre-period data, [说明当时的处理,例如用均值填充或只对有历史的用户做调整].
新访客没有历史数据,是 CUPED 在匿名流量上最常被追问的点。原理可以参考 John Data Lab《数据科学统计面试资料库》。
Q:The bullet mentions multivariate tests. How did you handle multiple comparisons?
[说明当时的做法,例如对多个处理组做 Bonferroni 或 Holm 校正,或者事先只指定一个主比较].
简历写了 multivariate,就一定会被问多重检验。
执行
Q:Did you check for sample ratio mismatch?
Yes. Before looking at results, I compared observed user counts in each group with the expected 50/50 using a chi-square goodness-of-fit test. There was no significant mismatch, so no sign of a randomization or logging issue.
Q:Why run for two weeks if you hit the sample size earlier?
To cover full weekday and weekend cycles, so a short-term traffic pattern couldn't drive the result.
Q:Did you peek at results?
We fixed the sample size and duration in advance and didn't make a decision on interim numbers. Stopping as soon as p dips below 0.05 inflates the false-positive rate.
Q:How did you think about novelty effects?
[说明是否看过按天的效应走势,例如效应在两周内是否稳定].
UI 改动常被问新奇效应。
指标与决策
Q:Why checkout CTR instead of purchase conversion or revenue?
Revenue was the long-term goal but too far downstream and noisy for a UI change. CTR is the most direct and sensitive measure of whether users progress more easily. I tracked purchase conversion to make sure we weren't just generating low-quality clicks.
Q:What if CTR went up 13% but purchase conversion dropped 10%?
I wouldn't launch on CTR alone. I'd look at the full funnel and whether net purchases and revenue went up or down, plus the guardrails. If net business value dropped, the test isn't a win even though the primary metric improved.
Q:Why bounce rate and processing time as guardrails?
A redesign could raise clicks while making the page more confusing or slower. Bounce rate covers user experience and processing time covers technical performance.
Q:How did you use filter interactions?
As a diagnostic metric. Fewer repeated filter actions combined with more checkout progression supports the friction-reduction hypothesis. Fewer filter actions alone wouldn't mean much.
这类项目最容易丢分的地方
- 说不出 MDE 和样本量是怎么来的。
- 只报 p 值,不讲置信区间和效应大小。
- 主指标、次要指标、护栏指标分不清,或者只有一个指标。
- 不知道自己的提升是相对还是绝对。
- 简历写了 multivariate test,却没准备多重检验的问题。