Expected Rider Wait When Food Readiness Is Uncertain
Last updated: November 29, 2026
Quick Overview
Food for an order becomes ready at a time uniformly distributed between 0 and 20 minutes after acceptance, and the rider is scheduled to reach the restaurant at minute 12. Find the expected rider wait and expected time food sits waiting, then the arrival time that minimizes a weighted cost when rider minutes cost three times food minutes.
Swiggy
November 29, 20260
0
0 solved
Food for an order becomes ready at a time uniformly distributed between 0 and 20 minutes after acceptance, and the rider is scheduled to reach the restaurant at minute 12. Find the expected rider wait and expected time food sits waiting, then the arrival time that minimizes a weighted cost when rider minutes cost three times food minutes.
Swiggy times rider arrival at the restaurant against predicted preparation time: too early wastes fleet capacity, too late lets food go cold. The phone screen checks expectation of a truncated variable and whether you recognize the newsvendor-style quantile answer.
What the Interviewer Expects
- Writes rider wait as max(R - t, 0) and food wait as max(t - R, 0)
- Integrates correctly over the uniform density
- Derives the optimal arrival as a quantile of the readiness distribution
- Gives the numeric answers 1.6, 3.6 and 15 minutes
- Interprets the result in operational terms
Key Topics to Cover
How to Approach This
- Define your hypotheses (H0 and H1) clearly before performing any test.
- Calculate required sample size BEFORE running an experiment, using power analysis.
- Remember the Central Limit Theorem: sample means become approximately normal with large n.
- Watch for Simpson's paradox. Always segment data by key dimensions.
- Distinguish between statistical significance and practical significance.
Possible Follow-up Questions
- How does the answer change if preparation time is right-skewed, say log-normal?
- What if the cost of cold food grows with the square of the wait?
- How would you estimate the readiness distribution from data where you only see when the rider left?
- How should the arrival target differ during a peak when riders are scarce?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Browse Statistics QuestionsSample Answer
Clarify
Let be readiness time in minutes and the rider arrival. Rider wait , food wait . Cost weights: per rider minute, per food ...
Approach
Compute both expectations by integrating against the density , then minimize by differentiating with respect to ....