PracHub
QuestionsCoachesLearningGuidesInterview Prep
|Home/ML System Design/Two Sigma

Predict Citi Bike Demand at a Specific NYC Station

Last updated: Jul 2, 2026

Quick Overview

This question evaluates time-series forecasting, demand estimation, and ML system-design competencies, focusing on problem framing, handling censored observations, data integration, model selection, and evaluation under operational constraints.

  • hard
  • Two Sigma
  • ML System Design
  • Data Scientist

Predict Citi Bike Demand at a Specific NYC Station

Company: Two Sigma

Role: Data Scientist

Category: ML System Design

Difficulty: hard

Interview Round: Technical Screen

Citi Bike is New York City's bike-share system: riders pick up a bike at one docked station and drop it off at another. Operations needs to know how many bikes to stock at each station, so you are asked to build a model that predicts **demand — the number of bike pickups — at one specific station**. Walk through, end to end, how you would frame the prediction problem, what data and features you would use, what models you would try, and how you would evaluate whether the model is good enough to drive stocking decisions. ```hint Demand is not the same as observed rentals The trip logs record *completed pickups*. When the station has zero bikes available, observed pickups are zero no matter how many people wanted a bike — the demand signal is censored. Decide how your target handles this before modeling. ``` ```hint Earn your complexity A seasonal-naive baseline (e.g., "same hour last week", or the historical mean for that hour-of-day and day-of-week) is surprisingly strong for this kind of series. Build it first; then justify anything fancier — lag features plus a gradient-boosted regressor is a strong tabular default — by beating it in backtests. ``` ```hint Evaluate like a forecaster Random train/test splits leak the future into training. Use a rolling-origin (time-ordered) backtest and report error per forecast horizon against the naive baseline. ``` ### Constraints & Assumptions - Several years of historical trip records are available (start/end station, start/end timestamps). - Weather observations and forecasts, plus calendar data (holidays, day of week), can be joined. - Unless the interviewer redirects, assume the operational need is an hourly pickup forecast for the next 24 hours, refreshed at least daily, to plan overnight rebalancing. - The model targets one station, but you may use data from other stations for features or training signal. ### Clarifying Questions to Ask - What decision does this forecast drive — rebalancing trucks, dock sizing, pricing? That determines the horizon, granularity, and which errors are costly. - Is "demand" pickups only, or do we also care about dropoffs / net flow at the station? - Should the target be *observed* pickups, or *true* demand corrected for hours when the station was empty? - How far ahead must the forecast go, and how often is it refreshed? - Is under-prediction (stockouts, lost rides) more costly than over-prediction (idle bikes), i.e., do we need quantiles rather than a point forecast? - Is this a one-off for a single station, or a pilot for all stations in the system? ### What a Strong Answer Covers ```premium-lock What a Strong Answer Covers ``` ### Follow-up Questions - Observed pickups are zero whenever the station has no bikes. Concretely, how would you estimate *true* demand for those censored hours, and how would you validate the correction? - How would you scale from this one station to the full network of stations — one model per station or one global model with station features/embeddings — and what are the trade-offs? - A nearby subway line shuts down for a month and demand jumps. How would your system detect that the model has gone stale, and how would you adapt? - If operations says a stockout costs five times as much as an idle bike, how does that change your modeling target and your evaluation metric?

Quick Answer: This question evaluates time-series forecasting, demand estimation, and ML system-design competencies, focusing on problem framing, handling censored observations, data integration, model selection, and evaluation under operational constraints.

Related Interview Questions

  • Design GenAI Fine-Tuning and Agent Tradeoffs - Two Sigma (medium)
  • Predicting Stock Prices from Twitter Data - Two Sigma (hard)
|Home/ML System Design/Two Sigma

Predict Citi Bike Demand at a Specific NYC Station

Two Sigma logo
Two Sigma
Nov 28, 2025, 12:00 AM
hardData ScientistTechnical ScreenML System Design
2
0

Citi Bike is New York City's bike-share system: riders pick up a bike at one docked station and drop it off at another. Operations needs to know how many bikes to stock at each station, so you are asked to build a model that predicts demand — the number of bike pickups — at one specific station.

Walk through, end to end, how you would frame the prediction problem, what data and features you would use, what models you would try, and how you would evaluate whether the model is good enough to drive stocking decisions.

Constraints & Assumptions

  • Several years of historical trip records are available (start/end station, start/end timestamps).
  • Weather observations and forecasts, plus calendar data (holidays, day of week), can be joined.
  • Unless the interviewer redirects, assume the operational need is an hourly pickup forecast for the next 24 hours, refreshed at least daily, to plan overnight rebalancing.
  • The model targets one station, but you may use data from other stations for features or training signal.

Clarifying Questions to Ask

  • What decision does this forecast drive — rebalancing trucks, dock sizing, pricing? That determines the horizon, granularity, and which errors are costly.
  • Is "demand" pickups only, or do we also care about dropoffs / net flow at the station?
  • Should the target be observed pickups, or true demand corrected for hours when the station was empty?
  • How far ahead must the forecast go, and how often is it refreshed?
  • Is under-prediction (stockouts, lost rides) more costly than over-prediction (idle bikes), i.e., do we need quantiles rather than a point forecast?
  • Is this a one-off for a single station, or a pilot for all stations in the system?

What a Strong Answer Covers Premium

Follow-up Questions

  • Observed pickups are zero whenever the station has no bikes. Concretely, how would you estimate true demand for those censored hours, and how would you validate the correction?
  • How would you scale from this one station to the full network of stations — one model per station or one global model with station features/embeddings — and what are the trade-offs?
  • A nearby subway line shuts down for a month and demand jumps. How would your system detect that the model has gone stale, and how would you adapt?
  • If operations says a stockout costs five times as much as an idle bike, how does that change your modeling target and your evaluation metric?

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More ML System Design•More Two Sigma•More Data Scientist•Two Sigma Data Scientist•Two Sigma ML System Design•Data Scientist ML System Design

Your design canvas — auto-saved

PracHub

Master your tech interviews with 8,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.