Compare Fixed and Variable Train Gaps Without a Timetable

Quick Overview

Compare two train services for a commuter who arrives without consulting a timetable. Explain the assumptions and derivation clearly, check edge cases, and show how the result changes when those assumptions no longer hold.

Compare Fixed and Variable Train Gaps Without a Timetable

Company: Deshaw

Role: Software Engineer

Category: Statistics & Math

Difficulty: hard

Interview Round: Technical Screen

# Compare Fixed and Variable Train Gaps Without a Timetable Compare two train services for a commuter who arrives without consulting a timetable. Service A has a fixed 10-minute gap. Service B repeats gaps of 5, 10, and 15 minutes. Assuming the commuter's arrival time is uniformly distributed over a long operating cycle, compute the expected waiting time for each service and explain which is preferable under this criterion. ### Constraints & Assumptions - Train dwell time is negligible and service repeats indefinitely. - The commuter arrives independently of the schedule. - For Service B, each 5-, 10-, and 15-minute interval occurs once per cycle. - Preference is based only on expected wait, not variance, crowding, or missed connections. ### Clarifying Questions to Ask - Are the variable gaps a deterministic repeating schedule or independent random draws? - Is the commuter's arrival independent of train arrivals? - Should the comparison include worst-case waiting time as well as expectation? ```hint Compare identical mean gaps carefully Both services average ten minutes between trains; explain why that fact alone may or may not determine a random commuter's wait. ``` ```hint Check the extremes Relate the short and long gaps to both the best-case and worst-case wait before calculating an expectation. ``` ### What a Strong Answer Covers - The residual-wait calculation for a fixed interval. - Length-biased sampling of variable intervals, also known as the inspection paradox. - Correct weighting by time spent in each interval rather than by interval count. - A conclusion that names the assumptions under which it holds. ### Follow-up Questions - How do the wait-time variances compare? - What changes if the 5-, 10-, and 15-minute gaps are chosen with unequal frequencies?

Overview: Compare two train services for a commuter who arrives without consulting a timetable. Explain the assumptions and derivation clearly, check edge cases, and show how the result changes when those assumptions no longer hold.

|Home/Statistics & Math/Deshaw
Deshaw logo
Deshaw
Apr 20, 2026
hardSoftware EngineerTechnical ScreenStatistics & Math
2
0

Compare Fixed and Variable Train Gaps Without a Timetable

Compare two train services for a commuter who arrives without consulting a timetable. Service A has a fixed 10-minute gap. Service B repeats gaps of 5, 10, and 15 minutes. Assuming the commuter's arrival time is uniformly distributed over a long operating cycle, compute the expected waiting time for each service and explain which is preferable under this criterion.

Constraints & Assumptions

  • Train dwell time is negligible and service repeats indefinitely.
  • The commuter arrives independently of the schedule.
  • For Service B, each 5-, 10-, and 15-minute interval occurs once per cycle.
  • Preference is based only on expected wait, not variance, crowding, or missed connections.

Clarifying Questions to Ask Guidance

  • Are the variable gaps a deterministic repeating schedule or independent random draws?
  • Is the commuter's arrival independent of train arrivals?
  • Should the comparison include worst-case waiting time as well as expectation?

What a Strong Answer Covers Guidance

  • The residual-wait calculation for a fixed interval.
  • Length-biased sampling of variable intervals, also known as the inspection paradox.
  • Correct weighting by time spent in each interval rather than by interval count.
  • A conclusion that names the assumptions under which it holds.

Follow-up Questions Guidance

  • How do the wait-time variances compare?
  • What changes if the 5-, 10-, and 15-minute gaps are chosen with unequal frequencies?
Loading comments...