Testing a Courier-Priority Elevator Rule in Apartment Towers
Statistics & ExperimentsModel answerLast updated
Design an experiment to test whether dedicating one elevator to couriers at peak hours speeds up deliveries without hurting residents, covering randomization, metrics, and interference.
Scenario
A food-delivery platform wants to pilot a rule for tall residential buildings: during busy meal-time hours, one elevator car is set aside for delivery couriers, with the goal of shortening deliveries. Residents are worried that having one fewer car for them will lengthen their waits. You have been asked to design the experiment that measures the effect of this rule.
What to cover
- Randomization unit. Elevator dispatch can't be changed for one resident at a time within a building. Propose an experimental design and justify your unit of randomization (individual, building, time window, or a combination).
- Metrics. Choose a primary success metric for the courier side and a primary guardrail metric for the resident side. Explain how each is computed and why you chose it.
- Bias and spillover. Identify at least one source of bias or interference in your design and describe how you would reduce it.
Available data and constraints
- You have IoT logs of elevator calls, arrivals, and departures, plus timestamps for completed deliveries.
- Think about the feedback loop: if couriers become faster, customers may order more, which changes the baseline elevator load that you are trying to measure.
Follow-up to be ready for
If you propose a switchback design (alternating the rule on and off across time slots), explain how you would deal with carryover, where congestion or a bad experience in one slot affects behavior or conditions in the next.
Hints
Hint 1
Residents share elevators, so treating one person or one car in isolation affects everyone else. Ask which unit keeps queues from interfering with each other.
Hint 2
Consider combining two designs: a longer cluster-randomized test across buildings for the steady-state effect, and a switchback within buildings for a more powerful read on the immediate effect.
Hint 3
For metrics, isolate the part of the delivery the elevator actually influences, and for residents focus on tail waits rather than averages, framed as non-inferiority against a pre-agreed margin.
Model answer
Medium Try it yourself first — then compare your approach, complexity and edge cases.
Framing
This is a two-sided experiment with interference. Couriers and residents compete for the same scarce resource (the elevator bank), and the policy can change demand itself. A good answer picks a randomization unit that contains interference, defines metrics that isolate the elevator effect, names concrete spillovers, and separates the policy effect from organic growth.
1. Randomization unit
| Unit | Assessment |
|---|---|
| Individual resident or courier | Not implementable, and violates SUTVA: people share cars, so one person's assignment affects others. |
| One elevator within a building | Residents pushed out of the reserved car crowd the others, so control cars get worse and the comparison is contaminated. |
| Building (cluster) | Elevator queues don't cross buildings, so interference is largely contained. Captures equilibrium effects such as behavior and demand changes. Downsides: few units and high between-building variance. |
| Time window within a building (switchback) | Each building is its own control, so power is much higher. Downsides: carryover, and it cannot capture slow demand adaptation. |
Recommended design: a hybrid.
- Primary arm: stratified building-level randomization. Stratify on elevator count, floors, units, and baseline peak delivery volume. Run 4-6 weeks so steady-state behavior, including any rise in orders, shows up.
- Companion arm: a switchback in a subset of buildings, with the rule ON or OFF by day. This gives a high-power estimate of the immediate mechanical effect on waits.
If the two estimates disagree, the gap is itself evidence of behavioral or demand adaptation.
Switchback details
- Switch by day, not by hour, so each full peak window (lunch and dinner) sits in a single condition. This also avoids confusing residents.
- Randomize the schedule (balanced across weekdays) rather than strictly alternating, to avoid confounding with day-of-week.
- Washout: drop the first 15-30 minutes after each flip so leftover queues don't leak across the boundary. If you flip more often than daily, drop the first slot after each change.
Separating the effect from organic growth: concurrent control buildings absorb platform-wide trends. Add a difference-in-differences against a 2-4 week pre-period and normalize metrics per delivery or per call.
2. Metrics
Courier primary: vertical delivery time. Per order, from the courier's first elevator call or lobby entry (IoT or geofence) to delivery completion. Report mean and p90.
- Avoid total delivery time; restaurant prep and traffic dominate it, diluting the effect and inflating variance.
- Analyze at the building or building-day level with cluster-robust standard errors.
Resident guardrail: p90 peak-hour wait, call to arrival, resident calls only.
- Use a tail statistic: residents react to the worst waits.
- Frame as non-inferiority with a margin set in advance (for example, no more than +10% or +15 s). "Not significant" does not mean "no harm."
- In control buildings, exclude courier calls so groups are comparable (match by app GPS or delivery timestamps).
Secondary: orders per building per day (demand response), courier deliveries per hour, resident trip volume and stair-use proxies, complaint tickets, ride time, and reserved-car utilization (an idle reserved car is wasted capacity).
3. Biases and spillovers
- Demand feedback. Faster deliveries raise orders, which raises courier load and offsets part of the gain while hurting residents. A day-level switchback can't see this because ordering won't react to daily flips. Use the long-running building arm as the source of truth, track orders as an outcome, and report both per-delivery and total-load results.
- Shared courier pool. Couriers work in both arms. Time saved in treated buildings frees capacity that also speeds control deliveries, biasing the effect toward zero. Randomize geographic clusters (complexes or zones) and keep the primary metric as vertical time, which depends only on a building's own elevators.
- Resident adaptation. Residents may take stairs or shift trips off-peak, making waits look better while a real cost exists. Monitor resident call volume and its time-of-day distribution, and treat a fall in trips as a harm signal.
- Compliance and novelty. Couriers or residents may ignore the rule. Track compliance (share of reserved-car rides made by couriers) and use intent-to-treat as the primary analysis. Look at effects over time for novelty decay.
- Carryover in the switchback. Besides washout, include a lagged-treatment term in the model or test for carryover by comparing slots after ON vs OFF. Keep slots long enough that queues clear.
Follow-ups
Setting the MDE with noisy waits. Power is driven by the number of clusters, not rides. Use the design effect DE = 1 + (m - 1)ρ, with m rides per cluster and ρ the intra-cluster correlation, and MDE ≈ (z₁₋α/₂ + z₁₋β) · √(2σ²·DE / N). Estimate σ and ρ from historical logs, and validate with A/A simulations that assign fake treatment to past data to check variance and false-positive rate. Reduce variance with CUPED using each building's pre-period metric, stratification, winsorizing or log-transforming waits, building-day aggregation, and the switchback. Then ask whether the achievable MDE (say 20 s of vertical time) matters to the business; if not, add buildings or run longer.
Couriers improve, residents look neutral. Verify the confidence interval lies inside the non-inferiority margin rather than merely being wide. Slice by building segment (few vs. many elevators, high vs. low delivery density), since small buildings will likely suffer most, and consider rolling out only where the trade-off is favorable. Check the time-of-day tail for pockets of harm and look at the demand response.
Common mistakes
- Randomizing individual elevators or people and ignoring interference.
- Using total delivery time as the courier metric.
- Using mean wait as the resident guardrail and treating a non-significant result as safe.
- Alternating ON/OFF strictly by hour with no washout.
- Ignoring the order-growth feedback loop.
- Forgetting to exclude courier calls from resident wait metrics.