When would you use survival analysis instead of a binary churn classifier, and how would you set it up?
What the interviewer wants to hear
- Survival analysis models time until churn, not just whether it happens
- Handles right-censored customers who are still active
- Kaplan-Meier for descriptive curves, Cox or survival forests for covariates
- Check proportional hazards and time-varying covariates
- Evaluate with concordance index and calibration over time
Model answer
A binary classifier answers "will this customer churn in the next 30 days", which needs a fixed window and throws away information about when churn happens. Survival analysis models time to churn and uses customers who are still active as right-censored observations, rather than dropping them or treating them as non-churners. I would start with Kaplan-Meier curves by plan or acquisition channel to describe retention. For prediction I would use a Cox proportional hazards model for interpretable hazard ratios, or a survival forest or gradient boosted survival model if effects are non-linear. I would check the proportional hazards assumption, because effects like a discount often fade over time, and handle time-varying covariates such as recent usage carefully to avoid using future data. Evaluation uses the concordance index for ranking and calibration of predicted survival at key horizons like 90 days.
Can you answer it under time pressure?
Take a timed hard round and get scored on every answer.
More hard Data Scientist questions
- An A/B test shows a significant 3% increase in conversion but a significant 2% drop in average order value. What do you do?
- Leadership wants to know the effect of a loyalty programme that launched for everyone last year, with no experiment. How do you estimate it?
- Build a daily demand forecast for 5,000 products across 200 stores. How would you approach it?
- Why are A/B tests tricky in a two-sided marketplace like a ride-hailing app, and how would you handle it?
- Daily active users dropped 8% overnight. How do you investigate?
- Marketing wants to send a discount only to customers it will actually persuade. How would you build and validate that targeting model?
- A model that looked strong offline performs much worse a month after launch. How do you investigate?
- You must estimate the effect of a feature that users chose to adopt, using propensity score methods. What can go wrong and how do you guard against it?
- The business wants to know how demand responds to price for thousands of products. How would you estimate price elasticity?