THIS EXPLANATION
THE ROOM
ECO·35 Economics & Business 6 MIN · 8 STATIONS

Stockout demand censoring

A Socratic walk-through of stockout demand censoring — reasoned out one step at a time, not lectured.

abcdefgh
a

The question we started with

THE QUESTION #

Why can a shop's sales records never tell it how much it could have sold?

A shop's till record looks like the most solid data it owns. Every transaction, timed and counted, no sampling and no survey. If anything in a business is ground truth, surely this is.

But consider what the till is physically able to record. It records purchases. A purchase requires the item to have been on the shelf. So the till is not measuring how much people wanted — it is measuring the smaller of two things, how much people wanted and how much was there. What happens to the difference?

b

Reasoning it through

REASONING #

Nothing happens to it. That is the whole difficulty. A customer who finds the shelf empty buys something else, or leaves, and generates no record of any kind. The demand did not fail to be measured badly; it failed to leave a trace.

Put it as a formula, because the shape matters: recorded sales equal the minimum of demand and availability. When the shelf holds enough, sales are demand and the record is honest. When it does not, sales are the stock level, and the number in the ledger is a fact about the shop's own ordering decision wearing the costume of a fact about its customers.

Make it concrete. Suppose true weekly demand for an item is 100 units, arriving fairly evenly, and the shop is replenished once a week with 80. At about 14.3 units a day the shelf empties after 80 divided by 14.3, roughly 5.6 days. The week's recorded sales: 80. Next week the same, and the week after. The buyer, reasonably, forecasts demand at 80 and orders 80.

Now sit with what that means. The estimate is 20 per cent too low and it is stable. It does not drift, it does not look odd, and — this is the part that matters — it does not improve with more data. A hundred weeks of records give a hundred confirmations of 80. The usual defence against error, gathering more observations, is useless here, because every observation is censored the same way.

Is it recoverable? Only with a datum most shops do not keep. If the shop knows the shelf was stocked for 5.6 of the week's 7 days, it can scale: 80 units sold in 5.6 days implies a weekly rate of 80 times 7 divided by 5.6, which is exactly 100. The censoring inverts perfectly — provided you know when it began. So the binding constraint is not statistical sophistication. It is whether anyone recorded the hour the shelf went empty.

Now ask why they usually did not, because this is where it stops being a data problem. Consider what the two possible errors cost, and who bears them. Order too much and the evidence is unmistakable: capital tied up, shelf space consumed, markdowns at the end of the season, all of it landing on someone's measured performance. Order too little and the cost is a customer walking out with nothing, which appears in no report, has no name attached, and is charged to nobody. One error is visible and punished, the other invisible and free. A buyer optimising what is measured will systematically under-order, and the censoring will then supply the numbers that justify having done so.

So the mechanism is doubled. Availability truncates the record, and the asymmetry of blame gives everyone a reason not to fix the truncation.

How would we catch it from outside? Two tests, both practical. First, look at the distribution of daily sales for an item: genuine demand is spread out, but censored sales pile up at exactly the stock level, so a suspicious lump of days landing on the same number is the signature. Second, run an intervention — raise the stock on an item with no change in price, placement or promotion. If sales rise substantially, demand was being clipped. If they do not move, the record was honest and the censoring account is wrong for that item, which is precisely the observation that would refute it.

c

The analogy

THE ANALOGY #
THE FIGURE

A rain gauge with a lid four inches up the tube. Every reading it gives is real rain, faithfully collected. On ordinary days it is exactly right. On the days that matter it reads four inches, and the log fills with fours that look like weather but are measurements of the lid. Nothing in the record announces which is which.

WHERE IT BREAKS DOWN

the gauge's owner can at least see the level sitting at the lid and know the reading is a cap, whereas a shop's ledger shows only a plausible number of units sold — the shelf that ran empty at four on Thursday leaves nothing behind to distinguish that week from a genuinely quiet one.

d

Clarifying the model

