Solved – Calculate price elasticity from a history of sales data

correlationelasticitylogisticpython

I'm looking at sales data with sales at different prices over time, I can't figure out a good approach to getting the:
'If we increase our prices by 1% how much will our demand change by? '

the data i have looks as such:
Individual line item sales, associated with whole orders, associated with accounts.
I've tried grouping by accounts and comparing average prices, grouping by purchase and comparing average accounts purchase sizes, and basically a lot of grouping and doing things.

I guess I could approach this problem with a random forrest clasifier, or perhaps run it through a neural network, but i'm a little lost and looking for a point in the right direction at this point.

Best Answer

There are quite a few ways to skin this cat.

But, as with much econometrics, the question you need to start with is this: what is my hypothesis?

In the end, you have (1) items, with prices and quantities; (2) and orders with many items. It raises endless questions about what drives what. Given that you are focusing on the top most-sold items, that helps a lot.

My gut tells me - if you have adequate data - that you look first (and hopefully) at the relationship between units vs price for the top N items (actually, if you want elasticity, you do log(items sold) vs. log(price)).

Deeper down, my intuition tells me you do this customer-by-customer. Suppose you are selling, as one item, razor blades. It may be that there is a relationship to price, but if the cost to produce a blade is \$1, you might find small customers buy 10,000 per month at \$1.25, and 12,000 per month at \$1.20. But, if Walmart is your 'large' customer, you might find they buy 1,000,000 per month at \$1.20 and 1,200,000 per month at \$1.18.

You can see the problem: Walmart buys more at any price than a small customer, and it has nothing to do with price elasticity and everything to do with scale. Any linear model will have a problem given one customer buys 12,000 at \$1.20, and another buys 1,000,000 at the same price.

Most likely you really want to look at something like percent increase in sales per customer vs. percent increase in price to that customer, so that the big/large customer effect (if there is one) gets normalized out.

Again, think through your hypothesis. Using statistics to 'find' the pattern seldom works. You need to identify what pattern you think exists, build a hypothesis and null hypothesis, and test that.

Related Question