Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When inventory runs out, recorded sales stop revealing total demand. If a shop has 10 units and sells all 10, it knows demand reached at least 10—but not whether 10, 15, or 100 customers would have bought at that price. Algorithms that mistake capped sales for complete demand can learn the wrong demand curve and choose poor prices or inventory levels.

This article focuses on that stockout problem—lost-sales censoring—in pricing and inventory control. Other kinds of unobserved demand, such as customers who never visit a store, can require different models.

What can a stockout tell an algorithm?

In the pricing and inventory setting, a seller observes a price, the inventory available, and the number of units sold. If inventory remains, sales may reveal the full demand for that period. If the seller sells out, sales are capped by inventory: the observation says demand was at least as high as the stock on hand, but it does not reveal the number of customers turned away.

That distinction matters because sales are not always a direct measurement of demand. Bu, Simchi-Levi, and Wang describe this as demand censoring, which can occur in both brick-and-mortar and e-commerce settings. Treating every sold-out sales count as full demand can bias demand estimates and produce inconsistent estimates, undermining the pricing decisions based on them.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why the missing quantity matters

Suppose two price-and-inventory records both show a complete sellout at 10 units. One period might have had 11 potential buyers; another might have had 50. The observed sales are identical, but the implications for a price change or a larger order are not. The algorithm must use the evidence it has without pretending the unseen part of demand was measured.

Can historical data identify a good price?

Not always. A dataset may contain many transactions yet provide too little information to identify a near-optimal price. If inventory repeatedly caps sales, or the records do not cover prices relevant to the decision, adding more observations of the same kind does not reveal how far demand exceeded the cap.

Rank #2
Sale
Algorithm Design
  • Used Book in Good Condition

Bu, Simchi-Levi, and Wang formalize this issue for offline pricing: a problem is identifiable when some data-driven algorithm can make its worst-case revenue loss converge to zero as the offline dataset grows. Their distributionally robust approach represents the range of demand distributions consistent with what the censored records actually show. The practical question is therefore not simply “How many rows are in the dataset?” but “What decisions can these records distinguish?”

When the data are too ambiguous

If plausible demand patterns consistent with the historical records imply very different best prices, the data do not support a confident single answer. An algorithm can account for that ambiguity by optimizing against a set of plausible distributions, rather than selecting one unsupported demand estimate. If the available records cannot distinguish a near-optimal decision, more of the same censored data may not solve the problem; changing what is observed or how experiments are run may be necessary.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Which learning setup fits the business?

Algorithm choice should follow the information and control the seller actually has. Offline analysis learns from past price, inventory, and sales records. Online experimentation can choose prices or inventory to gather information as it operates. Operational constraints and changing customer context create further differences.

Setting What the algorithm can use Design implication
Offline historical records Past prices, inventory, and potentially censored sales First determine whether the records identify a sufficiently good decision; represent ambiguity rather than treating capped sales as complete demand.
Online experimentation Sales feedback while choosing prices and inventory over a decision horizon Use some decisions to learn, then use what was learned; exploration has a cost but can make later choices better informed.
Limited price changes Feedback under restrictions on how often prices can change; samples may be dependent or correlated Account for the change limit and the dependence structure when estimating censored demand and stating performance guarantees.
Changing context Contextual information that affects demand, represented through basis functions with unknown coefficients in the cited model Adapt prices and inventory to context rather than assuming one unchanging demand relationship.

How do online algorithms learn without wasting the whole horizon?

One approach separates information gathering from revenue-seeking. Chen, Chao, and Shi’s 2021 method divides the horizon into an exploration phase and an exploitation phase. During exploration, it fits a spline approximation to the demand–price relationship and solves a surrogate optimization problem on a sparse grid. During exploitation, it applies the selected price and target inventory.

The trade-off is deliberate: exploration can sacrifice some immediate opportunity to improve later decisions. The paper establishes a nearly square-root regret rate that nearly matches its lower bound. This is a theoretical result for its model and feedback setup, not a claim of a particular increase in commercial profit.

What changes when prices cannot move freely?

Frequent price changes may be impractical, and restrictions can make observations dependent or correlated. Chen, Chao, and Wang’s 2020 work studies joint pricing and inventory control under limited price changes, using active price and inventory experimentation and a maximum-likelihood estimator for censored, correlated samples.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Their bounds differ across assumptions and cases. In the paper’s well-separated case, with price changes limited by m ≥ 1, regret is O(T1/(m+1)); when the number of changes is limited by β log T, it is O(log T). In the more general case, the paper gives O(T1/2) for bounded demand and O(T1/2 log T) for unbounded demand. These are model-specific theoretical bounds, not comparable market results or guarantees that a business will achieve a particular profit.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

How should an algorithm handle changing context?

A fixed demand curve can be a poor fit when conditions vary. Han, Ding, and Zhang’s 2026 IJCAI paper models demand using basis functions with unknown coefficients and uses context to adapt pricing and inventory. Under concave revenue conditions, it reports regret O(K √T log T); in the general case, it reports O(K2/3 T2/3 (log T)1/2), with matching lower bounds. These are theorem-level rates under the paper’s model, not measured commercial lift.

How can you choose among these designs?

Before comparing algorithms, describe the decision problem and the evidence in operational terms. Two methods with guarantees written in similar mathematical notation may rely on different feedback, assumptions, or benchmarks, so their bounds should not be ranked as if measured in one common setting.

  1. Map the observations. Record price, available inventory, sales, and whether inventory ran out. A sellout is a lower-threshold signal about demand, not a complete demand count.
  2. Decide whether learning is offline or active. With historical data only, assess what prices and decisions the records can identify. If the business can experiment, account for the cost and value of exploration.
  3. State the controls and constraints. Clarify whether the algorithm jointly chooses price and inventory, and how often prices may change. Limited changes can affect both estimation and regret.
  4. Represent demand at the right level. Check whether the method assumes a parametric or nonparametric demand relationship, uses basis functions, or adapts to context. The representation must fit the information and variation the model allows.
  5. Read the guarantee with its conditions. Check the paper’s feedback model, demand assumptions, horizon, benchmark, and whether the result concerns regret or worst-case revenue loss. A rate is meaningful only in that stated setting.

The central design principle is to preserve the distinction between what a business observed and what it wishes it had observed. Censoring-aware estimation, deliberate experimentation, robust treatment of ambiguity, and contextual adaptation are different tools for different data conditions—not interchangeable fixes for every hidden-demand problem.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.