Predicting Price Elasticity of Demand with Python (Implementing STP Framework - Part 5/5)

Asish Biswas9 Sep 2022

Problem

A retailer wants to raise prices without losing many buyers but does not know where demand starts to react. Customers differ in how they react to price: some accept a higher one, others leave. The question is how far each segment's price can go before demand drops faster than the price rises.

Example from the article: a candy purchase dataset where customers are split into four segments (standard, career-focused, fewer-opportunities, well-off) and the price of each brand is compared with whether the customer bought.

Solution in brief

Fit a logistic regression of purchase on price, then turn its coefficient into an elasticity at every price on a grid. The price where elasticity crosses -1 separates the range where a rise is safe from the range where it hurts. Repeating this per segment shows how far each group's safe price extends.

Questions this case answers
  • How to estimate the price sensitivity of different customer groups from purchase records when no price experiments can be run
  • How to find the price point where demand switches from insensitive to sensitive using a simple interpretable model
  • How to find the price at which raising prices starts to cut demand?
  • How to compare price sensitivity across customer segments?

Tools and methods

  • Logistic regression — models the probability of purchase as a function of price.
  • Price elasticity of demand (PED) — percentage change in quantity demanded divided by percentage change in price; here computed from the model coefficient at each price point.
  • Segment-level models — one regression per customer segment to compare sensitivity.
Continue reading — it's free

Google or a one-time email code. No password.