Poisson Demand and Inventory Simulator

From average order rates to stockout risk and inventory decisions

Change Poisson demand, inventory, service level, and shortage-versus-leftover costs to compare stockout risk and inventory rules.

This page is the companion Lab for What Is the Poisson Distribution?. The essay moves from café arrivals to a Chuseok chicken stockout, expected lost sales, and the newsvendor problem. Here, we pause the narrative and change the numbers ourselves.

The default case assumes five orders per hour with six hours remaining, so expected demand is 30. Demand is not exactly 30 every time. With 35 units, exact stockout probability is about 15.7%. Reaching a 95% no-stockout service level requires 39 units under this illustrative model.

Explore demand and inventory

Every input below is educational. It does not estimate sales, costs, or ordering quantities for BHC or any store. Probabilities and expectations are calculated directly from the Poisson distribution; only the 100-period display uses random simulation.

THE ARCHIVE / LAB 02

Turn average demand into an inventory decision

Compare Poisson demand, stockout risk, service level, and shortage-versus-leftover cost in one place.

Educational model
Arrivals PoissonOne order = one unitReplenishment none
Within-period demand shape

All three profiles are normalized to the same total expected demand. End-of-period stockout risk is unchanged, but depletion timing can differ.

Expected demand λT30.00
Current stockout risk15.74%
Expected shortage0.57
Expected leftover5.57
01 / Mean rule

30

Rounded expected demand. It ignores the upper tail.

03 / Cost rule

33

Minimizes expected mismatch cost under the entered costs.

01 / DEMAND DISTRIBUTION

The full range of demand, not one average

Demand above Q
02 / INVENTORY COST CURVE

Both too little and too much inventory cost money

03 / 100 SIMULATED PERIODS

Run 100 periods with the same average

—stockoutsExact probability 15.74%

Orders by time block in the last simulated period

Shows total demand and when inventory would run out.
Compare the three inventory rules
RuleQStockout riskExpected shortageExpected leftoverExpected cost

Illustrative model · Inputs are not data from BHC or any store. The model assumes independent orders, one inventory unit per order, no replenishment, and a known λ. The cost rule uses a simplified single-period newsvendor intuition.

Why three “right” inventory quantities disagree

The mean rule sets Q≈λTQ \approx \lambda T. It is simple, but it does not separately control the upper tail. In the default case, stocking the mean of 30 still leaves a stockout probability of about 45.2%.

The service-level rule starts with a probability target. To avoid a stockout in 95% of comparable periods, find the first QQ satisfying:

P(D≤Q)≥0.95P(D \le Q) \ge 0.95

The cost rule combines unit underage cost CuC_u with unit overage cost CoC_o. This simplified Lab searches for the inventory minimizing:

E[Cost(Q)]=CuE[(D−Q)+]+CoE[(Q−D)+]E[Cost(Q)] = C_u E[(D-Q)^+] + C_o E[(Q-D)^+]

Raise underage cost and the cost-based quantity moves right. Raise disposal, holding, or markdown cost and it moves left. This is not a more accurate version of the service-level answer. It answers a different objective.

The same total average can hide a different day

The steady, lunch-peak, and two-peak holiday profiles are normalized to the same expected total. Under independent Poisson arrivals and no replenishment, they therefore have the same total-period demand distribution and closing stockout probability. The time at which inventory runs out can still differ.

That timing matters once we consider intraday replenishment, staffing, kitchen capacity, or transfers between locations. A single total-demand average cannot identify the risky hour. That is why a more realistic model may estimate a time-varying λ(t)\lambda(t) with a non-homogeneous Poisson process.

Prefer exact probability to 100 simulations

Rerun the 100 simulated periods and the number of stockouts changes. A theoretical probability of 15.7% does not guarantee exactly 16 stockouts in every batch of 100. Twelve or twenty are both possible.

The headline probability, expectations, and inventory recommendations therefore come from the exact Poisson distribution, not the simulated average. Simulation is used to make variation visible. When a small model is exactly tractable, there is no reason to add Monte Carlo error to the decision metric.

What this model leaves out

  • One order may contain multiple chickens or menu items.
  • The real λ(t)\lambda(t) changes with hour, holiday, weather, and promotions.
  • Group orders and campaigns can create clustering.
  • Stockouts censor demand and customers may substitute to other products.
  • Replenishment or lateral transshipment may be available during the period.
  • Underage and overage costs may include future customer behavior, not only immediate cash costs.

This Lab is not an ordering system. It is a decision scaffold: move beyond an average forecast and place uncertainty, stockout risk, and both sides of forecast error on the same screen.

Sources / Data / Code

Methodology
Period demand is modeled as Poisson(λT). Stockout probability, expected shortage, and expected leftover are calculated from the exact distribution. Service-level inventory uses a Poisson quantile; cost-based inventory uses a simplified single-period underage/overage model. The 100-period display is a simulation, while decision metrics use exact calculations.

References

  1. The Poisson Distribution — STAT 414 — Penn State Department of Statistics
  2. Poisson Processes — Discrete Stochastic Processes, Chapter 2 — MIT OpenCourseWare
  3. Newsvendor Inventory Problem — MIT OpenCourseWare

Discussion

Discussion

Have a question, correction, counterexample, or another interpretation?