Flaw of averages: the answer at the average is not the average answer

Three , 22, 30 and 38 days, average out to 30. Run 30 through the cost curve and it charges $7,200. Run all three and the average of what they charge is $9,000, and the whole of the difference came from averaging first.

Live result
Averaging the three costs gives $9,000, which is $1,800 more than costing the average lead time.
  • Average lead time30 days
  • Cost at the average lead time$7,200
The distance between the two answers is set by where the bend sits inside the range you face.
The distance between the two answers is set by where the bend sits inside the range you face.

Try a case

The curve with both answers on it

The curve with both answers on itA lead time of 30 days costs $7,200 on this curve. The three lead times you typed average the same 30 days, and what they cost averages $9,000, which is $1,800 more.the curve
Horizontal
Lead time, days
Vertical
What that lead time costs, $
Units
Days on the horizontal, whole dollars on the vertical.

Fixed panels

Bend at 20 days, before all three. Gap $0.Bend at 20 days, before all three. Gap $0.

Bend at 20 days, before all three. Gap $0.

Bend at 26 days. Gap $1,800.Bend at 26 days. Gap $1,800.

Bend at 26 days. Gap $1,800.

Bend at 30 days, on the average. Gap $3,600.At a bend of 30 days the plan built on the average lead time costs nothing, while the average of what the three lead times cost is $3,600.

Bend at 30 days, on the average. Gap $3,600.

Bend at 40 days, after all three. Gap $0.Bend at 40 days, after all three. Gap $0.

Bend at 40 days, after all three. Gap $0.

Lead times you typed22 · 30 · 38 days
Weights25% · 50% · 25%
Average lead time30 days
Cost at the average lead time$7,200
Average of the three costs$9,000
The gap$1,800, or 25.0%
26days
30days
8days

Where the weight sits

$

Shown in any single currency; the arithmetic is identical.

The gap against where the bend sits

The gap against where the bend sitsThe gap: $1,800. Cost at the average lead time: $7,200. Average of the three costs: $9,000.$0
Horizontal
Where the cost starts, days
Vertical
The gap, $
Basis
The gap is the average of the three costs less the cost at the average lead time.
Units
Days on the horizontal, whole dollars on the vertical.
Assumptions
The three lead times and weights as you set them; one fixed daily rate; only the bend moves on this axis.

What the average of the answers is not

It is not the answer either. It is the average of three answers, and a fourth lead time you did not type would move it, which is the honest position: two numbers on this page, both partial, and the useful thing is the distance between them rather than either one on its own.

What the distance measures is the bend. A curve with no bend in the range you actually face returns the same figure both ways, and a bend sitting exactly on your average returns the widest difference this page can produce. So the question the arithmetic is really asking is where your bend is, and most of the time nobody has written that number down at all.

It also assumes three lead times stand in for every lead time, that the weights are known, that the cost per day never changes once it starts, and that a day early is worth nothing. None of those hold. All of them are why the gap below is the start of a conversation about the bend rather than the end of one.

Here is the maths

Scale
The four fixed panels share one scale, 16 to 44 days and $0 to $45,000, and it does not move. The live chart above rescales with what you type.
Basis
Both answers are read against the same three lead times and the same curve.
Assumptions
Three lead times, no more; weights that keep the average where you set it; one bend and one rate; nothing else on the curve.
Model version
1.0

The formula, in words

  • Averaging is one step, and the curve is another Do them in one order and you get the cost at the average lead time. Do them in the other order and you get the average of the costs. Only a straight line lets you swap the two without changing the answer, and the moment a curve has a bend in it the order starts to matter.
  • The bend is the whole of it Below the bend the curve charges nothing, above it the curve charges a fixed amount a day. That single corner is enough: it means a lead time inside the bend has slack that the arithmetic can spend but the world cannot, and the average of the answers is the version that refuses to spend it.
  • The gap has a closed form and it is a triangle Multiply the daily rate by the weight on each outside lead time, then by whichever is smaller, the distance from the bend down to the low lead time or the distance from the bend up to the high one. Outside those two lead times that is zero. It peaks when the bend sits on the average, and the weight in the middle does not enter it at all.
  • The average lead time never moves The two outside lead times always carry the same weight as each other, so widening the spread or moving the weight to the edges changes what the three cost without changing what they average. That is the row in the table that stays still while everything above it moves.
l=c−sl=c-s where ll is the low lead time, cc the centre, and ss the spread. h=c+sh=c+s where hh is the high lead time. C(d)=r×max⁡(0,d−b)C(d)=r\times\max(0,d-b) where C(d)C(d) is cost at any lead time, rr the daily rate, dd lead time, and bb the bend. C(c)=r×max⁡(0,c−b)C(c)=r\times\max(0,c-b) where C(c)C(c) is cost at the centre. Cˉ=wlC(l)+wcC(c)+whC(h)\bar C=w_l C(l)+w_c C(c)+w_h C(h) where Cˉ\bar C is the average of the three costs, wlw_l the low lead time weight, C(l)C(l) cost at the low lead time, wcw_c the middle weight, whw_h the high lead time weight, and C(h)C(h) cost at the high lead time. ΔC=Cˉ−C(c)\Delta C=\bar C-C(c) where ΔC\Delta C is the gap. ΔC=r×wl×min⁡(max⁡(0,b−l),max⁡(0,h−b))\Delta C=r\times w_l\times\min(\max(0,b-l),\max(0,h-b))

