# Pricing strategy - How technology can help

The article is written by Chhaya Narula, originally for Tattva - annual Consult Club magazine of IIM Ahmedabad and is being published on this blog after her permission.

### Introduction

Pricing strategy has been a major pain point for companies, be it deciding on the prices while launching new products, reacting to price changes by competitors or even deciding on the amount of discount necessary to remain competitive in the market. Whether the objective is to maximize profits, gain market share or just to survive in the market, pricing and discount have always been a prime tool in the arsenal of marketers and strategists in the companies.

### What is usually done

Not many years have passed by since we used to decide prices by adding a fixed markup on the cost of a product or matching (qualitatively) our competitors on their prices. And when we felt adventurous, we calculated the value of the product in eyes of the customer and did value based pricing. When psychologists started to notice pricing strategies, they come up with several theories to help marketers in fine tuning the prices like fractional pricing, anchoring on the left most digit of the price, relative pricing, etc.

With the advent of e-commerce and large-scale retail stores, prices of products change very frequently and so does the discounts given on them. In such cases, it becomes very difficult for companies to monitor and adjust their prices based on market conditions, competitor’s prices, the price of complementary goods, discounts given, etc. Thus in such cases it becomes imperative to be one step ahead of the competitor to keep your prices at the right level, not only to keep or gain market share but also to maximize your profits. Decision-making in companies has become more data driven with the advent of a large amount of good quality data, technology to process that data, and a commitment to use the available data and technology to make smarter decisions. Activities such as advertisement decisions, supply chain management, optimization, etc. are predominantly done using technologies to convert data into actionable insights. It was only the logical next step for technology to penetrate pricing strategies, and this is not a recent phenomenon but has been done since computers became able to process and create models on large data streams.

Pricing and promotion are two major levers that a company can use to optimize and control their sales. Both these levers affect not only the volume of the product but also profitability. There are several attributes related to product that directly affect the sales of the product. These factors include - the price of the product, discounts, sales channel, Won distribution, Competitors’ price, discount and competitors’ distribution in the market. Promotion, on the other hand, includes any activity by the company that influences the buying decision of the customer at the point of sale. This is another vital axle that affects the volume of the product. Promotion happens in different forms, from a small banner near the product aisle to free gifts and multi-packs.

### Why is optimal pricing strategy important?

Since there are numerous factors that affect final sales of the product, it becomes difficult to judge the success of a strategy qualitatively, be it price change or promotion. Finding the actual reason behind increased or decreased sales of the product is important to repeat the performance or correct the mistakes. Wrong attribution of a reason to the increased sales can lead the manager to repeat the wrong strategy in next cycle with very negative results. For example, a client increased the price of a product and saw an increase in revenue by about 5% and was convinced to keep the prices at the same level in next quarter or maybe even increase it marginally. But when a detailed analysis was done, it was found that price increase actually resulted in lost revenue which was offset by other factors namely, increased distribution of a variant of client’s product and also delisting of a competitor variant. These factors are either controllable but non-repeatable or non-controllable. Hence it is absolutely critical that a negative aspect is not repeated. Because of this reason, next quarter sales might take a hit if price was increased further. In order to set the prices at the optimal level in next quarter, a new pricing strategy was required. Similar to the example above, before starting any analysis, few hypothesis are constructed in the business frame on the basis of common business sense or exploratory data analysis whose validity needs to be tested using appropriate models and simulations. These business questions are in the form of a claim, be it competitors product affecting the company’s performance or company’s strategy affecting own sales, for example, would a new product launch in a premium tier affect the sales of the same brand in lower tier given certain reactions are expected from the competitors.

### How is it done & key considerations

While doing pricing and promotion analysis, the granularity of analysis can be controlled depending on the business context. Different SKU’s are often clubbed together in the forms of PPGs (similarly priced and promoted goods). Henceforth, using a log-linear modelling technique the volume of the PPG is regressed on its price, competitor’s price, discounts, distribution and promotions. The elasticities for price and discounts are calculated along with discount, promotion and distributions lifts. Here, elasticities help to understand the percentage change in the volume of the product given a percentage point change in its price (Own- Price elasticity) and percentage change in competitors’ price (Cross- price elasticities). These values are then used as inputs in simulators to test the business hypothesis.

The analytical framework used in pricing models to determine optimal pricing strategy cannot be applied across industries and geographies without understanding the business context. For example, developed economies have well-developed data collection systems that allow the use of granular weekly data, covering a large portion of the market along with reliable data on local promotions. Whereas in developing economies, one needs to extrapolate available data to cover the whole market in the absence of complete data. In certain countries, manufacturer controls the prices to a great extent whereas retailers have a larger control in other countries. Thus, these factors need to be accounted for while making the hypothesis or creating models.

### Conclusion

To summarize, any strategic decision on prices or promotions which a manager or consultant used to make based on deep business understanding or accounting for precedence in the industry are now being tested using simulations before actually implementing them in the field. These models not only help in understanding the effect of changes in strategy on sales; but it also helps in classifying the factors affecting sales into controllable and non-controllable bins, thus giving managers the right levers to tweak.

