One Order, One Chance: the Newsvendor by Hand

Manuel D. Rossetti, PhD P.E.

Agenda

  • The last order for the mower deck belt, and what makes one order different
  • Demand is not sales
  • The decision worked by hand, one hundred belts at a time
  • The newsvendor model in its cost and profit forms, and why they agree
  • The critical ratio derived, and read as a statement about service

The Last Order for the Mower Deck Belt

Every model so far knew its demand. This chapter removes that: demand is a random variable, and the decision is made before it is observed, once.

The deck the belt fits is out of production; replacement demand runs about fourteen more weeks, and the supplier offers one last order.

Question Answer
What is stocked? One item, the belt
What is the demand process? Random weekly demand, no longer seasonal, for about fourteen weeks
When is inventory reviewed? Once: one decision, no second chance
What triggers replenishment, and how much? Nothing; the distributor names a quantity now
What happens to unmet demand? Lost: a dealer buys elsewhere
What costs are incurred, and when? The belt costs $50 and sells for $95; leftovers go to a scrap dealer at $12

Three Things Make This Different

No ordering cost. Exactly one order is placed whatever its size, so \(k\) is the same under every decision. A constant added to every alternative cannot change which is least. Thus \(k\) drops out, and with it the question chapters 3 to 6 were about.

Leftover stock has no future value. A single-period problem is not a multi-period problem with one period. Here the cost of too many is the whole loss on the unit, $50 paid against $12 recovered, not a period’s holding charge.

Both errors are priced, and neither is free. Order too many and lose \(50 - 12 = \$38\) a belt. Order too few and lose the \(95 - 50 = \$45\) margin.

Both are opportunity costs, measured against the decision that could have been made. Neither appears in any ledger.

Demand Is Not Sales

Let demand represent what customers would have bought, and sales what they did buy. They differ whenever the shelf was empty.

A week that sold 40 because 40 were on the shelf and a week that sold 40 because 40 were wanted look identical in a sales record. That is, sales are demand censored at whatever was available.

A history of sales understates both the average and the spread, and most in the weeks the item mattered, because those are the weeks it ran out. Where no record of unfilled demand exists, every quantity computed from the fitted distribution is too small. Say so when you report the answer.

A Sketch, and a Smaller Question

Asked for a judgment, the distributor offers five outcomes for total remaining demand:

Demand \(x\), belts 300 400 500 600 700
\(P\{X = x\}\) 0.15 0.25 0.30 0.20 0.10
\(P\{X \le x\}\) 0.15 0.40 0.70 0.90 1.00

The mean is 485 belts. Rather than evaluate every candidate, ask a smaller question: having decided on \(Q\), is one more hundred belts worth buying?

It pays $45 a belt when demand reaches \(Q + 100\), and loses $38 a belt when demand stops at or below \(Q\):

\[ 45 \times 100 \times P\{X \ge Q+100\} \;>\; 38 \times 100 \times P\{X \le Q\} \]

One Hundred Belts at a Time

From To \(P\{X \ge \text{to}\}\) Gain \(P\{X \le \text{from}\}\) Loss Net Decision
300 400 0.85 $3,825 0.15 $570 +$3,255 Take it
400 500 0.60 $2,700 0.40 $1,520 +$1,180 Take it
500 600 0.30 $1,350 0.70 $2,660 \(-\$1{,}310\) Stop
600 700 0.10 $450 0.90 $3,420 \(-\$2{,}970\) Still negative

Order 500 belts. Notice that 500 is more than the mean of 485. The distributor should plan to be left with belts more often than it plans to run out, because running out costs more per belt than scrapping does.

Why the Sign Changes Only Once

The outcomes are a hundred belts apart, so demand at least \(Q + 100\) is demand above \(Q\):

\[ \begin{aligned} 45\,P\{X \ge Q+100\} &> 38\,P\{X \le Q\} &&\text{divide the step test by 100}\\ 45\left(1 - P\{X \le Q\}\right) &> 38\,P\{X \le Q\} &&P\{X \ge Q+100\} = 1 - P\{X \le Q\}\\ P\{X \le Q\} &< \frac{45}{45 + 38} = \frac{c_u}{c_u + c_o} = 0.5422 &&\text{collect } P\{X \le Q\} \end{aligned} \]

The left side is a cumulative distribution function, which never decreases. Once the test fails it fails for every larger quantity, so order the smallest quantity whose cumulative probability reaches 0.5422: \(F(400) = 0.40\) falls short, \(F(500) = 0.70\) clears it.

That ratio is the answer to the whole chapter.

The Check: Cost All Five

\(Q\) 300 400 500 600 700
Expected profit $13,500 $16,755 $17,935 $16,625 $13,655

The direct calculation peaks at 500, where the marginal table stopped and the cumulative rule pointed. Three routes, one answer.

That check is worth performing the first time you use marginal analysis on a new problem: the marginal argument is valid only when expected profit has a single peak, and the direct calculation is what confirms it.

What the hand method cost: five outcomes, four steps, no distribution and no calculus. What it cannot do: say anything between 400 and 500. The real decision is a number of belts, and for that we need a distribution.

The Newsvendor Model

Let \(X\) represent demand over the period, with \(F(x) = P\{X \le x\}\); let \(Q\) represent the quantity ordered. Let \(c_o\) represent the overage cost, the loss on each unit left over, and \(c_u\) the underage cost, the loss on each unit of demand unmet, both in dollars per unit and strictly positive.

