Safety Stock Is a Probability Problem

"Keep half a day of safety stock" sounds operationally simple, but it does not define a service level. Two items with the same mean demand and lead time can receive the same buffer and face very different stockout probabilities.

Topics

Safety stock is often described as extra inventory.

That description is correct but incomplete.

The important question is not how many extra units are stored. It is which uncertainty those units are intended to absorb and what probability of shortage they imply.

A rule such as

[ ext{Safety stock}=0.5 ext{ days of demand} ]

looks operationally precise. It is not probabilistically precise.

The same half-day buffer can correspond to a stockout probability below one per cent for one item and above thirty per cent for another, even when both items have the same average demand and the same lead time.

Safety stock is therefore not fundamentally a time quantity.

It is a quantile of a random demand process.

The relevant uncertainty is demand during the protection period

Consider a continuous-review system with deterministic lead time (L).

Let daily demand be

[ D_1,D_2,ldots,D_L. ]

The demand that must be covered while waiting for replenishment is

[ S_L = sum_{t=1}^{L}D_t. ]

If daily demand is independent with mean

[ mu_D ]

and variance

[ sigma_D^2, ]

then

[ mathbb E[S_L] = Lmu_D ]

and

[ operatorname{Var}(S_L) = Lsigma_D^2. ]

The standard deviation is

[ sigma_L = sigma_Dsqrt{L}. ]

A reorder point can be written as

[ r = mathbb E[S_L] + SS, ]

where (SS) is safety stock.

This notation makes the role of safety stock clear.

Expected lead-time demand is already included in the reorder point.

Safety stock is the additional buffer used to cover uncertainty around that expectation.

A half-day rule does not define a probability

Suppose two SKUs both have mean daily demand

[ mu_D=100 ]

and fixed lead time

[ L=4. ]

Their expected lead-time demand is therefore identical:

[ mathbb E[S_L] = 4(100) = 400. ]

Now assign both items half a day of average demand as safety stock:

[ SS = 0.5(100) = 50. ]

Both receive the same reorder point:

[ r = 400+50 = 450. ]

So far the policies look identical.

They are not.

For SKU A, suppose daily demand standard deviation is

[ sigma_A=10. ]

Then lead-time demand standard deviation is

[ sigma_{L,A} = 10sqrt{4} = 20. ]

The safety factor is

[ z_A = rac{450-400}{20} = 2.5. ]

If lead-time demand is approximately normal, cycle service is

[ Pr(S_Lle450) = Phi(2.5) approx 0.9938. ]

SKU A therefore receives approximately

[ 99.4% ]

cycle service.

For SKU B, suppose daily demand standard deviation is

[ sigma_B=50. ]

Then

[ sigma_{L,B} = 50sqrt{4} = 100. ]

The same safety stock now corresponds to

[ z_B = rac{450-400}{100} = 0.5. ]

The cycle service level is

[ Phi(0.5) approx 0.6915. ]

So SKU B receives only about

[ 69.1% ]

cycle service.

The two items have the same:

[ ext{mean demand}, ]

[ ext{lead time}, ]

[ ext{safety-stock days}, ]

and

[ ext{reorder point relative to mean demand}. ]

Their stockout probabilities are radically different.

The heuristic did not define service.

The demand distributions did.

The hidden quantity is the coefficient of variation

For fixed lead time (L), suppose safety stock is set to (k) days of mean demand:

[ SS = kmu_D. ]

The corresponding safety factor is

[ z = rac{kmu_D} {sigma_Dsqrt{L}}. ]

Define the coefficient of variation

[ CV = rac{sigma_D}{mu_D}. ]

Then

[ z = rac{k}{CVsqrt{L}}. ]

This equation explains why a days-of-cover rule cannot imply the same service across items.

For fixed (k) and (L),

[ zpropto rac{1}{CV}. ]

Low-variability items receive much higher service than high-variability items.

The rule therefore embeds an unstated service differentiation based on demand volatility.