Thus, with advancement in technology, increasingly, the role of the consultant is not just to provide a better analytical solution for pricing strategy based on all the seemingly related factors but also to bring down the gap of uncertainty between the analytical solution and real life business solution by taking into account the abundance of available data analytics techniques & machine learning which may bring out correlations which at the outset may look to be seemingly ludicrous.

Chhaya Narula, Senior Analyst, Fractal Analytics

She has worked extensively on promotion and pricing strategies for largest global consumer good companies. She has also worked on driving loyalty programs for leading retailers across the globe and devising strategies for telecom companies to acquire new customers. Earlier she did her graduation from Delhi University and Masters in Economics from JNU, Delhi.

# To splash or not to splash - splash screen in Android

Sometime back, best practices used to suggest against splash screen in Android but now, even Google has come up with the suggestion to implement one, in some circumstances.

If your application has a time-consuming initial setup phase, consider showing a splash screen or rendering the main view as quickly as possible, indicate that loading is in progress and fill the information asynchronously. In either case, you should indicate somehow that progress is being made, lest the user perceive that the application is frozen.[1]

The right way to do a splash screen in Android, is not to inflate a layout before the MainActivity Layout. It just slows things down.

Recommended way to do is to apply a style to the MainActivity itself in the XML and just before the MainActivity inflates it's layout, switch the style to your original theme.

This is how you can do -

Notes / References   [ + ]

 1 ↑ https://developer.android.com/training/articles/perf-anr.html#Reinforcing

# Communicate between two activities in Android from background (or even Asynchronous thread)

Data can be passed between Actities and Fragments, but to communicate between two activities when data needs to passed from an Asynchronous thread running in one activity to the other, after the other activity has already loaded can't be done using intent.putExtra().

The specific use case discussed here required communicating a change from one activity to other. If you have the change ready to pass before starting the next activity, you can simply use Intent.putExtra()

But this is not always possible. Consider the following case -

There are two activities, FirstActivity and SecondActivity. In FirstActivity, you have some function which downloads some data from the web using AsyncHttpClient. Once the data download is finished you have to update something in both Activities (say mark the item as 'downloaded'). The function to download the data and update UI afterwards can be -

# How evil can customer segmentation be - pushing the limits

Note - This is a just a hypothetical thought experiment

Do you think companies are capable of describing and to a great extend predicting your behaviors? Are they capable of predicting what brands you are going to buy next?

What can be the implications of such power, are they only limited to providing you tailored services? Before we try to understand the implications, it is imperative to point a common "success" story in consumer analytics - Target figuring out that the girl is pregnant even before her parents knew. It is interesting to note that this was the story in 2012. It has been about 3 years of exponential growth in Data Analytics, from traditional machine learning to deep learning.

So what if they know what you want to buy, At most they are going to bombard you with relevant advertisements, Right? Let's not get into the discussion on advertisement and privacy concern associated with it. What more evil can come out of it? Well the evil associated with such kind of power is only limited with the creativity of the marketer.

## Thought experiment -

Suppose I am one of the brands in mobile industry. Now given the huge amount of data you are generating from your mobile phone usage, I can with great degree of accuracy predict if you are going to buy my brand again or not, if your current phone is outdated. I can increase my sales without much investment in ground breaking technology. How? -

If I was able to predict that you are likely to stick with my brand, I can push targeted updates to your phone (in the name of customized experience) which are unnecessarily heavy and cause your phone to freeze often. You are going to discard that perfectly alright phone for a new phone of my brand.

Bingo! I just made 1 more sale without any investment

Can just repackaging help you penetrate a new customer segment and increase sales?

## How Segmentation as a process has evolved -

Customer segmentation has grown from a qualitative exercise of identifying groups of customers having similar needs and wants based on common categorical variables like - age, gender, religion, income etc, to a more quantitative one taking in account a whole array and combination of variables, given availability of large amount of data coupled with an access to a spectrum of clustering algorithms.
How segmenting your customer base helps you
When you have several segments of customers, you can identify the needs of each segment and define the value proposition of your product to target those needs and wants. More often than not, it involves a turn around of your product if you want to enter a whole new segment. The process starting from identifying what values the new segment wants, what value you are currently providing and what else is required to win the customer.

## Identifying & delivering the right set of values is not always the key to success

Consider the bottled ketchup business. You are targeting two segments - Children & parents. As a value proposition you are providing great taste for child to make them ask for the product and at the same time you are portraying real tomatoes and quality to win the parents. Everything looks perfect. But now you want to increase consumption of ketchup among the two segments. What will you do? - Increase taste or increase the quality and nutrition content. Both of which require significant product development. These steps are not bad in any sense. But what if we can do something without changing the product?

# Do machine learning algorithms have memory?

This blog was written by me for Fractal Analytics' blog, which was published on 28th April 2015

Machine learning algorithms are getting better and better at understanding and predicting data. They learn from historical data and predict the future. But are they actually learning from their history? Do they even have a memory to know what the history is?

