Applying Data Science for Pricing

3 min readFeb 2, 2024

One area with significant potential for impact in many companies is PRICING, where cool projects can impress managers! Thinking of helping those looking for a less common project, or even those wanting to implement changes within their current company, here are some very concrete tips from what I’ve used. Basically, a collection of ideas from different sources! Save this!


I suggest starting with modeling pricing using a machine learning model (probably CatBoost or XGBoost). I’ve even posted about this (click here to read); the idea is simple: use characteristics of a product (or whatever you want to price) to predict the selling price. Example: you’re trying to predict a mobile phone price. You can use its memory, hardware, brand and size as features for the model. It’s simple, just gather historical sales data, pick a machine learning model, and throw in the product’s features. It’s the easiest step, but I’d bet with anyone that a good part of the companies would already see interesting results with just this model.


Well, then comes the second step: price elasticity! Explaining for those unfamiliar with the term, price-demand elasticity is basically understanding how much the demand for a product changes when you tweak the price. For example, increasing the price by 1 dolar reduces the demand by 5 units. Finding the ideal selling price with your ML model is cool, but it doesn’t necessarily give you the highest profit you can achieve. It might be better to sell less at a higher price, or more at a lower price. The trick is to combine elasticity with your model to find the price that maximizes your profit.

And here’s an important point that I took a while to include in my strategies: often, to estimate this elasticity, we need to look at the seasonality and trend of the data, try to extract that, sort of get the price “clean” (I don’t know if there’s an official term, I just gathered information and combined it). This, of course, can be done with time series techniques. Here you’ll find a good article to start with!

Finally, with the “clean” data, you can even use linear regression to get the elasticity. Or, you can take exogenous shocks and run panel models (RDD, Diff-in-Diff, etc). This way, you can better understand the impact of your pricing decisions on your models and your profits.


In conclusion, using data science for pricing can really help a company do better. Start by using a machine learning model, like CatBoost or XGBoost, to figure out how to set prices based on what you know about the product and what has happened in the past. This first step can already make things better for many businesses.

The next important part is understanding price elasticity, which means seeing how changing the price might make people buy more or less of something. This can help you decide on the best price that makes the most money, which might mean selling more at a lower price or selling less at a higher price.

Remember, you don’t have to do everything at once. Start with the basic model, and then try adding more steps like looking into price elasticity. Each step you take will make your project better and teach you more about using data science for setting prices.

With guides like this and help from chatGPT, you have what you need to work through the tricky parts of pricing. Take it step by step, and you’ll find that you can handle more than you thought at first.




Mathematician with a master degree in Economics. Working as a Data Scientist for the last 10 years.