If that differentiation is intentional, it should be explicit.

If it is not intentional, the heuristic is making the decision anyway.

A service target should be inverted into a quantile

Suppose the desired cycle service level is

[ alpha. ]

Then the reorder point should satisfy

[ Pr(S_Lle r_alpha) = alpha. ]

Equivalently,

[ r_alpha = F_{S_L}^{-1}(alpha), ]

where (F_{S_L}) is the predictive distribution of demand over the protection period.

Safety stock is then

[ SS_alpha = F_{S_L}^{-1}(alpha) - mathbb E[S_L]. ]

This is the general definition.

The familiar formula

[ SS = z_alphasigma_L ]

appears only when the predictive distribution is normal or when a normal approximation is acceptable.

The quantile is fundamental.

The (zsigma) expression is a model-specific shortcut.

The two SKUs need very different safety-stock days for the same service

Return to the two items.

Suppose both should achieve

[ 95% ]

cycle service.

For a normal distribution,

[ z_{0.95} approx 1.645. ]

For SKU A,

[ SS_A = 1.645(20) approx 32.90. ]

Expressed in days of mean demand,

[ rac{32.90}{100} approx 0.329 ext{ days}. ]

For SKU B,

[ SS_B = 1.645(100) approx 164.49. ]

In days of mean demand,

[ rac{164.49}{100} approx 1.645 ext{ days}. ]

The same 95% service target requires approximately

[ 0.33 ]

days of safety stock for SKU A and

[ 1.65 ]

days for SKU B.

The ratio is five to one because their standard deviations differ by the same factor.

This is the reverse of the heuristic approach.

Instead of assigning the same buffer and accepting whatever probability results, we specify the probability first and calculate the buffer required by each demand process.

Cycle service level answers one specific question

Cycle service level is commonly defined as the probability that no stockout occurs during a replenishment cycle.

In the simple continuous-review setting,

[ CSL = Pr(S_Lle r). ]

A 95% cycle service level means that approximately 95% of replenishment cycles avoid a stockout under the model.

It does not mean that 95% of demand units are filled immediately.

That second quantity is closer to fill rate.

The distinction matters because two policies can have the same stockout probability and very different shortage magnitude when a stockout occurs.

Fill rate depends on expected shortage size

Let (Q) denote order quantity.

A common approximation for fill rate is

[ eta = 1- rac{ mathbb E[(S_L-r)^+] }{ Q }. ]

The numerator is expected units short per replenishment cycle.

Under normal lead-time demand,

[ S_L sim mathcal N(mu_L,sigma_L^2), ]

define

[ z = rac{r-mu_L}{sigma_L}. ]

Expected shortage is

[ mathbb E[(S_L-r)^+] = sigma_L left[ phi(z) - z(1-Phi(z))

ight]. ]

The term

[ phi(z) - z(1-Phi(z)) ]

is the standard normal loss function.

Now suppose both SKUs are configured for 95% cycle service, so

[ z=1.645. ]

The standardized loss is approximately

[ 0.0209. ]

For SKU A,

[ sigma_L=20, ]

so expected shortage is about

[ 0.42 ]

units per cycle.

For SKU B,

[ sigma_L=100, ]

so expected shortage is about

[ 2.09 ]

units.

The probability of any stockout is the same.

The expected size of the shortage is not.

Cycle service and fill rate therefore capture different operational consequences.

A service target should match the business failure mode

Suppose a production line stops if even one critical component is unavailable.

Then avoiding any stockout in the cycle may be close to the operational objective.

Cycle service level is relevant.

Now suppose an online retailer sells thousands of low-criticality units and occasional small shortages can be backordered cheaply.

Fill rate may align better with the business cost.

Neither metric is universally superior.

The important point is that safety stock cannot be chosen coherently until the service objective is defined.

A policy optimised for

[ P( ext{no stockout}) ]

is not necessarily the policy that optimises

[ rac{ ext{units immediately filled}} { ext{units demanded}}. ]

