The business wants to know how demand responds to price for thousands of products. How would you estimate price elasticity?
What the interviewer wants to hear
- Observational price changes are confounded by demand and promotions
- Use experiments or natural variation such as staggered price changes
- Log-log models give elasticity as a coefficient
- Pool across products with hierarchical models for sparse items
- Control for seasonality, competitors, stock-outs and cannibalisation
Model answer
The core problem is confounding: prices are often cut when demand is low or raised during peaks, so a naive regression of sales on price gives the wrong sign or size. The best data comes from randomised price tests across stores or time, and the next best from natural variation like staggered price changes or cost-driven changes unrelated to demand. I would model log units against log price, so the coefficient is the elasticity, with controls for seasonality, promotions, competitor prices and holidays. Stock-outs must be handled, because zero sales when out of stock is not low demand. With thousands of products, many have little price variation, so I would use a hierarchical model that shrinks each product towards its category average. I would also check cross-effects, since cutting one price can cannibalise similar products, and validate predictions on held-out price changes before using them for pricing.
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?
- When would you use survival analysis instead of a binary churn classifier, and how would you set it up?
- 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?