#### Discover more from Data Science is not Rocket Science

The Business Solutions Series is a compilation of solutions to various business challenges that I have encountered throughout my professional journey.

#### Context

We were working on a system that processes millions and millions of sales opportunities daily and needs to make optimal pricing decisions for each one. For each opportunity, the system needs to choose a price that will maximize revenue while considering the probability of the sale being completed at that price. As the price increases, the potential revenue from the transaction increases, but the likelihood of making the sale decreases.

#### Objective

The objective was to maximize revenue through smart pricing.

#### Solution

To achieve this, we first discretized the range of product prices by dividing them into X equally spaced price options. We then used various transaction attributes (such as details about the product, the buyer, and the market conditions) to build a binary classification model that would predict the likelihood of a sale being completed at a given price. The price, along with the transaction attributes, were used as features in the model.

One of the crucial elements of this project was obtaining reliable and unbiased data to accurately learn the true probabilities. Given that the system handles a vast number of transactions daily, we utilized a small random subset of these transactions, and we randomly selected one of the X different prices for each transaction. We then used this set of randomly chosen transactions and prices as the training data for our model.

After obtaining a clean dataset for training the model, we leveraged an AutoML managed service to effortlessly learn a sophisticated yet precise neural network ensemble. This model generated accurate probabilities of closing a sale for any of the X prices in combination with the transaction attributes. For every new transaction, we generated X different sale probabilities, and then computed the expected revenue and selected the price that would maximize it (i.e. sale probability * potential revenue = expected revenue).

#### Impact

This straightforward solution allowed us to quickly implement the price optimizer in production and rapidly increase company revenue by millions of dollars.

## Optimal Pricing for Revenue Maximization

How did you choose the size of your bucket? It seems that, if too small, your computing time increases, but if too large, you are only leaving potentially bucket_size/2 on the table.