The probability model must match the operational question.

The same service target can have very different economic value

Suppose two products both use 99% cycle service.

For one product, a stockout costs almost nothing because customers readily substitute.

For another, one missing component stops a production line.

Using the same service target across both items can therefore be economically arbitrary.

The cost-based newsvendor formulation gives a different route.

Let

[ c_u ]

be unit underage cost and

[ c_h ]

unit overage cost.

The economically optimal quantile is

[ alpha^ast = rac{c_u} {c_u+c_h}. ]

If the shortage cost is much larger, the selected quantile moves deeper into the upper tail.

This connects service-level safety stock with decision theory.

A fixed service target is a policy choice.

A cost-derived target is an economic choice.

Both depend on uncertainty.

Lead-time uncertainty enters the same probability problem

If lead time itself is random, the relevant demand variable becomes

[ S_L = sum_{t=1}^{L}D_t ]

with random (L).

Under independence between daily demand and lead time,

[ mathbb E[S_L] = mu_Dmathbb E[L] ]

and

[ operatorname{Var}(S_L) = sigma_D^2mathbb E[L] + mu_D^2operatorname{Var}(L). ]

The second term is the inventory uncertainty created by variable replenishment time.

A safety-stock formula using only

[ sigma_Dsqrt{mathbb E[L]} ]

ignores it.

That omission can be severe when lead-time variance is large.

More importantly, mean and variance may still be insufficient when lead-time demand is skewed or multimodal.

The correct object remains

[ F_{S_L}. ]

Protection period depends on the inventory policy

For continuous review, the main exposure period is lead time.

For periodic review with review interval (R), the system may need to cover demand over

[ R+L. ]

Then the relevant random quantity is

[ S_{R+L}. ]

Safety stock calculated for lead time alone will be too small if the policy must also survive the review interval.

This is an important implementation detail.

A forecasting system can estimate the demand distribution correctly and still feed the wrong horizon into inventory control.

The protection period belongs to the policy, not to the forecast model in isolation.

Discrete demand breaks the illusion of smooth formulas

Normal safety-stock formulas work best when lead-time demand is sufficiently continuous and well behaved.

Consider a low-volume item with lead-time demand

[ S_L sim operatorname{Poisson}(2). ]

Mean demand is

[ 2. ]

Suppose the desired cycle service level is 95%.

For a Poisson distribution,

[ P(S_Lle4) approx 0.947. ]

That is slightly below 95%.

But

[ P(S_Lle5) approx 0.983. ]

The smallest reorder point that achieves at least 95% service is therefore

[ r=5. ]

Safety stock relative to mean lead-time demand is

[ SS=5-2=3. ]

The service level jumps from about 94.7% to 98.3% because the distribution is discrete.

There is no reorder point that produces exactly 95%.

This matters for slow-moving and intermittent items.

Service targets that look continuous on a planning dashboard can map to coarse discrete inventory decisions.

Intermittent demand needs the predictive distribution, not just an average

Suppose an item sells one unit occasionally and zero units most days.

Its mean demand may be

[ 0.2 ]

units per day.

A rule such as

[ SS=2 ext{ days of demand} ]

produces

[ 0.4 ]

units of safety stock.

Inventory cannot be held in fractions if the item is indivisible.

More importantly, the average does not reveal the probability of one, two, or several demand arrivals during replenishment.

Croston-type forecasts, occurrence-size models, count models, compound distributions, and empirical predictive simulations can provide more relevant information.

Safety stock for intermittent demand is especially sensitive to the full predictive distribution because the mass at zero and the right tail both matter.

Forecast error should enter the safety-stock calculation

A common shortcut estimates demand variability from historical demand and then adds safety stock using that variability.

But the replenishment decision is based on a forecast.

The relevant uncertainty is forecast error over the protection period.

Suppose

[ e_{t+h} = D_{t+h} - hat D_{t+h}. ]

Cumulative protection-period error is

[ E_H = sum_{h=1}^{H}e_{t+h}. ]

