The Next Frontier in Probabilistic Forecasting

Author
author Image
Abhisheksingh Tawar
July 14, 2021
8 min read
Share this blog
overview

Remember last year when supermarkets had empty toilet paper shelves? Interestingly, toilet paper sales are below pre-pandemic levels in the US as customers work through the stockpile from last year. 

This is only one example of the nightmare businesses had to go through the past year as they struggled to keep pace with the evolving consumer demand. With the onset of the pandemic, supply chains across the globe went haywire. Existing models couldn’t account for the rapidly shifting patterns of demand and supply. Deterministic models, which provide point forecasts, were rendered useless as the single point forecasts they provided were highly inaccurate, and they were incapable of providing any other information about the inherent uncertainty in demand. This led businesses to look for solutions that could help them plan better in such dynamic times. 

This is where probabilistic forecasting comes to the rescue of businesses. Although probabilistic forecasting has been in use for a few years, it hasn’t been leveraged at a larger scale. Now that the focus is on better inventory planning and management, probabilistic forecasting is increasingly becoming essential to making better informed decisions. 

Benefits of Probabilistic Forecasting 

Probabilistic forecasting  is information rich, and provides you with a probability distribution that gives the probability of you selling a given number. This is critical in understanding how your sales will fluctuate and predicting the likelihood of your sales figures. If you expect a higher or lower than normal sales, it can help to quantify the delta for a given severity of the impact. Like in the case of toilet papers, probabilistic forecasting will enable you to change the level of forecast in dynamic times. 

Probabilistic forecasting not only helps in determining the forecasted demand but also the required safety stock. You can also run simulations to gauge the amount of inventory required to maintain a certain service level. This helps to determine the optimal service level while balancing opportunity costs (stock-outs) and operation costs (waste, cash, etc.). The traditional safety stock calculation methods assume demand to have a normal distribution which is seldom the case, such as the King method. King (2011) safety stock formula is used when demand and lead time variability are independent and are influenced by different factors. This method considers variations in demand, lead time, cycle time and fill rate. 

One of the major advantages of using a probabilistic forecast is it can be used for any kind of demand distribution, thereby minimizing the need to make assumptions regarding the demand distribution. It also safeguards against outlier values in the past data, which would have pushed the safety stock value higher, if traditional methods were used. 

Methods of Probabilistic Forecasting

Most forecasting models that are used in the industry to produce point forecasts can be tweaked to generate probabilistic forecasts. You can start with the simple snaive or random walk models to get an idea of baseline accuracy. If your use case requires more complex models, then statistical models like ETS (Exponential Smoothing), ARIMA (Auto Regressive Integrated Moving Average), Quantile Random Forest, and deep-learning models like LSTM (Long Short Term Memory), DeepAR, CNN (Convolutional Neural Network)-Quantile Regression can be experimented with. 

Evaluation for Forecast 

When predicting a point forecast, it is fairly easy to evaluate the forecast accuracy. Popular metrics forecasters use are MAPE (Mean Absolute Percentage Error), SMAPE (Symmetric Mean Absolute Percentage Error), MAE (Mean Absolute Error), and bias. But which metrics to refer to when evaluating a probabilistic forecast with a proper scoring rule? 

Two distributions may have the same median but different distribution around it. Hence, it is important to not only evaluate the forecasts on the basis of how accurate median or mean forecast values are but also how close the forecasted distribution is to the distribution of actual data. Below are some metrics that are suitable for this purpose. 

Continuous Rank Probability Score (CRPS) 

CRPS gives the absolute error for the entire forecasted distribution with respect to the point actual. CRPS is similar to MAE if the distribution is a single point. CRPS rewards sharpness, a more narrow distribution. Hence, low CRPS values, although desirable, can be misleading and need to be verified with calibration plots. While the quantile loss is concerned with a particular point in distribution, CRPS evaluates the entire distribution as a whole. 

Despite being deterministic and the forecast being probabilistic, CRPS is able to bridge this gap to evaluate the whole distribution. If a particular part of the distribution is more important than others consider using weighted RPS where the weight is defined by a non-negative weight function in unit range. 

Quantile Loss 

