How to apply dynamic pricing in hotels and airlines

In sectors such as hospitality and aviation, dynamic pricing systems are the basis of revenue management.

What is Dynamic Pricing?

A dynamic pricing system is a series of algorithmic rules that adjust prices in real time based on certain factors. These factors can include market demand, customer behavior, and competition, among others.

In this sense, a dynamic pricing system allows prices to be set by forecasting the demand curve, applying a function to it, and maximizing the expected profit. However, underlying this is the problem of causal estimation. What effects do price changes have on demand?

Achieving an optimal selling price is not easy. Data specialists must go beyond mere prediction and arrive at causal inference. Otherwise, we run the risk of equating correlation with causation. As a result, we will end up making pricing decisions that can work very poorly or even be counterproductive.

Prediction and causality: differences and similarities

Let’s imagine that we are training a machine learning model with historical hotel reservation data, including prices. The model recognizes the negative correlation between price and demand. If prices were to fall by 10% tomorrow, demand would potentially increase, but by how much?

The main difficulty lies in the fact that the model has never learned the “causal” relationships. It is aware of how demand has varied with price in the past, but it does not know what would happen if we set this price. This is, in itself, the definition of the counterfactual problem. Data and prices are provided that show what happened, but not what would have happened if alternative prices had been set.

This difference is fundamental. Prices are rarely assigned randomly. They are set by revenue managers after studying various variables such as demand, seasonality, and competitor actions. The consequence is that price is endogenous. Furthermore, it is related to unobserved factors that also influence demand. This can complicate the analysis, and a simplistic correlation between price and reservations will lead to a biased estimate.

Estimating price elasticity

Setting better prices means estimating price elasticity, the causal relationships between price and demand.

In this sense, elasticity tells us how demand changes when there is a slight variation in price. If we estimate this function accurately enough, we can simulate the impact of different prices on total revenue and choose the one that maximizes profit. However, it is vitally important that we have some causality on our part in this process, rather than mere prediction.

How do we get there?

Causal inference strategies

Next, we will analyze the different causal inference strategies that exist to understand what each one consists of.

Causal inference strategies for estimating price elasticity of demand

Instrumental Variables (IV)

If there is suspicion that the price is influenced by latent demand or other unobservable factors, this strategy dictates that instrumental variables can be applied to isolate the effects of exogenous price variation.

For example, sudden changes in competitors’ prices, unexpected variations in fuel costs, or a sudden change in weather patterns can serve as indicators.

Randomised pricing experiments

Random pricing experiments are the best way to make estimates. Assigning random prices to customer segments helps us directly observe their effects.

These experiments can be very simple. For example, comparing different prices for similar airline tickets or hotel rooms will provide a clear estimate of elasticity.

Difference-in-Differences

In cases where a new pricing strategy is implemented for one market but not another, the prices of the treated and control markets are compared before and after the changes to determine the causal effects.

Propensity score methods

This technique involves creating a randomized experiment based on observational data by balancing deviation variables between price groups. These factors may include, for example, the date, the channel, or the time prior to the stay, among others.

Causal Forests and Double Machine Learning

This is a series of advanced methods for estimating the heterogeneous effects of treatment using flexible models and maintaining impartiality, provided that key conditions are met.

The problem of static prices

There is an obvious limitation when the price does not change enough to estimate its effect. If an airline or hotel chain keeps prices relatively static (whether due to internal company policy or other reasons), there are hardly any variations to take advantage of. If there are no variations, causal inference becomes highly affected. It would be like trying to infer the effect of a drug when everyone receives the same dose.

There are times when prices change in response to demand signals. For example, prices may increase on dates when high demand is expected. In this case, a simplistic analysis would suggest that high prices led to higher demand. This would be a clear distortion.

This is where experimentation plays an important role. Random pricing may be sufficient depending on the degree of business risk involved. Even if random pricing only affects part of the inventory, the resulting elasticity estimates can influence decision-making on a larger scale.

Balance between revenue and learning

On the other hand, there is a dilemma between leveraging knowledge about the relationship between prices and demand (generating short-term revenue) and exploring prices to improve the model (learning to obtain long-term benefits).

This is the eternal dilemma between exploration and exploitation. Multi-Armed Bandit algorithms offer a criteria-based approach to addressing this issue. They enable controlled experiments that favor groups known to be more profitable. At the same time, they collect information about the other groups.

In this Introduction to Multi-Armed Bandit, you can find detailed information about the algorithm.

Conclusion

Dynamic pricing is a perfect example of the importance of causality. Predictive models may have the ability to predict demand. However, without conducting a causal assessment of prices, they may end up offering incorrect recommendations. From this perspective, data scientists must be aware of the assumptions on which their models are based. In addition, they must consider the constraints involved in using observational data.

In a traditional context, causal inference is a tool for answering a key question: What happens to demand when the price rises? However, possible solutions depend on a careful approach (whether through experiments, quasi-experiments, or intelligent models). They also depend on the learning process requiring changes. In a context where prices remain static, nothing can be learned.

If you found this article interesting, we encourage you to visit the Data Science category to see other posts similar to this one and to share it on social networks. See you soon!

Daniel Bestard
Daniel Bestard
Articles: 30