Its variance is

[ operatorname{Var}(E_H) = sum_h operatorname{Var}(e_{t+h}) + 2 sum_{h<k} operatorname{Cov}(e_{t+h},e_{t+k}). ]

If forecast errors are correlated across horizons, multiplying one-step error variance by the horizon underestimates or overestimates the uncertainty.

Prak, Teunter, and Syntetos show that standard safety-stock calculations can understate required uncertainty when future forecast errors share parameter-estimation effects.

The safety-stock problem is therefore predictive, not purely descriptive.

Historical demand variance is not always the same as forecast uncertainty.

Parameter uncertainty should not disappear after model fitting

Suppose demand is modelled as

[ D_t sim mathcal N(mu,sigma^2), ]

but (mu) and (sigma) are estimated from limited history.

A plug-in calculation uses

[ hatmu ]

and

[ hatsigma ]

as though they were known.

The resulting predictive distribution is too narrow because uncertainty in the parameter estimates has been removed.

A more complete predictive distribution integrates over parameter uncertainty:

[ p(D_{mathrm{future}}midmathcal D) = int p(D_{mathrm{future}}mid heta) p( hetamidmathcal D) ,d heta. ]

A frequentist predictive distribution reaches the same conceptual goal through a different construction.

The inventory system needs uncertainty about future demand, not merely uncertainty conditional on estimated parameters being correct.

Model calibration matters at the service quantile

Suppose an inventory policy uses the 95th percentile of forecast lead-time demand.

A probabilistic forecast is well calibrated at that quantile when approximately 95% of realised lead-time demands fall below the predicted 95th percentile.

Formally, if

[ q_{0.95,t} ]

is the predicted quantile,

[ P(D_tle q_{0.95,t}) approx 0.95 ]

over the relevant validation set.

A model can have strong average likelihood or CRPS performance and still be miscalibrated in the upper tail used by the replenishment policy.

This is why probabilistic model evaluation should inspect the parts of the distribution actually consumed by the decision.

For safety stock, tail calibration is operational calibration.

Safety stock cannot repair systematic forecast bias cleanly

Suppose demand forecasts are systematically low:

[ mathbb E[D-hat D]>0. ]

A planner may increase safety stock until service recovers.

This can hide the forecasting problem.

The buffer is now compensating for two distinct components:

[ ext{systematic bias} + ext{random uncertainty}. ]

That makes the safety stock harder to interpret and less transferable when forecast bias changes.

A cleaner decomposition is

[ r = ext{forecasted protection-period demand} + ext{bias correction} + ext{uncertainty buffer}. ]

Not every system needs those terms literally separated in software.

They should be conceptually separated during diagnosis.

Otherwise a high safety-stock requirement can be blamed on volatility when the real problem is a biased forecast.

Pooling items can reduce or increase risk depending on dependence

Suppose two locations hold inventory separately.

Their demands are

[ D_1 ]

and

[ D_2. ]

If inventory is pooled, aggregate demand is

[ D_T = D_1+D_2. ]

Variance is

[ operatorname{Var}(D_T) = operatorname{Var}(D_1) + operatorname{Var}(D_2) + 2operatorname{Cov}(D_1,D_2). ]

If demands are independent, pooling reduces variability relative to simply adding two separate safety buffers.

If they are strongly positively correlated, the pooling benefit is smaller.

If the same promotion, weather event, industrial customer, or macroeconomic shock affects both locations, independence can be unrealistic.

Risk pooling is therefore another probability problem.

The covariance structure matters as much as the marginal variances.

Service differentiation should be explicit

Many companies intentionally assign different service targets by SKU class.

For example, critical items may receive a higher target than low-margin or easily substitutable items.

That can be sensible.

But an ABC label does not determine the correct safety stock by itself.

The service target still needs to be translated through the item's predictive distribution.

Two A-class items with the same service target can require very different safety stocks if their demand or lead-time uncertainty differs.

Conversely, two items with similar variability can rationally have different targets because their shortage consequences differ.

