Prescriptive Data Science: Single Agent / Static Problem - Joint Price Optimization (1/2)

 

Prescriptive Data Science: Single Agent / Static Problem - Joint Price Optimization (1/2)

Welcome back. In the previous article, I have described four different types of prescriptive data science problems, which depend on two key dimensions: (1) number of agents and (2) dependency across time periods. 


In this article, I will show how to solve a prescriptive data science problem, starting with the simplest case: single agent / static problem. To make it concrete, I will use joint (regular) price optimization as a sample use case. Please note that Scipy.optimize is the main Python library that we will use to solve this problem. In addition, familiarity with concepts from Microeconomics and Operation Research — i.e. price elasticity, demand curve, profit maximization, non-linear optimization will be helpful to follow explanation below. 


By the end of this article, you will learn: 

  • Key elements of problem definition for single agent / static prescriptive data science problem
  • Overview of methods to solve single agent / static prescription data science problem (i.e. optimization methods)  

In the subsequent article (2/2 of this article), a toy example will be shown with Python code to demonstrate this with a sample use case of joint price optimization for a retailer.

What would be key elements that we need to have to properly define single-agent / static prescriptive data science problems. These elements are summarized below. I have used (joint) price optimization as a sample use case to make concepts more concrete.

(1) Objective (function): This is a quantitative measure of the performance that the business uses to evaluate the business outcome. Most of time, total profit (i.e. bottom line) and total revenue (i.e. top revenue) are frequent candidates as an objective in optimization. However, other business metrics such as customer life-time value can be considered depending on the relevant time horizon and the nature of business questions. Please also note that it is possible to have multiple objectives with varying importance weights (e.g. 80% profit + 20% revenue).

  • As an example, in the case of joint price optimization for a retailer, total category profit for a soft drink category for the year of 2021 can be an objective function that a business wants to maximize.

(2) Decision variable(s): These are a set of variables that the company can control and change. Please also note that there should be a functional mapping from decision variables to the objective function. Often times, this functional mapping is provided by "predictive" data science modeling.

  • As an example, let's consider a single retailer in a small town with no competitors. To avoid dynamic consideration such as forward buying, let's also assume that this retailer is a EDLP (i.e. everyday low price) retailer without Hi-Lo promotions. In other words, the price for each product remain stable and constant over time.
  • In the “joint price optimization” (i.e. pricing optimization) for this retailer in a soft drink category, a set of EDLP prices for 3 products in a given category is an example of decision variables.
  • A previous predictive modeling efforts such as price elasticity modeling will provide a predictive modeling API (i.e. application programming interface) for the subsequent price optimization. Simply put, you can imagine a black box, which takes prices for 3 products as an input (together with other external variables which impact overall demand and profit such as time of the year and costs of goods sold ). This black box will produce the total category profit as an output. It is common to do predictive modeling first to create this predictive modeling simulation module. This will be used in the subsequent optimization (i.e. prescriptive data science.)
