← Uber Interview Insights

Uber·Data Scientist·Technical Phone Screen·Senior

Senior
Apr 2026

Summary

Uber DS interview that went deep into survival analysis for rider behavior modeling. The question was essentially one long technical prompt, and they expected you to hold the whole thing together without much scaffolding.

Questions Asked (3)

Q1

How would you model rider abandonment as a function of how long they've already been waiting? Walk through the survival analysis setup including S(t), h(t), relevant covariates, censoring, and your choice of model.

Data ModelingProduct Analytics & MetricsTechnical Trade-offs
Author's notes

This is a meaty one.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Frame the problem as a time-to-event analysis where the event is rider cancellation and the time scale is wait time. Define S(t) and h(t), discuss right-censoring for rides that get matched, and propose a Cox proportional hazards model with time-varying covariates to capture how abandonment risk evolves with wait duration.

Pro tip: Emphasize that the baseline hazard itself is the key product insight—it shows how abandonment risk changes with wait time—and mention that you'd validate the proportional hazards assumption and consider time-varying effects if it fails.

1. Define the event and time scale

Clarify that the event is rider cancellation and the time scale is the waiting time from request to cancellation or match. Explain that S(t) is the probability of still waiting at time t, and h(t) is the instantaneous cancellation rate given the rider has waited until t.

2. Address censoring

Discuss right-censoring: riders who get matched before cancelling are censored at their match time. Mention that censoring is likely non-informative but could be informative if, e.g., high-demand periods cause both longer waits and more matches.

3. Identify relevant covariates

List covariates that affect abandonment: rider history (past cancellations, loyalty), trip characteristics (distance, fare), real-time context (surge multiplier, ETA, time of day, weather), and supply-demand metrics (number of available drivers nearby).

4. Choose and justify the model

Propose a Cox proportional hazards model with time-varying covariates (e.g., updated ETA) to estimate covariate effects while leaving the baseline hazard flexible. Alternatively, suggest a parametric model (e.g., Weibull) if a specific shape is expected, or a machine learning approach like random survival forests for prediction.

5. Validate and interpret

Mention checking the proportional hazards assumption (e.g., Schoenfeld residuals) and, if violated, using time-varying coefficients or stratified models. Interpret the baseline hazard to understand how abandonment risk changes with wait time and use the model to simulate interventions.

Key Points to Mention

  • Survival function S(t) and hazard function h(t) definitions in the context of rider wait times
  • Right-censoring for riders who are matched before cancelling
  • Cox proportional hazards model with time-varying covariates
  • Covariates: rider history, trip attributes, real-time supply/demand, surge pricing, ETA
  • Proportional hazards assumption and diagnostics (e.g., Schoenfeld residuals)
  • Alternative models: parametric (Weibull) or machine learning (random survival forests)

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

How do you check whether the proportional hazards assumption holds, and what do you do if it doesn't?

Data ModelingTechnical Trade-offs
Author's notes

Scaled Schoenfeld residuals plotted against time, plus log-log survival curves.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by explaining the importance of the proportional hazards (PH) assumption in Cox models, then describe both graphical and statistical methods to check it. Finally, discuss remedies if the assumption is violated, emphasizing practical trade-offs and business impact.

Pro tip: Mention that at scale, like at Uber, you often need to balance model complexity with interpretability, and sometimes stratified models or time-varying coefficients are preferred over abandoning the Cox framework entirely.

1. Explain the PH assumption

Briefly define that the hazard ratio between any two individuals is constant over time. Highlight that this is a key assumption of the Cox proportional hazards model.

2. Describe graphical checks

Discuss log-minus-log survival plots and Schoenfeld residual plots. Explain how to interpret them: parallel curves for log-minus-log, and random scatter around zero for Schoenfeld residuals.

3. Describe statistical tests

Mention the Schoenfeld residual test (e.g., correlation between residuals and time) and the global test. Note that these tests can be sensitive with large datasets.

4. Discuss remedies if violated

List options: stratify by the violating variable, include time-varying coefficients, use accelerated failure time models, or switch to a different model like random survival forests.

5. Relate to business context

Tie the choice of remedy to the business problem: interpretability, prediction accuracy, and computational constraints. Emphasize that the solution should align with stakeholder needs.

Key Points to Mention

  • Schoenfeld residuals and the cox.zph test in R
  • Log-minus-log plots for visual inspection
  • Stratification as a simple fix for categorical variables
  • Time-varying coefficients for continuous variables
  • Alternative models: accelerated failure time, random survival forests
  • Trade-offs between interpretability and flexibility

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q3

How would you handle time-varying covariates in this survival model, for example if the quoted ETA updates while the rider is waiting?

Data ModelingTechnical Trade-offs
Author's notes

Counting process formulation, splitting each rider's timeline into intervals where the covariate is constant.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the survival model's structure and the nature of the time-varying covariate (quoted ETA). Then discuss appropriate methods like extended Cox models or joint modeling, and emphasize the importance of avoiding look-ahead bias and ensuring temporal validity.

Pro tip: Mention that you would validate the model using time-dependent AUC or concordance, and consider the practical implication: if ETA updates frequently, you might need to discretize time or use a landmark approach to keep the model tractable.

1. Clarify the problem and data structure

Confirm that the quoted ETA is updated at irregular intervals and that the event of interest (e.g., rider cancellation) can occur at any time. Identify whether the covariate is endogenous (affected by the event) or exogenous.

2. Choose a modeling approach

For exogenous time-varying covariates, use an extended Cox model with time-dependent covariates. For endogenous covariates, consider joint modeling of the longitudinal ETA process and the survival outcome.

3. Handle data formatting and risk sets

Convert the data into a counting process format (start, stop, event) where each row represents an interval with a constant covariate value. Ensure that the risk set at each event time includes only subjects still at risk and with the correct covariate values.

4. Address potential biases and validation

Avoid look-ahead bias by only using covariate values available up to time t. Validate the model using time-dependent metrics like time-dependent AUC or Brier score, and check proportional hazards assumption for time-varying effects.

5. Consider practical implementation and trade-offs

Discuss computational complexity and whether to discretize time or use a landmark analysis. Weigh the benefits of joint modeling against its complexity and interpretability for business insights.

Key Points to Mention

  • Extended Cox model with time-dependent covariates
  • Joint modeling for endogenous covariates
  • Counting process data format (start, stop, event)
  • Avoiding look-ahead bias and ensuring temporal validity
  • Time-dependent validation metrics (e.g., time-dependent AUC)
  • Computational trade-offs and discretization/landmarking

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.