Classification and probability solve different parts of the problem.

Safety stock should be backtested as part of the complete policy

A theoretical 95% service level is only as good as the model assumptions behind it.

The policy should be replayed historically or simulated prospectively.

At each historical decision date:

  • fit the forecasting model using only available information
  • construct the predictive distribution of protection-period demand
  • calculate the reorder point from the chosen service or cost objective
  • apply the order policy
  • advance through actual demand and realised lead time
  • measure service and inventory

The empirical cycle service level is then

[ widehat{CSL} = rac{ ext{cycles without stockout} }{ ext{total completed cycles} }. ]

If a nominal 95% policy produces 82% historically, the discrepancy is information.

Possible causes include distribution misspecification, underestimated lead-time uncertainty, demand-lead-time dependence, non-stationarity, biased forecasts, or implementation differences.

Safety-stock formulas should be treated as models to be validated, not as constants handed down independently of data.

Average inventory is part of the trade-off

Raising safety stock usually improves service.

It also raises inventory.

Under a simple policy, expected cycle stock and safety stock contribute differently to average inventory, but the broad relation is unavoidable:

[ ext{higher protection} Rightarrow ext{more capital tied in stock} ]

unless another part of the system changes.

That is why "maximize service level" is rarely a complete objective.

A cost formulation may include:

[ C = c_h mathbb E[ ext{inventory}] + c_s mathbb E[ ext{shortage}] + c_o mathbb E[ ext{orders}] + c_e mathbb E[ ext{expediting}]. ]

Safety stock is one control variable inside that decision problem.

The service target is meaningful only in relation to the costs and operational consequences around it.

The worked example exposes the heuristic

The two SKUs both had:

[ mu_D=100, ]

[ L=4, ]

and safety stock equal to half a day of mean demand:

[ SS=50. ]

For SKU A,

[ sigma_D=10, ]

which produced

[ CSLapprox99.4%. ]

For SKU B,

[ sigma_D=50, ]

which produced

[ CSLapprox69.1%. ]

The same safety-stock rule created a difference of more than thirty percentage points in cycle service.

If the intended target was 95%, the correct buffers under the normal approximation were approximately

[ 32.9 ]

and

[ 164.5 ]

units.

That is the central idea.

Safety stock is not a universal multiplier on average demand.

It is the amount of inventory required to move from expected demand to a chosen point in the predictive distribution of demand over the relevant protection period.

The probability comes first.

The units come second.

References

Hadley, G., & Whitin, T. M. (1963). Analysis of Inventory Systems. Prentice-Hall.

Prak, D., Teunter, R., & Syntetos, A. (2017). On the calculation of safety stocks when demand is forecasted. European Journal of Operational Research, 256(2), 454–461. https://doi.org/10.1016/j.ejor.2016.06.035

Prak, D., & Teunter, R. (2019). A general method for addressing forecasting uncertainty in inventory models. International Journal of Forecasting, 35(1), 224–238. https://doi.org/10.1016/j.ijforecast.2017.11.004

Silver, E. A., Pyke, D. F., & Thomas, D. J. (2016). Inventory and Production Management in Supply Chains (4th ed.). CRC Press.

Zipkin, P. H. (2000). Foundations of Inventory Management. McGraw-Hill.

Embed interactive plots, widgets, and demos using <figure>, <iframe>, or <div class="interactive-embed"> containers. Ensure each embed includes descriptive captions for accessibility.

How to cite

Use the quick export buttons to save citations for reference managers or copy the formatted text directly.

Diogo Ribeiro (2025). Safety Stock Is a Probability Problem. Faculty of Media Arts and Design, Technical University of Porto. https://diogoribeiro7.github.io/data-science/safety_stock_is_a_probability_problem/.

BibTeX

RIS

EndNote

Related posts

  • A Data Lake Is a Directory With Rules

  • Why Exact Post-Selection Confidence Intervals Can Be Enormous

Loading mathematical content