Definition · The newsvendor problemDemand D for a single season is a random variable with a known distribution. A quantity Q is ordered before the season and cannot be changed. Each unit short costs cᵤ, the underage cost; each unit left over costs cₒ, the overage cost.
The expected cost is C(Q) = cₒ·E[(Q − D)⁺] + cᵤ·E[(D − Q)⁺], and the problem is to choose Q to minimise it.
Both costs are usually margins rather than prices. If a unit is bought for 3 and sold for 10, the overage cost is the 3 that was spent and not recovered, and the underage cost is the 7 of margin that was not earned. Working out which is which is most of the modelling; once they are numbers, the rest is one comparison.
Theorem · The critical ratioThe optimal order quantity is the smallest Q with P(D ≤ Q) ≥ cᵤ/(cᵤ + cₒ).
Raising the order from Q to Q + 1 saves cᵤ whenever demand exceeds Q, which happens with probability 1 − P(D ≤ Q), and costs cₒ otherwise. The change in expected cost is therefore cₒ·P(D ≤ Q) − cᵤ·(1 − P(D ≤ Q)), which is negative exactly while P(D ≤ Q) is below the ratio.
The steps are of decreasing benefit and then of increasing cost, so the expected-cost curve falls and then rises with one minimum, and the first quantity at which the cumulative distribution reaches the ratio is it. Nothing in that argument needs the distribution to have any particular shape, and nothing needs it to be continuous.
demand 0,1,2,3,4 with probabilities 1/10, 2/10, 3/10, 3/10, 1/10
underage cᵤ = 7, overage cₒ = 3, ratio 7/(7+3) = 7/10
Q P(D ≤ Q) E[left over] E[short] expected cost
0 1/10 0 21/10 147/10
1 3/10 1/10 6/5 87/10
2 3/5 2/5 1/2 47/10
3 9/10 ✓ 1 1/10 37/10 the minimum
4 1 19/10 0 57/10
5 1 29/10 0 87/10
6 1 39/10 0 117/10
the CDF first reaches 7/10 at Q = 3, and 37/10 is the cheapest row
The window runs past the top of the demand distribution on purpose. A reader's first instinct is to try ordering nothing and to try ordering more than demand could ever be, and both are priced here: Q = 6 costs 117/10 and never runs short, Q = 0 costs 147/10 and never has anything left. “The crossing is the minimum” is then a statement about the whole line rather than about the five points where demand has mass.
Every figure on that table is exact. Expectations over a finite distribution with rational probabilities are ratios of whole numbers, there is no square root anywhere in this model, and nothing on the page rounds — which is worth saying explicitly, because the two quantities this course does round, the economic order quantity and its cost, are the headline of the lessons before it.
Moving the ratio, and watching the quantity follow
Example · Overage dominating: a bakeryDemand 8 to 12 with probabilities 1/8, 1/4, 1/4, 1/4, 1/8, underage 2, overage 5. The ratio is 2/7 ≈ 28.6%, and the cumulative distribution reaches it at Q = 9 for an expected cost of 23/8.
The mean demand is exactly 10 and the order is 9. When leftovers cost more than shortages, the right answer is to order below the mean and be short some of the time on purpose — which is the clearest possible demonstration that the mean is not the answer.
Example · Underage dominating: a spare partDemand 0 to 4 with probabilities 1/2, 1/4, 1/8, 1/16, 1/16, underage 20, overage 1. The ratio is 20/21 ≈ 95.2%, and the cumulative distribution does not reach it until the very top of the support: Q = 4, costing 49/16.
Mean demand is 15/16, less than one unit, and the order is four. A stockout costing twenty times a leftover pushes the order to cover the whole of the distribution, and the wide window confirms that 5 and 6 are dearer — 65/16 and 81/16 — so the answer really is the top of the support rather than a runaway.
Three instances, three ratios, three answers relative to the mean: above it, below it, and far above it. Nothing about the distributions explains that pattern and everything about the two unit costs does, which is the whole content of the rule.
Checking the rule instead of applying it
The panel computes the answer twice. Once by the critical ratio, walking the cumulative distribution until it reaches the threshold; and once by tabulating the expected cost at every whole quantity in the window and taking the cheapest. It then prints whether the two agree, and says so in red if they do not. They agree on all three worked instances.
That is a habit worth carrying rather than a feature of this page. A rule derived by an argument about one step at a time is exactly the kind of rule that is right in general and mis-stated in a particular textbook — with ≥ written as >, or the ratio inverted — and a tabulation of the objective is the cheapest possible refutation. The panel also refuses a distribution whose probabilities do not sum to one, rather than rescaling it: a distribution that does not sum to one is a typo, and normalising it silently answers a question nobody asked.