Quantile loss is calculated on an individual quantile making it a good metric if you want to focus on select quantiles. Quantile loss works by penalizing the quantile’s forecast on the ‘wrong side’ of the actual more for the same absolute delta from actuals for a given quantile. And the factor by which it penalizes the wrong side prediction more than the right one increases proportionally to the distance of quantile from median. 

For example, when evaluating 20th quantile prediction, for a unit delta from the actual, forecast value higher than actual will be penalized four times more than the one lower than actual. Here, because the quantile of interest is 20 (lower than 50), the ‘right side’ is considered to be less than actual and hence penalized less. This is reversed when we move to quantiles higher than 50. The penalization factor for the wrong side prediction also increases as we move farther from the 50th quantile, the factor of 4 for the 20th quantile increases to 19 for the 5th quantile. Note that quantile loss is twice the pinball loss. Also, quantile loss for the median is absolute error. 

Quantile loss (for quantile q) = 2*(actual – forecast)*q if actual >= forecast 2*(forecast – actual)*(1-q) if actual < forecast 

Calibration Plot 

Calibration plot is one of the best ways to evaluate the accuracy of the forecasted distribution. A calibration plot is a plot of the percentage of times the actual value is lower than that of a quantile’s value in the entire testing period against the quantile. For this, the specific quantile’s value is compared with actual on each of the testing granularities and then the percentage over the entire test period is calculated.

This exercise needs to be done for all major quantiles (0,10,20,…,100). The percentage values are plotted on the Y-axis against the quantile value on the X-axis. Deriving from the definition of the distribution, the ideal case scenario is an x=y line, i.e. 70th quantile value should over forecast 70% of the times in a decent size test set. The model whose plot is close to x=y is a good estimator. 

In the calibration plot above, for model C the actual percentage covered by a particular quantile is higher than the corresponding quantile, in other words, model C is over-forecasting. Similarly, model A is under-forecasting. Model B whose plot is closest to the x=y line (in gray) is the best one in the set. 

Distribution Plots 

This barebone technique of evaluating the distribution is one of the most preferred and convenient. Plot the forecasted distribution along with the actuals to check where in the distribution the actual value falls and how the distribution spreads out on either side of the actuals. This can be time-consuming though if you are testing a large set of forecast points (testing period length*time series).

Actual Quantile 

This metric tells you which quantile in the forecasted distribution belongs to actual. Monitoring this over a period of time can tell you if you are over-forecasting or under-forecasting. The long-running average of this metric above 50 implies under-forecasting and below 50 implies over-forecasting. 

In addition, metrics like MAPE, SMAPE, Bias can be calculated considering the median of distribution if you want a point forecast equivalent for probabilistic forecasting methods. 

Improve Planning with Probabilities  

In the early scoping phase, it’s favorable to determine whether certain ranges in the forecast distribution are more important than others for the business use cases. If so, there will be a need to evaluate forecasts using weighted CRPS and weighted quantile loss. 

Since a probabilistic forecast provides much more information than a point forecast, it is equally important that the end-user knows how to use it. Planners and operators are generally habituated to work with point forecasts and they may require training to fully utilize the new forecast. In a few cases, it can also mean changing the past practices of calculating demand, safety stocks, and order quantity.

It is best to include probabilities in the forecasting models, to improve your short, mid, and long-range projections with higher accuracy.

Get in touch with our experts to better evaluate the risks on both sides of the baseline forecast, optimize inventory levels and increase revenues.

Data & AnalyticsForecastingRetail/CPG
Share this blog

Tags & categories

Data & Analytics

Forecasting

Retail/CPG

Meet the Author

Author

Abhisheksingh Tawar

Abhisheksingh Tawar

Contact Us

Ready to Solve What Matters?

Whether you're looking to build the next-gen customer experience, harness the power of Agentic AI, or modernize your data stack—Quantiphi is here to help you lead with purpose and transform with confidence.

Talk to our experts to:

  • Discover modernization opportunities for your business
  • Chart your path to AI-powered success
  • Begin your transformation journey today
Call Us At :+1 508-661-9050
Contact icon

Schedule a discovery call