At the end of the period exactly one thing has happened: \(Q > X\) and \(Q - X\) units are left over, or \(Q < X\) and \(X - Q\) units of demand went unmet. With \((y)^{+} = \max(y, 0)\),

\[ C(Q, X) = c_o(Q - X)^{+} + c_u(X - Q)^{+} \]

Exactly one term is nonzero for any realized demand. \(C\) is a random variable, and we choose \(Q\) to minimize its expectation.

The Same Model, as a Profit

Let \(c\), \(s\) and \(u\) represent the purchase cost, selling price and salvage value per unit, \(s > c > u\). The vendor sells \(\min(X, Q)\), salvages \((Q - X)^{+}\) and pays for \(Q\): \(G(Q, X) = s\min(X, Q) + u(Q - X)^{+} - cQ\).

\[ \begin{aligned} G &= s\big[X - (X-Q)^{+}\big] + u(Q-X)^{+} - c\big[X + (Q-X)^{+} - (X-Q)^{+}\big] &&\text{rewrite } \min(X,Q) \text{ and } Q\\ &= (s-c)X - (s-c)(X-Q)^{+} - (c-u)(Q-X)^{+} &&\text{collect terms}\\ &= (s-c)X - C(Q, X), \qquad c_o = c - u, \quad c_u = s - c &&\text{match to the cost} \end{aligned} \]

Taking expectations, \(E[G] = (s-c)E[X] - E[C]\). The difference does not depend on \(Q\), so both forms give the same \(Q\). For the belt, \(c_o = 50 - 12 = \$38\) and \(c_u = 95 - 50 = \$45\).

Taking the Expectation

Recall the first order loss function, \(G^{1}(b) = E[(X - b)^{+}]\), the expected amount by which demand exceeds \(b\).

\[ \begin{aligned} E\big[(X-Q)^{+}\big] &= G^{1}(Q) &&\text{expected shortage, by definition}\\ (Q-X)^{+} &= (X-Q)^{+} + Q - X &&\text{true when } X < Q \text{ and when } X \ge Q\\ E\big[(Q-X)^{+}\big] &= G^{1}(Q) + Q - E[X] &&\text{expected leftover}\\ E[C(Q)] &= c_o\big(G^{1}(Q) + Q - E[X]\big) + c_u\,G^{1}(Q) &&\text{substitute both}\\ &= (c_u + c_o)\,G^{1}(Q) + c_o\big(Q - E[X]\big) &&\text{collect } G^{1}(Q) \end{aligned} \]

The whole model in one line. The first term is the cost of being short, weighted by both prices; the second is the cost of the position itself.

Differentiating

Recall that \(dG^{1}(Q)/dQ = -G^{0}(Q)\), where \(G^{0}(Q) = 1 - F(Q)\).

\[ \begin{aligned} \frac{d}{dQ}E[C(Q)] &= -(c_u + c_o)\,G^{0}(Q) + c_o = 0 &&\text{differentiate term by term}\\ G^{0}(Q) &= \frac{c_o}{c_u + c_o} &&\text{solve}\\ F(Q^{*}) &= \frac{c_u}{c_u + c_o}, \qquad Q^{*} = F^{-1}\!\left(\frac{c_u}{c_u + c_o}\right) &&G^{0} = 1 - F \end{aligned} \]

The quantity \(c_u/(c_u + c_o)\) is the critical ratio: the rule the whiteboard produced, and this is why that rule was right.

The check that it is a minimum. The second derivative is \((c_u + c_o)f(Q) \ge 0\) everywhere, so the expected cost is convex and the stationary point is the bottom.

Reading the Critical Ratio

\(F(Q^{*}) = P\{X \le Q^{*}\}\) is the probability that demand falls short of the order: the probability of having too much. The critical ratio is not an input to the answer; it is the answer, as a service level the costs imply.

It depends only on the relative size of the two costs, so it reads as odds:

\(c_u\) against \(c_o\) 3 to 1 4 to 1 9 to 1
Critical ratio 0.75 0.80 0.90

Never having leftovers is bad. It means ordering at a ratio near zero, correct only when a lost sale costs nothing. For the belt, expect leftovers in about 54% of futures.

Never having unsatisfied customers is also bad. At the belt’s ratio, expect to run out about 46% of the time. A 99% service target claims \(c_u\) is ninety-nine times \(c_o\).

What We Did Today

One order, one chance. \(k\) drops out, leftovers have no future, and both errors are opportunity costs: $38 over, $45 under.

Sales are censored demand, and a sales history makes every answer too small.

By hand, the next hundred belts are worth buying while \(F(Q) < 0.5422\). Order 500, more than the mean, confirmed by costing all five.

The cost and profit forms differ by \((s-c)E[X]\), which does not depend on \(Q\).

\(F(Q^{*}) = c_u/(c_u + c_o)\), the critical ratio: the probability of having too much that the costs make optimal.

For Next Time

Read before next session: Getting a Demand Distribution, Intermittent and Slow-Moving Demand and Continuous Demand.

Today’s material was One Order, One Chance, Working the Decision by Hand, The Newsvendor Model and The Critical Ratio.

Next session:

  • The belt’s weekly demand history: look, summarize, then fit
  • Why a variance to mean ratio picks the family, and what a goodness-of-fit test does not settle
  • The final buy solved with a fitted distribution, and what the choice of family costs

Bring the critical ratio, 0.5422. Next session finds the belt it points to.

⌂ Index