Blog · Data quality and reconciliation · FMCG and CPG brands
The complete out-of-stock inference on one SKU at one store over thirty days, small enough to check by hand: the SKU's own daily sales rate excluding earlier inferred runs, the probability of a zero-sales run of each length at that rate, the confidence threshold, the run that crosses it and the run that does not, lost units at the rate and lost sales at retail, the missing-file day that is not a zero, and why the same run at a slow-selling SKU would not be inferred, so a reader can reproduce every figure and then run it on their own sell-out data.
Out-of-stock inference is a probability per zero-sales run at the SKU's own rate, and on thirty days at one store the arithmetic fits on a page. This page works the rate, the probability per run length, the threshold, the inferred run, the lost sales, the missing file and the slow-SKU comparison.
Daily units sold; M is a missing file.
| Days 1 to 10 | 4, 5, 3, 4, 6, 4, 3, 5, 4, 4 |
|---|---|
| Days 11 to 20 | 0, 0, 0, 0, 0, 0, 0, 0, M, 0 |
| Days 21 to 30 | 5, 4, 4, 3, 5, 4, 0, 4, 5, 4 |
Days with a stocked shelf, excluding the run under test and the missing day: days 1 to 10 and 21 to 30, twenty days, 84 units.
Rate = 84 ÷ 20 = 4.2 units per day
At a Poisson rate of 4.2, the chance of zero on one day is e^−4.2 ≈ 0.015, or 1.5 percent. A run of n zero days has probability 0.015^n.
| Run length | Probability | Below the 0.1% threshold? |
|---|---|---|
| 1 | 1.5% | No |
| 2 | 0.02% | Yes |
| 3 | 0.0003% | Yes |
| 9 | negligible | Yes |
At this SKU's rate, two consecutive zero days is already inferred.
| Run | Days | Length | Probability | Inferred? |
|---|---|---|---|---|
| Days 11 to 18, then 20 | 9 zero days around a missing file | 9 | negligible | Yes |
| Day 27 | 1 | 1 | 1.5% | No: chance |
Day 19 is a missing file and is not counted as a zero; the run is nine days with one unmeasured day inside it.
Lost units = run length × rate = 9 × 4.2 = 38 units Lost sales at retail $4.00 = $152
Another SKU at the same store sells 0.3 a day. The chance of zero on a day is e^−0.3 ≈ 0.74. Nine zero days: 0.74^9 ≈ 0.066, or 6.6 percent, above the threshold. Not inferred. A slow seller is often silent for nine days and it means nothing.
store sell-out per day = the retailer's total per SKU for that store: holds on the 29 measured days; day 19 is unmeasured, listed
One threshold for all SKUs. At two days, the slow SKU is flagged every week and the fast one only when it has been empty for days.
Missing file as zero. Day 19 becomes a tenth zero, and a store whose file is late for a week is inferred out of stock of everything.
Rate including the run. 84 ÷ 29 = 2.9; the day-27 zero looks more likely and the next two-day run may be missed.
Presented as fact. The report says inferred, with the model and the rate, and takes the pattern to the buyer, not the accusation.
The same rate per store-SKU, the same probability, the same threshold, with recurrence per store and DC. Covirage runs it on the sell-out files every week. The out-of-stock inference guide covers the measure at scale, and the distribution voids guide covers the SKUs that were never on the shelf.
From the rate: if sales are roughly Poisson at four a day, the chance of zero on a day is e to the minus four, about 1.8 percent. At 0.3 a day it is 74 percent. The report states the model and the rate; the arithmetic is the exponent.
Because a rate that includes the empty-shelf days is lower than the true selling rate, and the next stockout is harder to detect. The rate is computed on days the shelf was stocked, and the inferred days are excluded once found.
Day 19's file did not arrive. That is not a zero sale; it is an absence of data. It is excluded from the run count, and the run on either side is measured around it. A store absent for a week is unmeasured for the week, not out of stock for it.