In this article we explore the reasons why simple safety stock formulas are mathematically unsound and unsuited to the actual data that underpins real-world supply chains. Rather than being a good first step the use of the safety stock formulas can result in the adoption of planning parameters that drive service risk or excess costs and are in many cases little better than guessing. Finally, we propose an alternative method that utilises the power of artificial intelligence to simulate actual supply chains and how they perform in terms of service risk and cost to find the optimal parameters from the multitude of all the potential configurations.
Operations and financial managers and planners are often tasked with optimising supply chains. Some planners use gut feelings to set safety stock levels, while others base them on a portion of cycle stock level – 10 or 20 percent, for example. These “finger in the air” techniques generally result in poor performance and are rarely fit for purpose. Some supply chain managers, realising this is unsatisfactory, instead put their faith in the use of simple safety stock algorithms. There are a number of variants in their operation and use but essentially, they all use the same assumptions (see the box at the end of this article for a common expression of this if you are interested in the mathematical details).
At first glance the formula looks simple and convenient with just three principle variables in the equations: a service level, such as 95%, the mean demand and its variation; and the mean lead time and its variation. Most of the algorithms use these variables – they are simple to setup and easy to calculate in a spreadsheet. However, all of these formulas are vulnerable to risks, such as biased logic or flawed assumptions. Notably the formulas rely on supply chains adhering to normal patterns of data that don’t exist in real world supply chains and hence are mathematically unsound as well as being overly simplistic since they focus only on one part of the inventory equation failing completely to consider cycle stock in the equation. The calculation simply doesn’t translate to how most supply chains actually behave. Consequently these techniques are rarely better than guessing and are dangerous; giving the impression of a scientific approach without the realisation that the approach is flawed.
Let’s focus on why the formulas are flawed. Here is a shortlist of the three biggest problems illustrated with real items in real supply chains:
All simple safety stock calculations require you to calculate the average and variation of the demand and lead time: more formally known as the mean and standard deviation. These parameters define what is known as a normal distribution. As any supply chain professional that has dealt with actual data will tell you, real data has trends, intermittency and sometimes seasonal patterns. Furthermore, your demand and lead time cannot be less than zero but normal distributions can, and do, include negatives. This all makes the normal distribution a bad fit for demand and lead time data. Let’s examine this with real data.
The figure below is a histogram of real monthly sales data for an item. In each month most of the sales peak around 2600 units but sometimes there are sales as high as 15,000 units. The blue line is the best fitting normal distribution, in this case the blue line does not represent the data at all – the peak is in the wrong place and the distribution is too wide. The algorithms best guess is around 6000 whereas the data shows a peak around 2800. In addition, the algorithm predicts negative sales and a huge spread of variability. In this case the mean and deviation are overestimated by a factor of two – leading to a large excess of safety stock. For seasonal demand (for example high demand in summer, low in winter), the formula will consistently produce stock outs in summer and waste in winter.
In this example the fit was larger than the peak in the data. Sometimes the reverse is true. Applying the formulas on data with this pattern of sales is extremely dangerous as it will drive either excessively high safety stock levels or safety stocks that are too low, depending on the nature of the trends, intermittency and potential seasonality of the data.
To test the suitability of the formula further we need to review how well the model fits to supply chain data. Rather than looking at the problem one product at a time we can examine entire datasets to see how often actual data fits the normal distribution. Taking some real datasets and the ten most common distributions (including the normal) one we can do a simple experiment. Using an unbiased search method we can let the data find the best distribution. One can then ask the question – how often does my real data choose the normal distribution as the best fit? In this way, by letting the data speak for itself, if the normal is a good distribution than we would expect it would commonly be the best fit, perhaps as much as 40-50% of the time.
However in extensive tests with actual data from real supply chains that simply doesn’t happen. Testing this hypothesis across multiple data sets we consistently see that the normal distribution is the best fitting distribution around 4% of the time. In short: the normal assumption is a bad one both theoretically and on real world data. This really matters because where the data doesn’t fit the normal distribution the formula gives inaccurate results.
We spoke of why assumptions around the demand and lead time lead to incorrect estimates of safety stock. We now address the issues of the z-factor – a proxy factor than represents service levels (see the box at the end of the article for more details). The higher the z score the larger the overall safety stock will be and the less likely you are to have a stockout.
In real supply chain situations, your service level is a quantity-based fill rate and the stockout quantity is important: a big stockout is worse than a small one. The use of a z score assumes each stockout is equally bad regardless of its size. This is a fundamental risk given that clearly not all orders or stockouts are equal and failure to factor that in is commercially unsound.
Let’s look at an example to illustrate this problem. For an item that has 1000 items delivered over a month but 1 item was not delivered on 5 days – we can say that for this item there was a 99.5% fill rate. If your service target is 95%, then you would appear to be doing really well. However, using the z factor, it will see that as 5 stockouts in 30 days which corresponds to an 83% probability of no stockouts. Increasing the probability from 83% to 95% will increase the inventory by 60% – a massive increase for logic that is flawed which drives an increase in safety stock that isn’t needed. There is one further strangeness of this factor. As you can see in the plot below the score increases dramatically after service rates of around 95%, consequently changing your service rates from 95% to 99.9% will practically nearly double your inventory – this is a big change for what is quite an arbitrary number.
Service rate and z coefficient
The order or supply frequency does not play a part in the safety stock equations yet this is a crucial consideration in overall stock holding and is a major factor in what safety stock is needed. However the formulas will calculate the same safety stock for an item supplied twice yearly as one that is delivered every week regardless that the former will typically have higher stock levels most of the time.
This is also where the concept of confidence plays a part – the safety stock numbers might feasibly be similar for different order frequencies but the level of confidence would be dramatically different. Simple formulas of safety stock, however, exclude the order frequency and its confidence entirely.
In addition to the order frequency the planner is often faced with a number of reorder-quantity constraints such as the minimum order quantities (MOQ): a factor that is also not part of simple formulas. The MOQs play an important role in the replenishment cycles and have an effect on the amount of safety stock that will be needed. None of the simple safety stock formulas have this. The replenishment method itself affects both the optimal safety stock and the parameters that achieve it. Even within one replenishment strategy such as reorder point (ROP) replenishment the adjustment of various decision variables and supply chain constraints will mean the oversimplistic safety stock calculation will be ill-fitting. It simply isn’t parametrised to change as your supply chain strategy changes.
Finally we should flag that supply chains are not homogenous. They are organised in many different ways. One can have a single-echelon system, where a single distribution centre acts as a central repository between the supplier and the customer. However, oftentimes, even for small companies, the supply chain is organised as a multi-echelon system – one that relies on layers of suppliers across multiple distribution centres organised in layers or echelons. Simple algorithms do not take account of this fact at all: they don’t have a mechanism to treat safety stock from a comprehensive or globalized perspective and consequently have no visibility of the inventory stored throughout the supply chain.
Configuring a supply chain planning system correctly is a complex task. No matter the capability of the planning software being used, failure to set the right parameters will result in the wrong plans being generated and inefficiencies propagated across the network. Real world supply chains are complex and don’t conform to the models of probability needed to make these formulas work. Real supply chains are much more complicated than that they have: seasonality, minimum order quantities, expiry dates, promotions, market intrusion from competitors to name just a few. Determining the right set up requires all of these factors to be be considered holistically. Consequently, there is no simple formula for calculating safety stock and optimising the parameters in real-world supply chains – instead there is a need for a system that takes into consideration all the parameters, respects the nature of the real data and respects the actual constraints posed by each organisation’s supply chain strategies.
An accurate supply chain system needs to simulate all the relevant real-world factors affecting the supply chain under the constraints that it operates such as supply and demand and lead time as we have discussed but also manufacturing costs, shipping costs and target customer service levels. From these millions of combinations and constraints multi-factor optimisation is required to find the best supply chain given the data and the needs of the customer - one out of millions of combinations.
Our proprietary Cognitive Self-Modelling Supply Chain considers the millions of options that are available in real time and identifies a costed and optimised solution that is the best fit for your organisation’s specific strategic needs. It does not replace the planning system or the planner. It is designed to work with your existing system, retrieving data from it to find the best solution across multiple dimensions of cost and service level.
Orchestrated Intelligence enables organisations to consistently achieve the perfect Supply Chain Planning set-up to meet their strategic goals and leverage benefit. It achieves this by combining multi-objective mathematical modelling techniques with the power of Artificial Intelligence to find and maintain the optimal network configuration to maximise service whilst minimising cost.
The exact terms and calculations vary but essentially, they are based on evaluating the demand variability and lead time variability separately then combining them. The total safety stock is combined indifferent ways depending on whether demand and lead time variability are independent—that is, they are influenced by different factors. It is assumed all the data are normally distributed for which the z-score is considered a parameter that is a proxy for customer service level. It is instructive to look at each term in the equation separately.
If only demand data is available (and the data are normally distributed) a demand based safety stock can be calculated. There are a minimum of three factors to consider here. First a factor that accounts for the uncertainty in demand: σD. The second term is a lead time factor that accounts for the fact that the demand period most likely does not exactly match the lead time period – the logic here is that if the lead time is long, this will affect the demand variability and it needs to be scaled accordingly. Finally, there is a z-score factor that gives you some service level assurance. This latter factor is non-intuitive but can be seen as a mathematically consistent way to ramp up and down safety stock according to how sure you need to be. The higher the score the less likely you are to have a stock out. For example, assuming a normal distribution to satisfy demand with a 95 percent confidence level, it’s necessary to carry extra inventory equal to z=1.65 of demand variability.
Combining these factors results in the following formula:
〖SS〗_D= z_α×√(E(L)) × σ_D
SSD is the required level of safety stock considering demand variability, zα is the service level at a particular value (technically it is inverse distribution function of a standard normal distribution) and E(L) and σD are the mean and standard deviation of lead time and demand respectively.
The previous equation assumed demand was the main source of variability. Instead if lead time variability is a concern then the factor safety stock equation is:
〖SS〗_L= z_α× E(D)× σ_L
E(D) and σL are the mean and standard deviation of demand and lead time respectively and zα is as before.
If demand and lead time variability data are available, normally distributed and are independent, they can be either be combined to give a lower total safety stock than the sum of the two individual calculations. In this case, the combined safety stock equation becomes:
SS= z_α×√(E(L)σ_D^2+〖E(D)〗^2 ) σ_L^2
If the demand and lead time data are not independent then the demand and supply safety stock calculations are added together.