A worked example

Shipped defaults: average lead time 30 days, the other two 8 days either side, weights even, cost starts after 26 days, $1,800 a day after that. Monetary values are in dollars and durations in days.

The three lead times. l=30−8=22l = 30 - 8 = 22 · c=30c=30 · h=30+8=38h = 30 + 8 = 38, weighted 0.25, 0.50, 0.25. Their average is 0.25×22+0.50×30+0.25×38=5.5+15+9.5=300.25 \times 22 + 0.50 \times 30 + 0.25 \times 38 = 5.5 + 15 + 9.5 = 30 days, which is the number we started from, and it stays 30 for every spread and every shape.

C(22)=0C\left(22\right)=0
The answer at the average. C(30)=1,800×max⁡(0,30−26)=1,800×4=7,200C\left(30\right) = 1,800 \times \max\left(0,30 - 26\right) = 1,800 \times 4 = 7,200.
C(38)=21,600C\left(38\right)=21,600

The average of the answers.

Lead timeDays past the bendWhat it costsWeightContribution
22max⁡(0,22−26)=0\max\left(0,22 - 26\right) = 0$00.25$0
30max⁡(0,30−26)=4\max\left(0,30 - 26\right) = 4$7,2000.50$3,600
38max⁡(0,38−26)=12\max\left(0,38 - 26\right) = 12$21,6000.25$5,400
$9,000
0.25×0+0.50×7,200+0.25×21,600=9,0000.25 \times 0 + 0.50 \times 7,200 + 0.25 \times 21,600 = 9,000
The gap. 9,000−7,200=1,8009,000 - 7,200 = 1,800, which is 1,8007,200=25.0%\frac{1,800}{7,200} = 25.0\% more than the plan built on the average lead time.
Where the $1,800 came from, and this is the mechanism the page exists for. Read the third column of the table in days rather than dollars. The average of the chargeable days is 0.25×0+0.50×4+0.25×12=50.25 \times 0 + 0.50 \times 4 + 0.25 \times 12 = 5 days. The chargeable days at the average lead time is 4. Five days against four, and the missing day is the one the low lead time was never able to give back. At 22 days the delivery is 4 days inside the bend, and averaging first quietly credits 0.25×4=10.25 \times 4 = 1 day of that slack against the high lead time. max⁡(0,…)\max(0,\ldots) refuses the credit, because a delivery that arrives 4 days early does not pay for one that arrives 12 days late. The gap is exactly the credit the averaging awarded, in days:
5−4=15 - 4 = 1
In money that is 1 d×1,800=1,8001\ \text{d}\times1,800=1,800.
The closed form, and it must agree.
ΔC=1,800×0.25×min⁡(max⁡(0,26−22),max⁡(0,38−26))=450×min⁡(4,12)=450×4=1,800\begin{aligned}\Delta C={}&1,800 \times 0.25\\&\times\min\left(\max\left(0,26 - 22\right),\max\left(0,38 - 26\right)\right)\\={}&450 \times \min\left(4,12\right)\\={}&450 \times 4 = 1,800\end{aligned}
Both routes land on the same figure, and their agreement is the first line of the test vector.

The triangle, checked at its three corners. The apex is 1,800×0.25×8=3,6001,800 \times 0.25 \times 8 = 3,600 at a bend of 30, and there the plan built on the average reads C(30)=1,800×max⁡(0,30−30)=0C\left(30\right) = 1,800 \times \max\left(0,30 - 30\right) = 0 while the average of the three costs is 0.25×1,800×8=3,6000.25 \times 1,800 \times 8 = 3,600. The base is [22, 38]: at a bend of 22 the gap is 450×min⁡(0,16)=0450 \times \min\left(0,16\right) = 0, and at 38 it is 450×min⁡(16,0)=0450 \times \min\left(16,0\right) = 0. Between and beyond those points the gap is a straight line, so the whole function is an isoceles triangle sitting exactly on the three lead times, with its apex exactly on the average of them.

The shape control, at the shipped bend. wcw_c never appears in the closed form, so only the tail weight moves the gap. Even gives 450×4=1,800450 \times 4 = 1,800; Edges gives 1,800×0.40×4=2,8801,800 \times 0.40 \times 4 = 2,880; Middle gives 1,800×0.15×4=1,0801,800 \times 0.15 \times 4 = 1,080. The average lead time is 30 days in all three.

Check it yourself

A curve that says a plan costs nothing is the clearest version of the argument this page can draw, and the small panels beneath the chart show that it is the widest the gap ever gets.

What this does not model

Any curve other than one bend and one rate, a cost that grows with how long the delay lasts, a cost that stops at a cap, more than three lead times, weights that are not symmetric, dependence between the lead time and anything else, the possibility that the bend itself is uncertain, the value of arriving early, and the fact that most real consequences bend more than once.

The argument on this page comes from Sam L. Savage, The Flaw of Averages, and is described here without reproducing its text. Hopp and Spearman name the same shape in waiting, Cachon and Terwiesch in inventory, and Meredith and Mantel in completion dates. Everything else is arithmetic on the numbers you type. The cost curve is a shape chosen to be checkable, not a model of a particular contract, and the three lead times are yours rather than supplied data.