Why Age-Restricted Orders Fail More Often, and How to Test a Fix
Statistics & ExperimentsModel answerLast updated
Diagnose why one product category has a lower fulfillment rate on a delivery platform, choose data to confirm each cause, and analyze a randomized fix using a two-sample t-test.
You work on a delivery marketplace connecting customers, merchants, and couriers. Dashboards show that orders containing age-restricted items (alcohol) are fulfilled successfully less often than all other orders.
Answer the three parts below.
- Explanations. Give several plausible business or operational reasons why age-restricted orders might finish less often than ordinary ones.
- Validation. Say which additional data you would examine to confirm or rule out each explanation.
- Testing a fix. The company ships a simple randomized change meant to raise the fulfillment rate of these orders. Describe how you would judge its effect with a two-sample t-test. Cover:
- the null and alternative hypotheses,
- the assumptions you rely on,
- the test statistic at a high level,
- how you would read and report the result.
You do not need to consider a switchback (time and region alternating) design.
Hints
Hint 1
Sort the failure causes by the stage of the order lifecycle where they happen (before assignment, at pickup, at handoff) and by who ends the order (customer, merchant, courier, system).
Hint 2
Before treating the gap as caused by the product category, ask whether these orders are concentrated in particular hours, markets, or merchant types. Compare within matching slices.
Hint 3
Each order is a 0/1 outcome, so the group mean is a rate. Think about the unit of randomization, whether variances are equal, and how you would report both a p-value and an effect size with a confidence interval.
Model answer
Easy Try it yourself first — then compare your approach, complexity and edge cases.
Overview
This question tests two skills: breaking a marketplace metric into testable causes, and running a standard hypothesis test correctly. A strong answer links each hypothesis to a concrete data check and then states the test precisely, including its practical caveats.
1. Plausible explanations
Organize by where the order fails and who ends it.
Handoff (customer side)
- Identity checks fail: no valid ID, expired ID, name mismatch.
- The recipient is underage, is not the account holder, or appears intoxicated.
- The customer is unreachable. Unlike ordinary orders, these cannot be left at the door, so a missed handoff becomes a failure.
Courier supply
- Fewer couriers are eligible (age, opt-in, local rules), so assignment is slower and more orders time out unassigned.
- Couriers decline these orders because handoffs are slower and a failed one means returning goods to the store.
Merchant and regulation
- Legal sale-hour cutoffs: an order is accepted just before the cutoff and cannot be completed.
- Liquor merchants close earlier, run out of specific items, or disallow substitutions.
- Dry zones, address restrictions, or quantity limits block fulfillment.
Customer behavior and payment
- Orders cluster late at night and on weekends, when ETAs are longer and customers cancel or become unavailable.
- Larger baskets trigger more fraud holds and payment declines.
Mix effects
- The category may not be the cause at all. If these orders are concentrated in lower-completion markets, hours, or merchant types, the raw gap is a composition effect (Simpson's paradox). State this explicitly, because it determines whether the problem is the product or the context.
2. Data to validate
Start with a funnel decomposition: split unfinished orders by stage reached (placed, merchant accepted, courier assigned, picked up, handed off) and by who canceled (customer, merchant, courier, system), using reason codes. This often eliminates half the hypotheses.
| Hypothesis | Data to inspect |
|---|---|
| ID or handoff failure | ID scan pass/fail and reasons, retry counts, "unable to deliver" codes, return-to-store events |
| Courier scarcity | Eligible couriers near each order, time to assign, offer decline rate, unassigned-timeout rate vs. other orders in the same zone and hour |
| Merchant or legal limits | Order time vs. legal cutoff, merchant cancel and out-of-stock rates, substitution attempts |
| Long ETA | Quoted vs. actual ETA, customer cancel rate by ETA bucket |
| Payment or fraud | Authorization declines, fraud-hold rate by basket value |
| Mix effects | Completion gap within strata of market × hour × weekday × merchant type, or a logistic regression of completion on the category flag plus those controls |
Useful extra cuts: mixed baskets vs. restricted-only baskets, and new vs. repeat customers. Repeat customers know to have ID ready, which isolates ID-related failures.
3. Evaluating the randomized fix
Assume the change is a pre-checkout reminder to have ID ready, and restricted orders are randomly assigned to treatment or control.
Metric and unit. Fulfillment is 0/1 per order, so the group mean is the completion rate. Analyze at the unit of randomization. If users were randomized, compute a per-user rate, or keep order-level data and use cluster-robust or delta-method standard errors, since one user's orders are correlated.
Hypotheses
- H₀: μ_T = μ_C (no effect on completion).
- H₁: μ_T ≠ μ_C (two-sided by default). A one-sided alternative is acceptable only if pre-registered and you would never act on a harmful result.
Assumptions
- Random assignment, so a difference in means is causal.
- Independence across observations. Marketplaces can violate this through shared courier supply, but a customer-facing prompt has little interference, which is why a switchback is unnecessary.
- Approximately normal sample means. The outcome is binary, but with thousands of orders the Central Limit Theorem applies.
- Unequal variances allowed: use Welch's t-test. At large n it agrees with the two-proportion z-test.
Test statistic
$$t = \frac{\bar{x}_T - \bar{x}_C}{\sqrt{\dfrac{s_T^2}{n_T} + \dfrac{s_C^2}{n_C}}}$$
where x̄ is the group mean, s² the sample variance (≈ p(1−p) for a binary metric), and n the group size. Degrees of freedom come from Welch–Satterthwaite; at these sizes t is effectively standard normal.
Worked example. Control: 20,000 orders at 88.0%. Treatment: 20,000 orders at 89.0%.
- SE = √(0.88·0.12/20000 + 0.89·0.11/20000) ≈ 0.00319
- t ≈ 0.010 / 0.00319 ≈ 3.13, p ≈ 0.002
- 95% CI: 0.010 ± 1.96·0.00319 ≈ [+0.37, +1.63] percentage points
Interpretation
- Statistical: p < α (say 0.05), so reject H₀. The p-value is not the probability that H₀ is true.
- Practical: report the CI and compare it against the smallest lift worth shipping. A lower bound of +0.4 pp may or may not justify the change.
- Non-significant result: say "no effect detected at this power," not "no effect." Check whether the test was powered for the minimum detectable effect.
- Guardrails: check delivery time, checkout conversion (the prompt could deter purchases), courier earnings, and above all ID compliance. A completion gain from weaker age verification is a legal failure, not a win.
- Mechanism: confirm the lift shows up where predicted, e.g. ID-failure cancellations should fall.
Trade-offs and numbers
- Detecting a 1 pp lift on an 88% base at 80% power and α = 0.05 needs roughly 9,000 to 10,000 orders per arm. Smaller effects need quadratically more.
- Pre-register the metric, the sample size, and the stopping rule to avoid peeking and p-hacking.
Common mistakes
- Listing causes without tying each to a failure stage or a data check.
- Treating the raw gap as causal and ignoring market and time confounding.
- Analyzing orders as independent when randomization was by user.
- Assuming equal variances without need, or declaring "no effect" from a non-significant result.
- Reporting only a p-value without an effect size and interval.
- Ignoring guardrail metrics, especially compliance.