S3 · quantitative skill
Fill rate from the loss function
Convert a customer-facing service promise into a buffer size using the standard normal loss function, and stop confusing it with cycle service level.
Prerequisites
Going Forward
The merchant's question: "I set 95% service on the mug and still got stockouts. What did I actually set?"
The short answer: you set the probability of ending a cycle with stock left, not the proportion of customer demand you fill. Those are different numbers, and on the green mug the same inventory position reads 95% on one and 99.72% on the other. If you want to control the share of demand you fill, you have to size the buffer through the standard normal loss function, not through z.
The two service definitions
Cycle service level (α) — the probability that inventory does not hit zero during a replenishment cycle. Easy to compute: it is 1 − Φ(z). It is a statement about events.
Fill rate (β) — the fraction of demand met from stock. It is a statement about units. To get it you need to know not just whether a cycle ran short, but by how much, on average.
That "by how much" is exactly what the loss function measures. The standard normal loss function L(z) is the expected shortfall of a standard normal variable below its reorder point, in units of standard deviation:
EUS = σ_LTD × L(z)
and then
β = 1 − EUS / Q
EUS is expected units short per cycle. Divide by the order quantity and you have the share of each cycle's demand that goes unmet.
The loss function values
| z | L(z) |
|---|---|
| 0.00 | 0.3989 |
| 0.50 | 0.1978 |
| 1.00 | 0.0833 |
| 1.50 | 0.0293 |
| 1.65 | 0.0206 |
| 2.00 | 0.0085 |
| 2.33 | 0.0036 |
The arithmetic on the mug
σ_LTD = 39.58, Q = 296, z = 1.65.
Expected units short per cycle:
EUS = 39.58 × 0.020637 = 0.8167 units
Fill rate:
β = 1 − 0.8167 / 296 = 1 − 0.002759 = 0.99724 = 99.72%
Now run it backwards
Suppose the owner's actual promise is "95% of mug orders ship from stock." That is β, so:
L(z) = (1 − β) × Q / σ_LTD = 0.05 × 296 / 39.58 = 14.8 / 39.58 = 0.374
Reading the loss table, L(z) = 0.374 sits just above L(0) = 0.3989, so z ≈ 0.051. The buffer is:
SS = 0.051 × 39.58 = 2.0 units
Two units, not 65. The 95% fill target and the 95% cycle target differ by 63 units on this one SKU — $80.64 a year of carrying cost at $1.28/unit, and more importantly, a completely different picture of whether the shelf is safe.
The full curve makes the mechanism obvious:
| z | SS (units) | Cycle SL | EUS (units) | Fill rate |
|---|---|---|---|---|
| 0.00 | 0 | 50.0% | 15.79 | 94.7% |
| 0.05 | 2 | 52.0% | 14.80 | 95.0% |
| 1.00 | 40 | 84.1% | 3.30 | 98.9% |
| 1.65 | 65 | 95.0% | 0.82 | 99.72% |
| 1.96 | 78 | 97.5% | 0.37 | 99.87% |
| 2.33 | 92 | 99.0% | 0.14 | 99.95% |
Read the first row. With no safety stock at all, half of all cycles run short and 94.7% of demand is still filled. That is not a contradiction: most cycles that run short run short by a few units on the last day. A merchant chasing a 95% fill rate is chasing something they nearly have already; a merchant reading "50% service" on a report and panicking is reading the wrong column.
The other consequence is that fill rate is a function of Q as well as SS. Halve the order quantity to 148 and the same 65-unit buffer yields β = 1 − 0.8167/148 = 99.45% instead of 99.72%. Bigger, less frequent orders fill better at identical safety stock. That coupling is why MOQs and pack integrity belongs in the same conversation.
Assumptions
1. Distribution of lead-time demand. Both the z-table and the loss table assume lead-time demand is normal. L(z) is far more sensitive to the tail shape than Φ(z) is, because it integrates the whole shortfall, so a fat-tailed demand distribution understates EUS more badly than it understates the cycle probability. With lumpy wholesale orders on top of retail, treat every fill rate here as optimistic.
2. Stationarity / i.i.d. EUS is an average over cycles, so it assumes every cycle has the same distribution of demand. On the mug that is already wrong in December: the 0.82 units per cycle is an annual blend, and the peak-season cycles contribute far more than their share. A promo week inside an otherwise stable quarter breaks the average without changing the formula's output, which is the dangerous kind of wrong.
3. Demand–lead-time independence. The loss function uses one σ_LTD, which presumes the supplier's lateness and the customer's demand are unrelated. If a late kiln batch coincides with the gifting peak, shortfalls are larger and more frequent together, and EUS is understated by exactly the amount that matters — the tail.
4. Review regime. σ_LTD = 39.58 is the continuous-review exposure, 45 days. Under 12-day periodic review the exposure is 57 days; using 39.58 in this formula understates EUS and overstates β. The buffer that corresponds to 73 units, substituted back, gives EUS = 41.39 × 0.020637 ≈ 0.854 and β = 99.71% — nearly identical, because the extra 8 units were bought precisely to hold β constant.
5. Constraints ignored. β = 1 − EUS/Q assumes Q is whatever you choose and that a replenishment actually resets the position to Q. An MOQ that forces a 500-unit order raises β at the same SS, and a case pack that rounds 296 down to 288 lowers it. Both are invisible in the formula.
6. Observed sales treated as demand. EUS is measured against demand, but the store records sales. Units that were demanded and not available never appear, so the observed shortfall is a floor, not an estimate. A SKU that went dark for nine days looks like it had nine days of zero demand. The fill rate you compute from sales data is biased upward; Censoring and the all-days denominator is the fix.
Where this breaks
When shortages are lost sales rather than backorders. The EUS derivation assumes unmet demand waits for the next delivery, so the shortfall is recovered and the cycle position resets to Q. If customers walk — which is the usual case for a $24 mug — the next cycle starts with less real demand and the model both overstates EUS and understates the true cost. There is no clean closed form for the lost-sales case; the practical response is to treat β as an upper bound.
When you are quoting fill rate for a multi-line order. β is a per-SKU number. A customer buying a mug, a notebook and a pen experiences an order fill rate, which is the product of the line fill rates under independence: 0.9972³ = 99.2%. Across a five-line order it is 98.6%. Quote the per-SKU number to a customer and you have promised more than you can see.