Newsvendor Problem
Newsvendor Problem
Newsvendor Problem
com
CBP WP 57-23
THE NEWSVENDOR PROBLEM
Arthur V. Hill
The John and Nancy Lindahl Professor, Curtis L. Carlson School of Management, University of
Minnesota, Operations & Management Science Department, 321 19-th Avenue South,
Minneapolis, MN 55455-0413, USA. Voice 612-624-4015. Email [email protected].
Copyright 2011 Clamshell Beach Press
Revised July 7, 2011
1. I ntroduction
Early each morning, the owner of a corner newspaper stand needs to order newspapers for that
day. If the owner orders too many newspapers, some papers will have to be thrown away or sold
as scrap paper at the end of the day. If the owner does not order enough newspapers, some
customers will be disappointed and sales and profit will be lost. The newsvendor problem is to
find the best (optimal) number of newspapers to buy that will maximize the expected (average)
profit given that the demand distribution and cost parameters are known.
The newsvendor problem is a one-time business decision that occurs in many different business
contexts such as:
- Buying seasonal goods for a retailer Retailers have to buy seasonal goods (sometimes
called style goods) once per season. (A season can be a day, week, year, etc.) For
example, most swimsuits can only be purchased seasonally. If a buyer orders too few
swimsuits, the retailer will have lost sales and dissatisfied customers. If the buyer orders too
many swimsuits, the retailer will have to sell them at a clearance price or even throw some
away. Gupta, Hill, and Bouzdine-Chameeva (2006) extend the newsvendor model to handle
multiple seasons (periods), each with a different price elasticity of demand.
- Making the last buy or last production run decision Manufacturers have to make a last
buy (or last production run) for a product (or component) that is near the end of its life cycle.
If the order size is too small, the firm will have stockouts and disappointed customers. If the
order size is too large, the firm will only be able to sell the items for their salvage value.
Hill, Giard, and Mabert (1989) considered a similar problem within the context of selecting a
keep quantity for an aging service parts inventory.
- Setting safety stock levels A distributor has to set the safety stock level for an item. If the
safety stock is too low, stockouts will occur. If safety stock is too high, the firm has too
much carrying cost. Nearly all safety stock models are newsvendor problems with the selling
season being one order cycle or one review period.
Clamshell
Beach
Press
The Newsvendor Problem
Copyright 2011 Clamshell Beach Press, www.ClamshellBeachPress.com
Page 2
- Setting target inventory levels A salesperson carries inventory in the trunk of a vehicle.
The inventory is controlled by a target inventory level. If the target is too low, stockouts will
occur. If the target is too high, the salesperson will have too much carrying cost.
- Selecting the right capacity for a facility or machine If the capacity of a factory or a
machine over the planning horizon is set too low, stockouts will occur. If capacity is set too
high, the capital costs will be too high.
- Overbooking customers If an airline overbooks too many passengers, it incurs the cost of
giving away free tickets to inconvenienced passengers. If the airline does not overbook
enough seats, it incurs an opportunity cost of lost revenue from flying with empty seats.
All of these newsvendor problem contexts share a common mathematical structure with the
following four elements:
- A decision variable (Q) The newsvendor problem is to find the optimal Q for a one-time
decision, where Q is the decision quantity (order quantity, safety stock level, overbooking
level, etc.). Q* denotes the optimal (best) value for Q.
- Uncertain demand (D) Demand is a random variable defined by the demand distribution
(e.g., normal distribution, Poisson distribution, etc.) and estimates of the distribution
parameters (e.g., mean, standard deviation). Demand may be either discrete (integer) or
continuous. This paper develops the newsvendor models for both cases.
- Unit overage cost (c
o
) This is the cost of buying one unit more than the demand during the
one-period selling season. In the standard retail context, the overage cost is the unit cost (c)
less the unit salvage value (s), i.e., c
o
= c s. The salvage value is the salvage revenue less
the salvage cost required to dispose of the unsold product.
- Unit underage cost (c
u
) This is the cost of buying one unit less than the demand during the
one-period selling season. This is also known as the stockout (or shortage) cost. In the retail
context, the underage cost is computed as the lost contribution to profit, which is the unit
price (p) less the unit cost (c), i.e., c
u
= p c. The lost customer goodwill (g) associated with
a lost sale can also be included (i.e., c
u
= p c + g). However, it is difficult to estimate the g
parameter because it is the net present value of all future lost profit from this customer and
all other customers affected by this customers negative reports (negative word of mouth).
Since c
o
and c
u
are both cost parameters, taxes should be considered for both or neither. Given
that the newsvendor problem is in a single period, cash flows do not need to be discounted.
This paper is intended to give readers both a mathematical and intuitive understanding of the
newsvendor model that is used to solve the newsvendor problem. This model is one of the most
celebrated models in all of operations management and operations research and has been in the
literature for over 100 years (Edgeworth 1888; Arrow, Harris, & Marschak 1951).
This paper presents the newsvendor problem in the standard retail context. The reader is
encouraged to explore the Excel workbook Newsvendor Model.xls from Clamshell Beach Press.
The remainder of this paper is organized as follows. Sections 2 and 3 present the newsvendor
problem with discrete (integer) demand and continuous (non-integer) demand. Section 4
The Newsvendor Problem
Copyright 2011 Clamshell Beach Press, www.ClamshellBeachPress.com
Page 3
presents a simple example with graphs for the continuous demand case using both the triangular
and normal distribution approaches. Section 5 presents a simple way to estimate the critical ratio
that is needed for these two models. Section 6 then discusses behavioral issues related to the
newsvendor problem. Section 7 concludes the paper with a summary of the main concepts.
Appendices 1 and 2 derive the newsvendor model with discrete and continuous demand.
Appendix 3 derives the expected values. Appendix 4 presents the VBA code for the inverse
Poisson CDF and Appendix 5 presents the VBA code for the inverse triangular CDF.
2. Newsvendor problem with discrete demand
The model
When demand only takes on integer (whole number) values, it is said to be discrete.
1
With
order quantity Q and specific demand D, the cost for the one-period selling season is:
2
( ) if
( , )
( ) if
o
u
c Q D D Q
Cost Q D
c D Q D Q
<
=
>
(1)
For discrete demand, the demand distribution is defined by the probability mass function
3
p(D).
The equation for the expected cost, therefore, is given by:
1
0 0
( ) ( ) ( , ) ( )( ) ( )( )
Q
o u
D D D Q
ECost Q p D Cost Q D c p D Q D c p D D Q
= = =
= = +
(2)
The first term in equation (2) is the expected overage (scrap) cost and the second term is the
expected underage (shortage) cost. As shown in Appendix 1, the optimal order quantity Q* can
be found at the Q value where the expected cost function is flat. This is where the expected costs
for Q and 1 Q+ units are approximately equal (i.e., ( ) ( 1) ECost Q ECost Q ~ + ). Therefore, Q* is
the smallest value of Q such that the following relationship holds true:
*
0
( *) ( )
Q
u
D
u o
c
P Q p D
c c
=
= >
+
(3)
Appendix 1 derives equation (3). The value / ( )
u u o
R c c c = + is called the critical ratio or
critical fractile and is always between zero and one. The optimal Q is denoted as Q* and can
be found with a simple search procedure starting at Q = 1 and increasing Q until the above
1
A discrete random variable only takes on integer (whole number) values. This could be based on the Poisson
distribution, another theoretical discrete distribution, or an empirical discrete distribution (using historical data).
2
A mathematically concise expression is ( , ) ( ) ( )
o u
C Q D c Q D c D Q
+ +
= + , where ( ) max( , 0) x x
+
= .
3
The probability mass function p(D) is the probability that demand is exactly the integer D. The cumulative
distribution function P(D) is the probability that demand is less than or equal to D.
The Newsvendor Problem
Copyright 2011 Clamshell Beach Press, www.ClamshellBeachPress.com
Page 4
relationship is satisfied. When c
u
= c
o
, the critical ratio is R = 0.5, which is consistent with the
intuition that suggests that Q* should be equal to the median demand when the costs are equal.
Newsvendor example with the Poisson distribution
For example, a buyer for a manufacturer must decide how much to make with the last
manufacturing run before a product is discontinued. The firm currently has zero in stock and the
forecast for the lifetime demand is 4 = units. (The forecast is the mean of the distribution.)
The demand over the lifetime of the product is assumed to be a Poisson distributed random
variable (a reasonable assumption). The underage cost (c
u
) and overage cost (c
o
) are estimated to
be $1000 and $100 per unit, respectively. The c
u
parameter is large because a stockout will
disappoint customers and because the product will not be manufactured again. The critical ratio
is / ( )
u u o
R c c c = + = 1000/1100 = 0.909. Hill, Giard, and Mabert (1989) developed a decision
support system to help managers solve the newsvendor problem in this business context.
Figure 1 shows the Poisson probabilities p(D) and the cumulative Poisson probabilities P(D).
The optimal (maximum expected profit) value of Q can be found by finding the smallest value of
Q such that ( ) 0.909 P Q > . The optimal value of Q for this problem, therefore, is Q* = 7.
I mplementing the model in Excel
The cumulative Poisson distribution can be implemented in Excel with the function
POISSON(Q, , TRUE). While Excel does not provide a function for the inverse of the
cumulative Poisson, it is easy to find the Q that satisfies equation (3) with a simple search.
Appendix 4 implements a simple VBA function for Excel for the Poisson inverse Cumulative
Distribution Function (CDF) where Q* = poisson_inverse(R, ).
Figure 1. Poisson probabilities with mean =4
D
p(D) P(D)
0 0.018 0.018
1 0.073 0.092
2 0.147 0.238
3 0.195 0.433
4 0.195 0.629
5 0.156 0.785
6 0.104 0.889
7 0.060 0.949 Q*
8 0.030 0.979
9 0.013 0.992
10 0.005 0.997
11 0.002 0.999
0.000
0.050
0.100
0.150
0.200
0.250
0 1 2 3 4 5 6 7 8 9 10 11
Demand (D )
P
r
o
b
a
b
i
l
i
t
y
p
(
D
)
The Newsvendor Problem
Copyright 2011 Clamshell Beach Press, www.ClamshellBeachPress.com
Page 5
Figure 2 shows the expected profit for this example, again showing the optimal value at Q* = 7
units. Notice that the expected profit does not change very much with small deviations from Q*
and that it is better to err on the high side than on the low side for this example. As derived in
Appendix 3, the expected profit is ( )( ( 1) ( )) ( ) p s g P Q QP Q p c g Q g + + + , which is
$3,607 for this example.
Figure 2. Expected profit versus order quantity for the example with Q* =7
3. The newsvendor model with continuous demand
The model
As with the discrete demand case, the cost for order quantity Q and specific demand D is:
( ) if
( , )
( ) if
o
u
c Q D D Q
Cost Q D
c D Q D Q
<
=
>
(4)
We assume that demand (D) is a continuous random variable
4
with density function ( ) f D and
cumulative distribution function ( ) F D . The expected cost function is given by:
0 0
( ) ( , ) ( ) ( ) ( ) ( ) ( )
Q
o u
D D D Q
ECost Q Cost D Q f D dD c Q D f D dD c D Q f D dD
= = =
= = +
} } }
(5)
4
A continuous random variable can take on any real value, including fractional values.
$-
$500
$1,000
$1,500
$2,000
$2,500
$3,000
$3,500
$4,000
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Order Quantity (Q)
E
x
p
e
c
t
e
d
P
r
o
f
i
t
(
$
)
The Newsvendor Problem
Copyright 2011 Clamshell Beach Press, www.ClamshellBeachPress.com
Page 6
This equation is analogous to equation (2) for the discrete demand problem. In order to find the
optimal Q, we take the derivative of the expected cost function and set it to zero to find:
1
( )
( ) (1 ( )) 0
( )
*
o u
u
u o
u
u o
dECost Q
c F Q c F Q
dQ
c
F Q
c c
c
Q F
c c
= =
=
+
| |
=
|
+
\ .
(6)
Testing the second derivative proves that Q* is a global optimum.
As mentioned before, / ( )
u u o
R c c c = + is critical ratio and is always between zero and one. In
order to find Q*, the optimal value of Q, it is necessary to find the Q associated with the
cumulative probability distribution so that ( *) / ( )
u u o
F Q c c c = + . Mathematicians write this as
1
* ( / ( ))
u u o
Q F c c c
= + , where
1
(.) F
+ < s
= =
< <
(7)
Appendix 5 presents the VBA code for this function.
4. Newsvendor example with continuous demand
The problem
A retailing firm buys swimsuits for the summer season. The firm buys its swimsuits from a low
cost provider in Asia, but is only able to make a single purchase per year. The estimated demand
is 5000 units, with a minimum of 2000 and a maximum of 8000 units. The selling price is p =
$20 per unit. The firm pays c = $5.00 per unit. The firm can sell excess inventory outside North
America for a salvage value of s = $2.00 per unit. The management believes that no significant
goodwill is lost with a lost sale (i.e., g = 0). Therefore, the underage cost (cost of a lost sale) is
u
c p c g = + = $15 and the overage cost (cost of one unit of extra inventory) is
o
c c s = = $3.
The critical ratio is then / ( ) 15 / 18 83.3%
u u o
R c c c = + = ~ .
The solution with the triangular demand distribution approach
With the triangular distribution, we have (
min ml max
, , D D D ) = (2000, 5000, 8000). Using the
inverse cumulative distribution function for the triangular distribution (equation (7)), the optimal
order quantity is
1
* (0.833) 6, 268 Q F
= = +
+
because
0 D Q = when Q D = . Combining terms and defining the cumulative distribution function as
0
( ) ( )
Q
D
F Q p D
=
=
yields:
0 1
0
( ) ( ) 0
( ) (1 ( )) 0
( ) ( )
Q
o u
D D Q
o u
Q
u
D
u o
c p D c p D
c F Q c F Q
c
F Q p D
c c
= = +
=
=
=
= =
+
(9)
Therefore, the optimal order quantity for the discrete demand newsvendor problem can be found
by finding the smallest Q such that
0
( ) ( ) / ( )
Q
u u o
D
F Q p D c c c
=
= > +
(10)
For continuous demand with density ( ) f D , the expected cost is:
8
The derivations in the appendices show many more intermediate mathematical steps than are normally shown in a
research paper. This is done to help all readers understand the details of the derivations.
The Newsvendor Problem
Copyright 2011 Clamshell Beach Press, www.ClamshellBeachPress.com
Page 15
0
0
0 0
( ) ( , ) ( )
( ) ( ) ( ) ( )
( ) ( ) ( ) ( )
( ) ( ) ( ( )) (1 ( ))
( ) ( ) ( ) ( )
D
Q
o u
D D Q
Q Q
o o u u
D D D Q D Q
o o u u
o u o u u
ECost Q Cost D Q f D dD
c Q D f D dD c D Q f D dD
c Q f D dD c Df D dD c Df D dD c Q f D dD
c QF Q c H Q c H Q c Q F Q
c QF Q c QF Q c H Q c H Q c
= =
= = = =
=
= +
= +
= +
= + +
}
} }
} } } }
( )( ( ) ( )) ( )
u
u o u
c Q
c c QF Q H Q c Q = + +
(11)
where ( ) F Q is the demand distribution function evaluated at Q and ( ) ( )
D Q
Df D dD H Q
=
=
}
.
Note: In equation (11), the mean demand is
0
( )
D
Df D dD
=
=
}
and is called the complete
expectation because the range of integration is (0, ) . The partial expectation of demand is
0
( ) ( )
Q
D
H Q Df D dD
=
=
}
with a range of integration (0, ) Q .
9
Given that ( ) H = , it is clear that
( ) ( )
D Q
Df D dD H Q
=
=
}
.
By the fundamental law of calculus, '( ) ( ) F Q f Q = and according to Leibnizs rule
10
'( ) ( ) H Q Qf Q = . Therefore, the first derivative of ECost(Q) with respect to Q is:
( )
( )( '( ) ( ) '( ))
( )( ( ) ( ) ( ))
( ) ( )
u o u
u o u
u o u
dECost Q
c c QF Q F Q H Q c
dQ
c c Qf Q F Q Qf Q c
c c F Q c
= + +
= + +
= +
(12)
9
Winkler, Roodman, and Britney (1972) use the term partial moment rather than partial expectation. We assume
that demand is always non-negative (i.e., D 0). Winkler et al. use the notation
0
( )
Q
E D for the partial expectation
of the random variable D in the range (0,Q). This paper will use the simpler notation ( ) H Q .
10
Leibnizs rule states that
( ) ( )
( ) ( )
( , ) ( ) ( )
( , ) ( ( ), ) ( ( ), )
x h y x h y
x g y x g y
d r x y dh y dg y
r x y dx dx r h y y r g y y
dy y dy dy
= =
= =
c
= +
c
} }
. In this
situation,
0
'( ) ( ) / ( ) ( )
Q
D
d
H Q dH Q dQ Df D dD Qf Q
dQ
=
= = =
}
, where y Q = , x D = , ( ) h Q Q = , ( ) 0 g Q = , and
( , ) ( , ) ( ) r x y r D Q Df D = = .
The Newsvendor Problem
Copyright 2011 Clamshell Beach Press, www.ClamshellBeachPress.com
Page 16
Setting this derivative to zero leads to:
( )
u
u o
c
F Q
c c
=
+
(13)
where the quantity / ( )
u u o
R c c c = + is the critical ratio (fractile). The second derivative of
( ) ECost Q is
2 2
( ) / ( ) ( )
o u
d ECost Q dQ c c f Q = + , which is non-negative for all values of Q.
Therefore, ( ) ECost Q is a convex function and
1
* ( / ( ))
u u o
Q F c c c
(14)
An alternative expression for the number of units sold is min( , ) D Q . For continuous demand
with density ( ) f D , the expected number of units sold is then given by:
0
0
( ) ( , ) ( )
( ) ( )
( ) (1 ( ))
D
Q
D D Q
ESold Q Sold Q D f D dD
Df D dD Q f D dD
H Q Q F Q
= =
=
= +
= +
}
} }
(15)
The Newsvendor Problem
Copyright 2011 Clamshell Beach Press, www.ClamshellBeachPress.com
Page 17
where ( ) H Q is the partial expectation of demand, which is defined as
0
( ) ( )
Q
D
H Q Df D dD
=
=
}
,
and ( ) 1 ( )
D Q
f D dD F Q
=
=
}
. Winkler, Roodman, and Britney (1972) prove that the partial
expectation (partial first moment) for a normally distributed random variable is:
0
( ) ( ) ( ) ( )
Q
u u
D
H Q Df D dD F z f z o
=
= =
}
(16)
where and o are the mean and standard deviation of demand, ( )
u
F z and ( )
u
f z are the
cumulative and probability density functions for the standard normal distribution, and
( ) / z Q o = . Note that ( ) ( )
u
F Q F z = , but that ( ) ( )
u
f Q f z = . Therefore, for normally
distributed demand, the expected number of units sold is:
( ) ( ) (1 ( ))
( ) ( ) (1 ( ))
( ) ( ) ( )
( ) ( ) ( )
( ) ( ) ( )
u u
u u
u
u
ESold Q H Q Q F Q
F z f z Q F Q
F z f z Q QF Q
F Q f z Q QF Q
Q Q F Q f z
o
o
o
o
= +
= +
= +
= +
= +
(17)
Expected number of units of lost sales
For order quantity Q and specific demand D, the number of units of lost sales is:
0 for
( , )
for
D Q
Lost Q D
D Q D Q
s
=
>
(18)
Alternative expressions for lost sales include max( , 0) D Q and ( , 0) D Q
+
. For continuous
demand with density function ( ) f D , the expected units of lost sales is:
The Newsvendor Problem
Copyright 2011 Clamshell Beach Press, www.ClamshellBeachPress.com
Page 18
0
( ) ( , ) ( )
( ) ( )
( ) ( )
( ) (1 ( ))
D
D Q
D Q D Q
ELost Q Lost Q D f D dD
D Q f D dD
Df D dD Q f D dD
H Q Q F Q
=
= =
=
=
=
=
}
}
} }
(19)
where ( ) ( )
Q
D D Q
Df D dD Df D dD
= =
= +
} }
and ( ) 1 ( )
D Q
f D dD F Q
=
=
}
.
For normally distributed demand, ( ) H Q can be replaced with equation (16) to find the expected
number of units of lost sales:
( ) ( ) (1 ( ))
( ) ( ) (1 ( ))
(1 ( )) (1 ( )) ( )
( )(1 ( )) ( )
u u
u
u
ELost Q H Q Q F Q
F z f z Q F Q
F Q Q F Q f z
Q F Q f z
o
o
o
=
= +
= +
= +
(20)
Expected number of units salvaged
For order quantity Q and specific demand D, the number of units salvaged is:
for
( , )
0 for
Q D D Q
Salvage Q D
D Q
s
=
>
(21)
Alternative expressions for the number of units salvaged include max( , 0) Q D and ( , 0) Q D
+
.
For continuous demand with density function ( ) f D , the expected number of units salvaged is:
0
0
0 0
( ) ( , ) ( )
( ) ( )
( ) ( )
( ) ( )
D
Q
D
Q Q
D D
ESalvage Q Salvage Q D f D dD
Q D f D dD
Q f D dD Df D dD
QF Q H Q
=
=
= =
=
=
=
=
}
}
} }
(22)
The Newsvendor Problem
Copyright 2011 Clamshell Beach Press, www.ClamshellBeachPress.com
Page 19
For normally distributed demand, ( ) E Q can be replaced with equation (16) to find the expected
number of units salvaged:
( ) ( ) ( )
( ) ( ) ( )
( ) ( ) ( )
( ) ( ) ( )
u u
u
u
ESalvage Q QF Q H Q
QF Q F z f z
QF Q F Q f z
Q F Q f z
o
o
o
=
= +
= +
= +
(23)
Expected cost
As developed in equation (11), the expected cost for continuous demand is:
( ) ( )( ( ) ( )) ( )
u o u
ECost Q c c QF Q H Q c Q = + + (24)
For normally distributed demand, ( ) E Q can be replaced with equation (16) to find the expected
cost:
( ) ( )( ( ) ( ) ( )) ( )
( )(( ) ( ) ( )) ( )
u o u u u
u o u u
ECost Q c c QF Q F z f z c Q
c c Q F Q f z c Q
o
o
= + + +
= + + +
(25)
where ( ) / z Q o = and ( )
u
F z and ( )
u
f z are the CDF and PDF for the standard normal.
(Note that ( ) ( )
u
F z F Q = and ( ) ( )
u
f z f Q = .)
Expected profit
For order quantity Q and specific demand D, the profit is:
( ) if
( , )
( ) if
pD s Q D cQ D Q
Profit Q D
pQ g D Q cQ Q D
+ s
=
<
(26)
The expected profit function, therefore, is:
The Newsvendor Problem
Copyright 2011 Clamshell Beach Press, www.ClamshellBeachPress.com
Page 20
0
0
0 0 0
( ) ( , ) ( )
[ ( )] ( ) [ ( )] ( )
( ) ( ) ( )
( ) ( ) ( )
( ) ( ) ( ) (1 ( ))
D
Q
D D Q
Q Q Q
D D D
D Q D Q D Q
EProfit Q Profit Q D f D dD
pD s Q D f D dD pQ g D Q f D dD cQ
p Df D dD sQ f D dD s Df D dD
pQ f D dD g Df D dD gQ f D dD cQ
pH Q sQF Q sH Q pQ F Q
= =
= = =
= = =
=
= + +
= +
+ +
= + +
}
} }
} } }
} } }
( ( )) (1 ( ))
( ) ( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( )
( )( ( ) ( )) ( )
g H Q gQ F Q cQ
pH Q sQF Q sH Q pQ pQF Q g gH Q gQ gQF Q cQ
pH Q sH Q gH Q pQF Q sQF Q gQF Q pQ cQ gQ g
p s g H Q p s g QF Q p c g Q g
p s g H Q QF Q p c g Q g
+
= + + + +
= + + + +
= + + + +
= + + +
(27)
For normally distributed demand, ( ) H Q can be replaced with equation (16) to find the expected
profit:
( ) ( )( ( ) ( )) ( )
( )( ( ) ( ) ( )) ( )
( )(( ) ( ) ( )) ( )
u
u
EProfit Q p s g H Q QF Q p c g Q g
p s g F Q f z QF Q p c g Q g
p s g Q F Q f z p c g Q g
o
o
= + + +
= + + +
= + + +
(28)
Relationships between expected values
All units ordered at the beginning of the period must be either sold or salvaged at the end of the
period:
( , ) ( , ) Q Sold D Q Salvage D Q = + (29)
Taking expectations of both sides, leads to the relationship:
( ) ( ) Q ESold Q ESalvage Q = + (30)
The demand in a period must be converted into either a sale or a lost sale. In other words, the
demand is always the sum of the number of units sold and the number of units of lost sales. For
any order quantity and demand realization:
( , ) ( , ) D Sold D Q Lost D Q = + (31)
The Newsvendor Problem
Copyright 2011 Clamshell Beach Press, www.ClamshellBeachPress.com
Page 21
Taking expectations of both sides, it is clear that the average demand is the sum of the expected
number of units sold and the expected number of units of lost sales:
( ) ( ) ESold Q ELost Q = + (32)
The expected cost in equation (24) can be related to expected profit as follows:
( ) ( )( ( ) ( )) ( )
( )( ( ) ( )) ( )( )
( )( ( ) ( )) ( ) ( )
( ) ( )( ( ) ( )) ( )
( ) ( )( ( ) ( )) ( ) )
(
u o u
ECost Q c c QF Q H Q c Q
p c g c s QF Q H Q p c g Q
p s g QF Q H Q p c g p c g Q
p c g p s g H Q QF Q p c g Q
p c g p s g H Q QF Q p c g Q g g
p c
= + +
= + + + +
= + + + +
= + + +
= + + + +
= ) [( )( ( ) ( )) ( ) ]
( ) ( ) ( )
( ) ( ) ( )
g p s g H Q QF Q p c g Q g g
ECost Q p c EProfit Q
EProfit Q p c ECost Q
+ + + +
=
=
(33)
In other words, for any order quantity Q, the expected profit is the profit for selling the average
demand, ( ) p c , less the expected cost. The expected cost, therefore, can be interpreted as the
cost of demand variability and the organization should be willing to pay that amount to reduce
uncertainty to zero. In other words, when the demand has no variability the expected profit is
( ) p c and the expected cost is zero. Given that the quantity ( ) p c is a constant and is
independent of Q, maximizing expected profit is equivalent to minimizing expected cost.
Summary of the expected value equations
Tables 1 and 2 summarize the expectations for all continuous and discrete demand distributions.
Table 3 summarizes the relationships between expected values for the newsvendor problem for
any demand distribution. Tables 4 and 5 summarize the expectations for normally distributed
demand (a continuous demand distribution) and Poisson distributed demand (a discrete demand
distribution).
The Newsvendor Problem
Copyright 2011 Clamshell Beach Press, www.ClamshellBeachPress.com
Page 22
Table 1. Summary of expected values for all continuous demand distributions
11
Expected units sold
( ) ( ) (1 ( )) ESold Q H Q Q F Q = +
Expected salvage
( ) ( ) ( ) ESalvage Q QF Q H Q =
Expected lost sales
( ) ( ) (1 ( )) ELost Q H Q Q F Q =
Expected cost
12
( ) ( )( ( ) ( )) ( )
u o u
ECost Q c c QF Q H Q c Q = + +
Expected profit
( ) ( )( ( ) ( )) ( )
( ) ( ) ( )
EProfit Q p s g H Q QF Q p c g Q g
p ESold Q s ESalvage Q g ELost Q cQ
= + + +
= +
Table 2. Summary of expected values for all discrete demand distributions
13
Expected units sold
( ) ( ) (1 ( )) ESold Q H Q Q F Q = +
Expected salvage
( ) ( ) ( ) ESalvage Q QF Q H Q =
Expected lost sales
( ) ( ) (1 ( )) ELost Q H Q Q F Q =
Expected cost
14
( ) ( )( ( ) ( )) ( )
u o u
ECost Q c c QF Q H Q c Q = + +
Expected profit
( ) ( )( ( ) ( )) ( )
( ) ( ) ( )
EProfit Q p s g H Q QF Q p c g Q g
p ESold Q s ESalvage Q g ELost Q cQ
= + + +
= +
Table 3. Relationships between expectations for all demand distributions
All units ordered will always be either sold or salvaged.
( ) ( ) Q ESold Q ESalvage Q = +
The realized demand will always be equal to the actual
number of units sold plus the lost sales.
( , ) ( , )
min( , ) max( , 0)
D Sold Q D Lost Q D
D Q D Q
= +
= +
Average demand is always the expected units sold plus the
expected units of lost sales.
( ) ( ) ESold Q ELost Q = +
Expected profit is always the profit for the average
demand less the expected cost.
( ) ( ) ( ) EProfit Q p c ECost Q =
Table 4. Summary of expected values for normally distributed demand
15
Expected units sold
( ) ( ) ( ) ( )
u
ESold Q Q Q F Q f z o = +
Expected salvage
( ) ( ) ( ) ( )
u
ESalvage Q Q F Q f z o = +
Expected lost sales
( ) ( )(1 ( )) ( )
u
ELost Q Q F Q f z o = +
11
The partial expectation for continuous demand is defined as
0
( ) ( )
Q
D
H Q Df D dD
=
=
}
.
12
The expected cost is the sum of the expected underage cost plus the expected overage cost.
13
The partial expectation for discrete demand is defined as
0
( ) ( )
Q
D
H Q Dp D
=
=
.
14
The expected cost is the sum of the expected underage and overage costs.
15
The expected values for the normal distribution are derived by replacing ( ) H Q with ( ) ( )
u u
F z f z o , where
( ) / z Q o = . The proof for this relationship can be found in Winkler, Roodman, and Britney (1972).
The Newsvendor Problem
Copyright 2011 Clamshell Beach Press, www.ClamshellBeachPress.com
Page 23
Expected cost
( ) ( )(( ) ( ) ( )) ( )
u o u u
ECost Q c c Q F Q f z c Q o = + + +
Expected profit
( ) ( )(( ) ( ) ( )) ( )
u
EProfit Q p s g Q F Q f z p c g Q g o = + + +
Table 5. Summary of expected values for Poisson
16
distributed demand with mean
Expected units sold
( ) ( 1) (1 ( )) ESold Q F Q Q F Q = +
Expected salvage
( ) ( ) ( 1) ESalvage Q QF Q F Q =
Expected lost sales
( ) ( 1) (1 ( )) ELost Q F Q Q F Q =
Expected cost
( ) ( )( ( ) ( 1)) ( )
u o u
ECost Q c c QF Q F Q c Q = + +
Expected profit
( ) ( )( ( 1) ( )) ( ) EProfit Q p s g F Q QF Q p c g Q g = + + +
The expected values for other distributions can be found using the partial expectation functions
presented in Table 6. These equations were derived by the author from the tail conditional
expectation functions presented in Landsman and Valdez (2005).
Table 6. Partial expectation functions
Continuous distributions
Normal
( ) ( ) ( )
u u
H x F z f z o = , where ( ) / z x o =
Lognormal
2
/ 2 2
( ) (1 (( ln( )) / ))
Normal
H x e F x
o
o o
+
= +
Exponential
( ) ( ) ( )
Exp
H x x F x x = +
Gamma
( ) ( | 1, )
Gamma
H x F x o | = +
Discrete distributions
Poisson
( ) ( 1)
Poisson
H x F x =
Binomial
( ) ( 1| , 1)
Binomial
H x F x p n =
Negative binomial
( ) ( 1| , 1)
NB
H x F x p o = +
Appendix 4: VBA code for the inverse of the triangular CDF
Function triangular_inverse(p, a, b, c) As Double
'
' Compute the inverse of the triangular distribution at probability p
' given triangularly distributed demand with parameters
' (minimum, most likely, maximum) = (a, b, c).
'
If p <= (b - a) / (c - a) Then
triangular_inverse = a + Sqr(p * (c - a) * (b - a))
Else
triangular_inverse = c - Sqr((1 - p) * (c - a) * (c - b))
16
Hadley and Whitin (1963) prove that the partial expectation for the Poisson distribution is ( ) ( 1) H Q P Q = .
The Newsvendor Problem
Copyright 2011 Clamshell Beach Press, www.ClamshellBeachPress.com
Page 24
End If
End Function
Appendix 5: VBA code for the inverse of the Poisson CDF
Function poisson_inverse(p, lambda)
' p =cumulative probability and lambda = mean of the Poisson distribution.
' This routine truncates the result at xmax = 60.
Dim x As Integer
Const xmax = 60
For x = 1 To xmax
poisson_inverse = x
If Application.WorksheetFunction.Poisson(x, lambda, True) >= p Then Exit Function
Next x
MsgBox poisson_inverse( & Format(p, 0.00%) & ) was truncated at _
& Val(xmax) & ., vbExclamation
End Function
Related resources from Clamshell Beach Press: The companion Excel workbook
newsvendor model.xls is available for download from www.ClamshellBeachPress.com. Other
related Excel workbooks from Clamshell Beach Press include slowmove.xls and safety
stock.xls. The Seasonal Buying paper applies the newsvendor logic to the retail buying
context. The Triangular Distribution paper presents the details of the triangular distribution.
Acknowledgements: The author thanks Jonathan Hill for his helpful edits on the mathematics
in earlier versions of this paper. The author also thanks Sheryl Holt (Writing Studies
Department, University of Minnesota) and Lindsay Conner (Word Out Communications,
http://word-out.com) for their helpful edits of earlier versions of this paper.
Copyright 2011 Clamshell Beach Press. All rights reserved. Copying or distributing any part of this document in
any form without prior written permission from Clamshell Beach Press is illegal. Written permission may be
obtained by sending an email to [email protected].