k factor and fill rate
The relationship between the k factor, the service level (fill rate) and inventory cost.
What the k factor is
The k factor is a multiplier of demand variability (σ_W) that determines how much safety stock to add above expected demand:
SS = k · σ_W
In the policies that use it — Proportional Variance, Historical Standard Error, Empirical Bootstrap — k is the "knob" that controls the trade-off between service level and inventory cost. The optimizer explores a k grid between 0.1 and 5.0 (k = 0 is discarded because it implies zero safety stock by design, without the model having evaluated whether that is optimal) and chooses the k that produces the lowest expected total cost.
The relationship between k and fill rate
Fill rate is defined as:
fill rate = 1 − (unserved units / total demand)
It is the fraction of demand that available inventory can satisfy. A 95% fill rate means that, on average, 5 out of every 100 demanded units cannot be served from stock.
The relationship between k and fill rate is monotonically increasing but non-linear: as k rises, fill rate increases more and more slowly (the marginal returns from more stock diminish), while holding cost rises approximately linearly. This creates the central trade-off in inventory models:
- High k → higher fill rate → more stock → higher tied-up capital cost (holding).
- Low k → lower fill rate → less stock → higher stockout risk and higher shortage cost.
Fill rate as a result
An important design detail in AInventory: fill rate is a result of the optimization, not a target the planner enters. The optimizer does not solve "what k do I need to achieve a 95% fill rate?"; it solves "what k minimizes expected total cost given this holding-shortage trade-off?".
The resulting fill rate depends on the SKU's cost structure:
- If shortage is very expensive relative to holding (for example, in critical SKUs where a stockout halts production), the optimizer naturally chooses a high k, producing high fill rates.
- If holding is expensive relative to shortage (for example, in slow-moving SKUs with high storage costs), the optimizer chooses a lower k, accepting more stockout risk in exchange for less tied-up inventory.
This logic is that of the generalized newsvendor model: the optimal service level is determined by the cost ratio, not by a service target imposed from above.
How to interpret a high optimal k
If the optimizer consistently chooses a high k (near 5.0) for a SKU, this typically indicates one or more of the following:
- The shortage cost is much higher than the holding cost (the stockout penalty parameter is elevated).
- Demand is highly volatile (σ_W is large relative to μ_W), so uncertainty justifies a larger buffer.
- The lead time is long, which widens window W and accumulates more uncertainty.
None of these conditions is necessarily a problem; they are characteristics of the SKU and its environment. What the optimal k enables is an explicit, quantified decision rather than a rule of thumb.
The exploration grid
The system explores k values from 0.1 to 5.0 (in steps of 0.5). For each value, expected total cost is computed over the Monte Carlo scenarios. The winning k is the minimum of the total cost vs k curve, described in the cost model.
Formal definitions of fill rate, safety stock, and ROP (reorder point) are in the bilingual glossary.