Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
World desk5 min

How to Design Algorithms for Demand You Can’t Observe

Stockouts cap observed sales, hiding how much customers wanted to buy. Learn how censored data affect pricing and inventory algorithms, and what their theoretical guarantees do—and do not—mean.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When a business runs out of stock, its sales record may show how many units it sold—not how many customers wanted to buy. An algorithm that treats sales capped by inventory as total demand can learn the wrong demand curve and set poor prices or stock levels. The practical challenge is to learn from that incomplete evidence while making decisions.

This guide focuses on lost-sales censoring in retail pricing and inventory control. Other kinds of unobserved demand may call for different models.

As an Amazon Associate I earn from qualifying purchases.

What does a stockout hide?

Suppose a retailer has 10 units available and sells all 10. The record establishes that demand reached at least 10; it does not reveal whether 10, 11, or many more customers would have bought. Sales are a censored measurement: inventory has capped what the seller can observe.

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

By contrast, selling fewer than the available inventory may provide an uncensored demand observation in a basic lost-sales model. Real records can have other complications, so an analyst should verify that a low sales count really means demand was low—for example, rather than an unavailable product listing or a data-collection failure.

In Offline Pricing and Demand Learning with Censored Data, Jinzhi Bu, David Simchi-Levi, and Li Wang warn that treating censored sales as uncensored demand can produce biased and inconsistent estimates. If the model underestimates demand at prices that often sell out, it can make pricing and inventory choices on a distorted picture of customer response.

Can the available data identify a good price?

Before selecting an algorithm, ask what the historical records can actually distinguish. Bu, Simchi-Levi, and Wang define a problem as identifiable when some data-driven algorithm’s worst-case revenue loss can converge to zero as the offline dataset grows. Their approach uses distributionally robust optimization to represent uncertainty about demand distributions consistent with the observations.

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

This distinction matters because adding more records does not, by itself, reveal how far demand exceeded an inventory cap. Identification also depends on the prices and inventory levels represented in the data and on the range of decisions the business is allowed to make. If the observations leave several plausible demand distributions—and those distributions favor different prices—a uniquely reliable price may not be recoverable from those records alone.

Free tools Windows power users keep installed

One-click scans. No signup required.

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

In that situation, an algorithm should not pretend that one estimated demand curve is certain. It can instead evaluate decisions against a set of plausible distributions, seek additional informative observations if operations permit, or report that the data do not support a confident choice.

Choose the learning setup before the algorithm

The key design choice is whether the seller is learning only from past decisions or can actively choose prices and inventory while learning. Operational limits and changing customer conditions further narrow which methods fit.

Setting Learning approach What to check
Offline historical records Use distributionally robust optimization to account for uncertainty left by censored observations; the method in Bu, Simchi-Levi, and Wang’s 2022 Management Science article studies this setting. Whether the records identify a sufficiently good decision for the feasible price and inventory choices.
Online price and inventory experimentation Separate learning from deployment: fit a spline approximation to the demand–price relationship during exploration, solve a surrogate optimization problem on a sparse grid, then use the selected price and target inventory during exploitation. Chen, Chao, and Shi (2021). Whether the business can tolerate an exploration phase and the assumptions behind the demand model.
Infrequent price changes Use active price and inventory experimentation and a maximum-likelihood estimator designed for censored, correlated samples. Chen, Chao, and Wang (2020). How many price changes are allowed, whether samples are dependent, and which demand assumptions apply.
Changing context Model demand with basis functions and unknown coefficients, using context to adapt pricing and inventory. Han, Ding, and Zhang (2026). Whether relevant context is observed and whether the paper’s revenue and model conditions fit the application.

How do the theoretical guarantees compare?

These studies report regret or revenue-loss guarantees under different models. Regret measures cumulative performance relative to a specified benchmark over a decision horizon; it is not a forecast of commercial profit improvement. Rates from different papers should not be ranked as if they came from the same setting.

Study and setting Reported result Qualification
Chen, Chao, and Shi (2021), nonparametric joint pricing and inventory control with lost sales A nearly square-root regret rate. The spline-based algorithm uses separate exploration and exploitation phases; the result is specific to the paper’s model.
Chen, Chao, and Wang (2020), limited price changes In the well-separated case, regret is O(T1/(m+1)) when price changes are limited by m ≥ 1, and O(log T) when the number of changes is limited by β log T. In the more general case, the bounds are O(T1/2) for bounded demand and O(T1/2 log T) for unbounded demand. The applicable bound depends on the paper’s demand assumptions and price-change constraint.
Han, Ding, and Zhang (2026), contextual pricing and inventory O(K √T log T) under concave revenue conditions; O(K2/3 T2/3 (log T)1/2) in the general case. These are theorem-level rates under the stated model, with matching lower bounds; they are not measured business outcomes.

Here, T denotes the decision horizon in the relevant model; K is the basis-function dimension in Han, Ding, and Zhang’s setting. The rates describe mathematical performance under each paper’s assumptions, not a shared benchmark or a guaranteed result for a particular retailer.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What should a practical design review ask?

  1. Define the observation process. Record price, inventory available, units sold, and whether the product stocked out. Treat a sale count at the inventory limit as evidence that demand reached at least that limit, not as an exact demand total.
  2. Specify the decisions and constraints. Clarify whether the algorithm chooses price, inventory, or both; which prices are feasible; how often prices can change; and whether stockouts create lost sales rather than backorders.
  3. Choose offline learning or active experimentation. If only historical data are available, test whether they can support the intended decision. If the seller can experiment, account for the operational cost of exploration and the feedback it will generate.
  4. Match the model to the environment. Decide whether demand is represented parametrically, nonparametrically, or through basis functions; whether customer context changes over time; and whether observations may be correlated because prices change infrequently.
  5. Read the guarantee against its benchmark. Check the demand assumptions, feedback model, permitted actions, horizon, and definition of regret or revenue loss before using a bound to justify deployment.
  6. Make uncertainty visible. When records do not distinguish between plausible demand patterns, preserve that uncertainty in the decision process rather than presenting a single estimate as established fact.

Demand censoring is not solved simply by collecting more sales rows or fitting a more complex model. The design has to connect what was observed, what the business can change, and what the chosen method can guarantee under its assumptions.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

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

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.