<< Chapter < Page Chapter >> Page >

Stocking for random demand (see Exercise 4 From "problems on functions of random variables")

The manager of a department store is planning for the holiday season. A certain item costs c dollars per unit and sells for p dollars per unit. If the demand exceeds the amount m ordered, additional units can be special ordered for s dollars per unit ( s > c ). If demand is less than amount ordered, the remaining stock can be returned (or otherwise disposed of) at r dollars per unit ( r < c ). Demand D for the season is assumed to be a random variable with Poisson ( μ ) distribution. Suppose μ = 50 , c = 30 , p = 50 , s = 40 , r = 20 . What amount m should the manager order to maximize the expected profit?

PROBLEM FORMULATION

Suppose D is the demand and X is the profit. Then

  • For D m , X = D ( p - c ) - ( m - D ) ( c - r ) = D ( p - r ) + m ( r - c )
  • For D > m , X = m ( p - c ) + ( D - m ) ( p - s ) = D ( p - s ) + m ( s - c )

It is convenient to write the expression for X in terms of I M , where M = ( - , m ] . Thus

X = I M ( D ) [ D ( p - r ) + m ( r - c ) ] + [ 1 - I M ( D ) ] [ D ( p - s ) + m ( s - c ) ]
= D ( p - s ) + m ( s - c ) + I M ( D ) [ D ( p - r ) + m ( r - c ) - D ( p - s ) - m ( s - c ) ]
= D ( p - s ) + m ( s - c ) + I M ( D ) ( s - r ) ( D - m )

Then E [ X ] = ( p - s ) E [ D ] + m ( s - c ) + ( s - r ) E [ I M ( D ) D ] - ( s - r ) m E [ I M ( D ) ] .

ANALYTIC SOLUTION

For D Poisson ( μ ) , E [ D ] = μ and E [ I M ( D ) ] = P ( D m )

E [ I M ( D ) D ] = e - μ k = 1 m k μ k k ! = μ e - μ k = 1 m μ k - 1 ( k - 1 ) ! = μ P ( D m - 1 )

Hence,

E [ X ] = ( p - s ) E [ D ] + m ( s - c ) + ( s - r ) E [ I M ( D ) D ] - ( s - r ) m E [ I M ( D ) ]
= ( p - s ) μ + m ( s - c ) + ( s - r ) μ P ( D m - 1 ) - ( s - r ) m P ( D m )

Because of the discrete nature of the problem, we cannot solve for the optimum m by ordinary calculus. We may solve for various m about m = μ and determine the optimum. We do so with the aid of MATLAB and the m-function cpoisson.

mu = 50; c = 30;p = 50; s = 40;r = 20; m = 45:55;EX = (p - s)*mu + m*(s -c) + (s - r)*mu*(1 - cpoisson(mu,m)) ... -(s - r)*m.*(1 - cpoisson(mu,m+1));disp([m;EX]')45.0000 930.8604 46.0000 935.523147.0000 939.1895 48.0000 941.796249.0000 943.2988 50.0000 943.6750 % Optimum m = 5051.0000 942.9247 52.0000 941.069953.0000 938.1532 54.0000 934.234755.0000 929.3886

A direct, solution may be obtained by MATLAB, using finite approximation for the Poisson distribution.

APPROXIMATION

ptest = cpoisson(mu,100) % Check for suitable value of n ptest = 3.2001e-10n = 100; t = 0:n;pD = ipoisson(mu,t); for i = 1:length(m) % Step by step calculation for various mM = t>m(i); G(i,:) = t*(p - r) - M.*(t - m(i))*(s - r)- m(i)*(c - r);end EG = G*pD'; % Values agree with theoretical to four deicmals

An advantage of the second solution, based on simple approximation to D , is that the distribution of gain for each m could be studied — e.g., the maximum and minimum gains.

A jointly distributed pair

Suppose the pair { X , Y } has joint density f X Y ( t , u ) = 3 u on the triangular region bounded by u = 0 , u = 1 + t , u = 1 - t (see [link] ). Let Z = g ( X , Y ) = X 2 + 2 X Y . Determine E [ Z ] .

Figure 1 is a density drawing, with a horizontal axis labeled as t, and a vertical axis labeled as u. A triangle of width 2, with a base sitting on the horizontal axis, from t=-1 to t=1. The third point of the triangle (the one not on the horizontal axis) is directly above, on the vertical axis. The drawing of the triangle is thus divided in equal halves by the vertical axis. The side of the triangle on the horizontal axis has no direct label. The side of the triangle on the left is labeled u = 1 + t, and the side of the triangle on the right is labeled u = 1- t. A caption below the triangle reads f_xy (t, u) - 3u on the triangle. Figure 1 is a density drawing, with a horizontal axis labeled as t, and a vertical axis labeled as u. A triangle of width 2, with a base sitting on the horizontal axis, from t=-1 to t=1. The third point of the triangle (the one not on the horizontal axis) is directly above, on the vertical axis. The drawing of the triangle is thus divided in equal halves by the vertical axis. The side of the triangle on the horizontal axis has no direct label. The side of the triangle on the left is labeled u = 1 + t, and the side of the triangle on the right is labeled u = 1- t. A caption below the triangle reads f_xy (t, u) - 3u on the triangle.
The density for [link] .

Analytic solution

E [ Z ] = ( t 2 + 2 t u ) f X Y ( t , u ) d u d t

= 3 - 1 0 0 1 + t ( t 2 u + 2 t u 2 ) d u d t + 3 0 1 0 1 - t ( t 2 u + 2 t u 2 ) d u d t = 1 / 10

APPROXIMATION

tuappr Enter matrix [a b]of X-range endpoints [-1 1] Enter matrix [c d]of Y-range endpoints [0 1] Enter number of X approximation points 400Enter number of Y approximation points 200 Enter expression for joint density 3*u.*(u<=min(1+t,1-t)) Use array operations on X, Y, PX, PY, t, u, and PG = t.^2 + 2*t.*u; % g(X,Y) = X^2 + 2XY EG = total(G.*P) % E[g(X,Y)]EG = 0.1006 % Theoretical value = 1/10 [Z,PZ]= csort(G,P); % Distribution for Z EZ = Z*PZ' % E[Z]from distribution EZ = 0.1006
Got questions? Get instant answers now!

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Applied probability. OpenStax CNX. Aug 31, 2009 Download for free at http://cnx.org/content/col10708/1.6
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Applied probability' conversation and receive update notifications?

Ask