THE MODEL #

Three refinements, and a distinction worth being careful about.

The censoring is not only about the missing units. A stocked-out customer who buys a substitute does leave a record, on the wrong product — so the second item's sales are inflated by demand that belonged to the first. Both series are now wrong, in opposite directions.

Second, this compounds with any rule that sets orders below the recorded average. Where that happens the estimate ratchets down each cycle rather than merely sitting low, an effect well known in revenue management. The single-round version derived above is the conservative case, not the worst one.

Third, the distinction from statistical censoring proper. In survival analysis a censored case is labelled: the record says this patient was observed for two years and then left, and estimators built for the purpose use that fact to recover the curve. Here the censoring is unlabelled. A truncated week and a genuinely slow week produce identical rows, and no estimator can separate them from the sales column alone. That is why the fix is operational — log the stockout — rather than statistical.

And this connects to a claim made elsewhere about buffers. A shop that never runs out has abolished the only routine signal telling it where the edge of demand lies. A shop that runs out constantly has a ledger that has stopped describing its customers. Both extremes destroy information, in opposite directions.

e

A picture of it

THE PICTURE #
Stockout demand censoring
Stockout demand censoring Start at the filled circle and follow the item through a week. Two arrows reach the ledger and they are not equivalent: the one from a stocked shelf carries real demand, while the one from an empty shelf carries customers who were never counted. Because the ledger cannot tell the two arrows apart, the forecast built from it is an average of honest weeks and capped ones. Then follow the loop back round to the shelf -- the order is sized from that forecast, so the same ceiling is reinstalled, and the next week's record confirms it. {"generator":"[email protected]","source":"../Socrates/.diagram-cache/_src/stockout-demand-censoring.md","sourceIndex":1,"sourceLine":4,"sourceHash":"fd5961c2e559b851719a76508777eae174d469353d438ba362c0ca75fe5dc4e9","diagramType":"stateDiagram","layoutVariant":"source","repairedDuplicateIds":[],"motion":"entrance-with-reduced-motion-fallback","presentation":"editorial","attempt":1,"viewBox":{"x":0,"y":0,"width":720,"height":726},"qa":{"passed":true,"findings":[]}} stock exhaustedmid-week demand arrives, nothingrecorded sales equal demand forecast the recordedaverage refill, no higher than lasttime OnShelf ShelfEmpty SalesLog NextOrder
KINDSconnectornegative branch

How to readStart at the filled circle and follow the item through a week. Two arrows reach the ledger and they are not equivalent: the one from a stocked shelf carries real demand, while the one from an empty shelf carries customers who were never counted. Because the ledger cannot tell the two arrows apart, the forecast built from it is an average of honest weeks and capped ones. Then follow the loop back round to the shelf — the order is sized from that forecast, so the same ceiling is reinstalled, and the next week's record confirms it.

f

What became clearer

WHAT CLEARED #
WHAT CLEARED

A sales record is not a record of demand; it is a record of the smaller of demand and supply, and the shop's own ordering decision is one of the two. The bias this creates is invisible, stable, and immune to collecting more of the same data — which makes it unlike ordinary measurement error, where patience helps. It is recoverable, but only from a fact about the shelf rather than the till, namely when the item ran out. And the reason that fact so often goes unrecorded is not oversight: the error it would expose is the one nobody is charged for.

g

Where to go next

ONWARD #
  • How lost-sale estimates are built when the stockout timing was never logged at all.
h

Key terms

TERMS #
TermWhat it means
Censored demanddemand that exceeded available stock and therefore left no record, so observed sales understate what customers wanted.
Lost salespurchases that did not occur because the item was unavailable, and which are absent from every transaction record.
Substitution effecta stocked-out customer's switch to another item, which inflates that item's recorded sales.
Fill ratethe proportion of demanded units actually supplied from stock, which cannot be computed from sales data alone.

Every term the collection defines is gathered in the glossary.

Nearby on the shelf

4