Designing a Native E-Commerce Shopping Module Experiment
Statistics & ExperimentsModel answerLast updated
Define a comprehensive metric hierarchy, interference strategy, power analysis, and multi-objective launch framework for an embedded feed feature.
You are leading the experimentation strategy for adding a native, interactive E-Commerce Shopping Module directly inside a social platform's discovery feed.
Formulate a detailed experimentation proposal covering the following four components:
1. Metric Hierarchy & Definitions
- Select and precisely define one primary success metric and 3–5 guardrail metrics (specifying numerator, denominator, unit of analysis, and aggregation window).
- Include at least one explicit intermediate funnel metric (e.g., feature click-through rate, dwell time within the shopping surface, add-to-cart rate).
- Evaluate the trade-offs of using broad platform engagement metrics (e.g., DAU, total user time spent) as primary success metrics versus localized purchase/conversion metrics (e.g., Shopping CTR, Add-to-Cart Rate, GMV per DAU).
- Define acceptable non-inferiority margins (direction and relative magnitude) for all guardrail metrics.
2. Experimental Architecture, Interference & Novelty
- Compare potential experimental designs (user-level randomization with counterfactual logging, cluster/geographic split, switchback/time-based, or two-stage saturation). Select one primary design and justify your choice.
- Detail the exact unit of randomization, user eligibility criteria, exposure logging rules, and cooldown/washout periods.
- Propose concrete statistical techniques to:
- Detect and quantify spillover effects (e.g., control users observing shoppable content via re-shares or graph connections).
- Separate novelty/learning effects from true long-term behavior change (e.g., tracking feature usage slopes across user exposure cohorts).
3. Power Analysis, Sample Size & Variance Reduction
- Provide explicit sample size calculations and MDE (Minimum Detectable Effect) estimates under concrete baseline variance/CV assumptions.
- Address variance reduction using CUPED (or covariate adjustment) and describe how you will handle ratio metrics.
- Detail how you will account for weekly seasonality, peak traffic events, and potential sample ratio mismatches (SRM).
4. Trade-off & Launch Decision Framework
Suppose a 21-day experiment yields the following results:
- Shopping CTR: $+2.3%$ (statistically significant)
- GMV per User: $+1.1%$ (statistically significant)
- Total Time Spent: $-0.6%$ (statistically significant; breaches a $-0.5%$ guardrail)
- DAU: $-0.2%$ (statistically significant; breaches a $-0.1%$ guardrail)
Formulate a multi-objective decision framework. Recommend whether to launch, hold, or iterate, detailing specific diagnostic checks (e.g., cannibalization of ad revenue, repeat vs. one-off buyers, user segment heterogeneity) required before making a final executive decision.
Hints
Hint 1
For the primary metric, balance business value against variance; ITT metrics (denominated by assigned users) prevent post-exposure selection bias.
Hint 2
User-level randomization usually yields higher statistical power than cluster-level, provided exposure logging handles shared content appropriately by suppressing treatment UI for control viewers.
Hint 3
When total time spent decreases while conversion increases, evaluate whether the feature improved transaction efficiency or degraded content feed engagement.
Model answer
Hard Try it yourself first — then compare your approach, complexity and edge cases.
1. Metric Hierarchy & Definitions
Primary Success Metric
- Shopping GMV per Eligible User (21-Day ITT)
- Numerator: Total gross merchandise value (USD) from purchases originating from the Shopping module (using a 7-day post-click attribution model), winsorized at the 99.9th percentile to limit tail variance.
- Denominator: All users randomized into the arm who satisfied pre-assignment eligibility criteria, regardless of whether they actually saw the module.
- Unit of Analysis: User.
- Aggregation Window: Days 8–21 for the primary readout (excluding Day 1–7 burn-in).
Why this primary metric? It directly captures the net monetary value the feature is designed to generate without conditioning on exposure (avoiding selection bias).
Intermediate & Funnel Metrics (Diagnostics)
- Module Impression Rate: $\frac{\text{Module Impressions}}{\text{Total Feed Sessions}}$ (Unit: User-Session).
- Shopping CTR: $\frac{\text{Unique Module Clicks}}{\text{Module Impressions}}$ (Unit: User-Session ratio; delta-method variance).
- Shopping Dwell Time: $\text{Seconds spent in native shopping views} \div \text{Exposed User-Days}$.
- Add-to-Cart (ATC) Rate: $\frac{\text{Users with } \ge 1 \text{ Add-to-Cart Events}}{\text{Exposed Users}}$ (Unit: Exposed User).
Guardrail Metrics (Non-Inferiority Tests)
All guardrails are evaluated using one-sided non-inferiority tests ($\alpha = 0.05$) over the 21-day window.
| Guardrail Metric | Definition (Numerator / Denominator) | Unit of Analysis | Max Acceptable Change |
|---|---|---|---|
| Active Days per User | Total active days / Total eligible users | User | $\ge -0.1%$ |
| Total Feed Time Spent | Total seconds in app feed / Total eligible users | User | $\ge -0.5%$ |
| Ad Revenue per User | Total ad dollars generated / Total eligible users | User | $\ge -0.3%$ |
| Organic Engagement Rate | (Organic Saves + Shares + Comments) / Total eligible users | User | $\ge -1.0%$ |
| Feed Latency & Friction | p95 Feed rendering latency (ms) & Module Hide/Report Rate | Session / Impression | Latency $\le +20\text{ms}$; Hides $\le +5.0%$ rel. |
Metric Trade-off Evaluation
- DAU or Time Spent as Primary: High overall relevance but extremely poor sensitivity. A localized module rarely shifts total platform DAU by more than a fraction of a percent. Additionally, optimizing for time spent can reward UI friction (e.g., users struggling to find product details).
- Shopping CTR / ATC Rate as Primary: Highly sensitive, but easily gameable via aggressive placement or clickbait visual design. High CTR does not inherently mean high user value or downstream conversion.
- GMV per Eligible User (Chosen Primary): Directly aligns with value creation. High baseline variance is mitigated via winsorization and CUPED.
2. Experimental Architecture, Interference & Novelty
Recommended Design: User-Level Randomization with Exposure Logging
We select user-level randomization over geo-clustering or switchbacks to preserve statistical power. Spillover is mitigated through server-side rendering logic.
[ Eligible User Request ]
│
Hash User ID + Salt (50/50)
┌─────────┴─────────┐
▼ ▼
[ Control Arm ] [ Treatment Arm ]
Standard Feed Module Rendered
(Log Counterfactual (Log Actual
Exposure Event) Exposure Event)
│ │
└─────────┬─────────┘
▼
Viewer-Based Rendering Rule:
Shared Content evaluates viewer's arm.
Control viewers never see module UI.
- Randomization Unit: User ID (salted MurmurHash3 modulo 100).
- Eligibility Criteria: Users in supported e-commerce regions, running app version $\ge v24.0$, with $\ge 1$ feed session in the prior 28 days. Eligibility is determined prior to treatment assignment.
- Exposure Rules & Counterfactual Logging: The system logs an exposure event when the module is served (Treatment) or when the feed algorithm would have served the module (Control).
- Viewer-Based Rendering Rule: If a Treatment user saves/shares a shoppable item, a Control user viewing that shared content receives standard non-interactive rendering. This prevents direct treatment UI exposure in the Control group.
Spillover & Interference Diagnostics
Although viewer-based rules eliminate UI contamination, indirect behavioral spillovers can still occur via social interactions.
- Network Exposure Regression: Compute the fraction of a Control user's 1-hop social graph that is in Treatment ($S_i = \frac{|\text{Treated Neighbors}|}{|\text{Total Neighbors}|}$). Run the regression: $$Y_i = \alpha + \beta \cdot \text{Treatment}_i + \gamma \cdot S_i + \epsilon_i \quad \text{for Control users}$$ A statistically significant $\gamma \neq 0$ signals network spillover.
- Cluster Validation: If network spillover $\gamma$ is material, trigger a secondary 2-stage graph-clustered saturation experiment.
Novelty & Learning Effect Mitigation
- Burn-in Window: Exclude Days 1–7 from the primary decision analysis.
- Cohort-Based Usage Slopes: Segment exposed users by their initial exposure date ($C_1, C_2, \dots$). Model daily feature engagement over exposure age $t$: $$\text{CTR}(t) = \theta_0 + \theta_1 \log(t)$$ A negative $\theta_1$ that fails to asymptote by Day 21 indicates an unextinguished novelty effect.
- Long-Term Holdout Group: Reserve a $5%$ global holdout arm for 90 days post-launch to monitor long-term retention decay.
3. Power Analysis, Sample Size & Variance Reduction
Sample Size & MDE Estimation
Using standard two-sample hypothesis testing formulations ($\alpha = 0.05, 1 - \beta = 0.80$): $$n = \frac{2 (z_{1 - \alpha/2} + z_{1 - \beta})^2 \cdot \sigma^2}{\delta^2} = 15.7 \cdot \frac{\text{CV}^2}{\text{MDE}_{\text{rel}}^2}$$
Raw Data (CV ≈ 20)
│
Winsorize at 99.9th %
│
Winsorized (CV ≈ 10)
│
CUPED Variance Reduction
(Pre-period GMV, ρ²=0.3)
│
Effective Variance:
σ²_CUPED = σ²(1 - 0.3)
│
Final MDE Target
11M Users / Arm (1.0%)
- GMV per User: Raw coefficient of variation ($\text{CV} = \sigma / \mu$) is high ($\approx 20$) due to non-purchasing users. Winsorization brings $\text{CV} \approx 10$. Applying CUPED using 28-day pre-experiment GMV yields $R^2 \approx 0.30$. $$n_{\text{arm}} = 15.7 \cdot \frac{100}{0.0001} \cdot (1 - 0.30) \approx 11 \text{ million users/arm (for 1.0% MDE)}$$
- DAU / Active Days: Baseline $\text{CV} \approx 0.67$. CUPED yields $R^2 \approx 0.60$. $$n_{\text{arm}} = 15.7 \cdot \frac{0.44}{10^{-6}} \cdot (1 - 0.60) \approx 2.8 \text{ million users/arm (for 0.1% MDE)}$$
Variance Reduction (CUPED) & Ratio Metrics
- CUPED Transformation: For user outcome $Y_i$, adjust using pre-experiment metric $X_i$: $$\hat{Y}_{i,\text{CUPED}} = Y_i - \theta (X_i - \bar{X}), \quad \text{where } \theta = \frac{\text{Cov}(Y, X)}{\text{Var}(X)}$$
- Ratio Metrics (e.g., CTR): Standardized using the Delta Method to account for non-independent observations across user sessions: $$\text{Var}\left(\frac{\sum C_i}{\sum I_i}\right) \approx \frac{1}{\bar{I}^2} \text{Var}(C) + \frac{\bar{C}^2}{\bar{I}^4} \text{Var}(I) - \frac{2\bar{C}}{\bar{I}^3} \text{Cov}(C, I)$$
Seasonality, Peaks & SRM Diagnostics
- Duration: Run in increments of full 7-day cycles (21 days total) to neutralize day-of-week seasonality.
- Traffic Ramp & Peak Events: Exclude major seasonal shopping holidays (e.g., Black Friday) unless explicitly testing peak performance. Ramp traffic $1% \to 5% \to 50%$ over 3 days; discard data from ramp days.
- Sample Ratio Mismatch (SRM): Perform daily Pearson's goodness-of-fit $\chi^2$ test on assigned count ratios. Reject trial if $p < 0.001$.
4. Trade-off & Launch Decision Framework
Multi-Objective Decision Matrix
┌────────────────────────┐
│ 21-Day Results │
└───────────┬────────────┘
│
┌────────────────────┴────────────────────┐
▼ ▼
Primary & Funnel Guardrail Breaches
GMV/User: +1.1% (p<0.05) Time Spent: -0.6% (Limit: -0.5%)
Shop CTR: +2.3% (p<0.05) DAU: -0.2% (Limit: -0.1%)
│ │
└────────────────────┬────────────────────┘
▼
[ Action: HOLD & ITERATE ]
Interpretation of Results
- Primary Success: GMV/User ($+1.1%$) and CTR ($+2.3%$) confirm that the module drives incremental e-commerce transactions.
- Guardrail Violations: Total Time Spent ($-0.6%$) and DAU ($-0.2%$) breached their non-inferiority thresholds ($-0.5%$ and $-0.1%$, respectively).
Diagnostic Framework Before Executive Decision
Before deciding to roll back or override the guardrail breach, execute the following three diagnostics:
1. Task Efficiency vs. Engagement Cannibalization
- Hypothesis A (Task Efficiency): Users complete purchases quickly and leave the app satisfied, reducing idle scroll time without degrading intent.
- Hypothesis B (Content Displacement / Fatigue): Shopping cards displace high-engagement organic content, leading to user churn.
- Diagnostic Test: Analyze time spent in the non-shopping organic feed. If organic feed time spent is flat while total time spent drops by exactly the duration of the shopping session, it supports task efficiency. If organic feed engagement (saves, comments) drops significantly, it indicates content displacement.
2. Ad Revenue Cannibalization & Net LTV Model
Calculate Net Economic Lift ($L_{\text{net}}$): $$L_{\text{net}} = \Delta \text{GMV} \times \text{Take Rate} + \Delta \text{Ad Revenue} - \Delta \text{LTV}_{\text{churn}}$$
- If $L_{\text{net}} < 0$ due to loss in ad impressions or user churn ($\Delta \text{DAU} = -0.2%$), the feature is net negative despite the positive GMV lift.
3. Heterogeneity & Novelty Decay
- User Segmentation: Check if DAU drop is concentrated among non-shoppers who find the module intrusive vs. active buyers.
- Repeat Purchase Velocity: Evaluate whether GMV lift is driven by one-off initial novelty purchases or repeat transactions.
Final Recommendation: HOLD & ITERATE
- Do Not Launch immediately: The breach of both DAU and Time Spent guardrails poses long-term retention risks.
- Iterate UI & Density: Reduce frequency of module insertion in the feed for users with low predicted purchase intent to protect organic engagement.
- Extend Holdout Test: Run a modified treatment arm with dynamic placement rules for an additional 14 days alongside a 5% long-term holdout to monitor retention trajectories.