(3) Constraints: Oftentimes, businesses have a set of business rules or guard rails that need to be considered to make final recommendation for business actions. It is very common to apply these rules after initial attempt of optimization, which has unexpected consequences of over-riding optimization results. More proper way of doing optimization is incorporating these set of rules as “constraints” in the constrained optimization. These rules can enter as bound constraints (e.g. “upper / lower" bound”), “equality” constraints, or “inequality constraints”.
  • As an example, in the joint price optimization, a group of products may need to have a same price due to a contractual agreement between a retailer and a manufacturer or due to the needs of simplification for business decision making — so called “line pricing.” This line pricing rule can enter as “equality” constraints for the “constrained pricing optimization”. If product 1 price should be same to product 2 price, this can be specified as: price (product 1) = price (product 2). If a retailer is reluctant to make more 10% increase in price from current price level, this can enter as upper bounds for price increases: i.e. price (product 1) ≤ 1.10 x current price (product 1).
  • The common constraints for joint price optimization are as follows.
    • Upper and lower bounds for prices: Dramatic changes in prices can be problematic. Thus, it is common to only consider +/- 10% changes from current EDLP prices
    • Cost: To ensure that the final prices have enough margin compared to cost, a lower bound constraint can be applied - e.g. cost + $0.20, cost x 1.20
    • Competitive prices: Since we are considering a single retailer in a town, this would not be applicable here. For a cases with competition, a retailer often has a target price index compared to a main competitor. As an example, a retailer may want to make sure that they stay price competitive by not charging 10% more than a price of a key competitor. This can enter as a upper bound constraints - e.g. price of product 1 <= 1.1 x price of key competitor. Please note that this will matter more for key value items (i.e. the product that consumer pay most attention and use as a basis for price perception)
    • Line pricing: It is quite common to have line pricing requirements where a set of products under the same brand and package sizes to have the same prices. This will enter as "equality" constraints
    • Store brands vs. national brands: For a similar product, store brands tend to sell at lower prices compared to national brands. The average discount % of store brands compared to national brands are shown to be ~ 24%. To ensure the proper price positioning of store brands, retailers also use % discount compared to a focal national brands as inequality constraints (e.g. upper/lower % threshold compared to a focal national brand product)
    • Premium brands vs. regular brands: Oftentimes, there can be a premium product (e.g. organic peanut butter), which is expected to have higher prices compared to regular product (e.g. JIF regular peanut better). This can be applied as inequality constraints
    • Pack size price curve: For frequently purchased consumer goods, it is quite common to have multiple package sizes for the same product: e.g. Coca Cola Regular 12OZ 12 Pack vs. Coca Cola Regular 12OZ 6 Pack. It is easy to justify lower per equivalent unit (e.g. per 12OZ) price for a large package size due to expected quantity discount. Thus, it is important to ensure that per equivalent unit price show expected relationship: large package size has lower per equivalent unit prices. You would be surprised to find that some times these relationship are not maintained or reversed if retailers are very systematic with their pricing. Again, this can enter as inequality constraints.

Having proper constraints for pricing is very important first step in price optimization. I often observe that putting these systematic pricing rules itself can lead to positive profit impacts even before doing formal mathematical joint price optimization. Moreover, predictive models alone may not produce proper price recommendation due to data limitation and strong assumptions implicitly and explicitly made in the predictive models. Because of this, it is very important to have proper pricing constraints to generate sensible pricing recommendations. Figuring out objectives and constraints would require multiple rounds of discussion with relevant business owners. Given the importance of proper constraints for pricing, I have summarized typical pricing constraints in the picture below. 

Picture 1. Typical Constraints for Joint Pricing Optimization


2. Overview of optimization methods: Single-agent / static prescriptive data science problem 


Once we know how to properly define prescriptive data science problem, the next natural question is "how to solve the defined prescriptive problem". For single-agent / static prescriptive data science problem, we can use the methods and tools from mathematical programming and optimization. In case readers are not familiar with the available methods in mathematical optimization, I have provided an overview of optimization methods in the picture below (Picture 2). The proper choice of the method can be driven by key dimensions summarized below. Please refer to the detailed description in Picture 2. 

  • Constraints: Unconstrained vs. constrained. Most of practical problems would belong to constrained optimization. 
  • Decision variable types: Continuous, discrete, and mixed. Joint price optimization problem is an example of continuous decision variable. Discrete or mixed optimization in general is harder to solve. Those may require commercial solvers such as CPLEX or Gurobi. 
  • Objective type: Single vs. multi. Single objective case is easier to solve. 
  • Linear / non-linear: Linear vs. non-linear. This depends on whether the relationship between decision variables and objective and constraints are expressed as linear or non-linear. Please note that linear optimization is easier since it often guarantee global optimum solution. However, most of the practical prescriptive data science problems are non-linear. Non-linear optimization problems suffer from generating local optimum solutions. Thus, either multiple starting values (e.g. 30 random starting values) or global optimization methods are used to circumvent this problem. Please note that joint pricing problem is also non-linear optimization problem.  
  • Uncertainty: Deterministic vs. uncertain. For a simple case, we will not consider any uncertainties in outcomes and consider prediction as deterministic. Obviously, there are uncertainties with predictions from your predictive models. Thus, stochastic methods or robust methods can give you more robust results. However, these are more sophisticated, thus it would require more time investment and efforts.  

The overview of optimization methods are shown in the Picture 2. 

Picture 2. Overview of optimization methods:
Single-agent / static prescriptive data science problem 


In a subsequent article, we will make these concept more concrete by solving a small toy example of joint (EDLP) price optimization for a single retailer in a soft drink category. 

Finally, shown below are a few links for pricing papers. 

(1) National brands vs. store brands 

What Makes Consumers Pay More for National Brands Than for Store Brands: Image or Quality?

(2) Product line pricing 

Consumer preferences and product-line pricing strategies: An empirical analysis

Optimal product line pricing: The influence of elasticities and cross-elasticities

Comments

Popular posts from this blog

Cracking Business Case Interviews for Data Scientists: Part 1

How The Influence of Multi-Tiered Private Label Brand Architecture Varies Across Retailers

Cracking Business Case Interviews for Data Scientists: Part 2