At a high level, machine learning algorithms learn that there was a certain situation or state in history, more formally defined by some independent variables $\{x_1, x_2, x_3, ... \}$. Owing to this situation there was an outcome to it, defined by the dependent variable y. The algorithm learns from these historic x, y pairs and tries to predict y for an unknown state in future. To some extent it feels like the algorithm has a sense of history because it is using past data to predict. But do they actually have a memory of data points they processed in the previous iteration?

#### Searching for memory in conventional Machine Learning techniques

To investigate whether most of the machine learning models have a memory of historic events or not, let us take an abstract problem of predicting whether a person is happy or sad in a situation.
We have following x : y data points –

$\{ breakfast : happy, drive : neutral, work : neutral, lunch : happy, fight : sad, dinner : sad, sleep : neutral, breakfast : happy, fight : sad, lunch : ? \}$ Continue reading

# Online Machine Learning - handling huge streaming data

This blog was earlier published on Fractal Analytics' blog, written by me and Chhaya Narula

Weather forecasting, predicting stock market trends, and deciding which ads to present on a web page creates two types of problems with traditional machine learning techniques, also called batch or offline machine learning. Firstly, data for such problems are very large and it is difficult to load all data in memory to create models. Secondly these are examples of sequential prediction problems i.e. new data is being added on regular intervals and the models need to be refined for those incremental data points. Online learning is a robust way of dealing with these problems.

Unlike offline machine learning which uses complete training data to build a prediction or classification model, online machine learning uses a stream of training data points. After every data point that it receives, it makes prediction for it and uses the error to update the hypothesis function. Thus it doesn’t need to store all data at once and can work with very limited memory. After building a model, if new data points are made available like clickstream data to predict clicks on advertisements or stock market movements, offline machine learning requires rebuilding of model considering the new data set whereas online machine learning can update the model for these new data points incrementally. Thus, there has been a recent increase in interest on online learning algorithms, largely due to their broad applicability to “web-scale” prediction problems.

# Changing sidebar width in twentyfifteen - WordPress

Twentyfifteen[1] is a great minimal responsive theme but the sidebar width in twentyfifteen feels a little too wide to some. If you don't want to put heavy widgets or header image in the sidebar, you can reduce the width of the sidebar to give more space to your actual content.

After few hit and tries here is the custom css you can add to your twentyfifteen theme. Its not a pixel perfect solution but it works to change sidebar width in twentyfifteen

Notes / References   [ + ]

 1 ↑ https://wordpress.org/themes/twentyfifteen/

# Forecasting (Part 5) - Learning from past errors, Adaptive smoothing

Double smoothing overcomes the shortcoming of single smoothing by taking in account trends present in data. Holt Winters’ goes a step further and considers any seasonality present in the data but often real life data has more complicated patterns which can’t be explained by simple trend and seasonality. Also results of above mentioned models depend vastly on the choice of smoothing parameters.

Adaptive smoothing is a technique which automatically determine the best set of weights based on the given data and accommodates complex data patterns by learning from the errors. Adaptive smoothing has two distinct phases, the first phase or training phase involves training a set of weights with historical data and the second phase uses the learned weights to forecast.

For explanation let, there be $t$ historic time periods, with $L$ time periods per seasons. If $k$ is the number of seasons then $k=\frac{t}{L}$

The actual demand for $t$ time periods are $x_i$ where $i=1$ to $t$

$x_1, x_2, x_3, ... x_L$ represents first season. $x_{L+1}, x_{L+2},x_{L+3} ... x_{2L}$ represents the second season and $x_{(n-1)L+1}, x_{(n-1)L+2},x_{(n-1)L+3} ... x_{(n-1)L+L}$ represents the $n^{th}$ season

Adaptive smoothing is an iterative process which iterates through the training set updating the weights and minimizing the error. It uses $L$ different weights. Once the iterations converge, the updated weight is used for forecasting future data points.

# Forecasting (Part 4) - Accounting for intermittent data (Croston)

The last 3 posts in this blog series discussed algorithms like Moving average and Weighted averageSingle and Double smoothingHolt Winters for capturing seasonality. This part will discuss intermittency in data and Croston method to forecast for such kind of data which have frequent zeroes.

### Croston’s algorithm[1]

When the historic data has large number of zeros, it becomes important to not only forecast the right amount but also at the right moment. The right moment to forecast implies that the algorithm tries to detect pattern in historic data by identifying after how many zeros, a non zero value will exist. This proves to be useful in demand forecasting when the product has intermittent demands.

Since it performs two tasks of forecasting the right amount and also at the right moment, it works in two logical parts. First step is to identify the average value by using exponential smoothing. The second step is to identify the average duration between non-zero values. Both the results combined is used to make the final prediction.

Notes / References   [ + ]

 1 ↑ Croston Method - Forecasting - SAP library. Reference - https://help.sap.com/saphelp_scm70/helpdata/en/ac/216b89337b11d398290000e8a49608/content.htm