# Stochastic Processes: Maximising profits 

1. Apr 28, 2012

### sunrah

1. The problem statement, all variables and given/known data
A company incurs manufacturing costs of $q per item. The product is sold at a retail price of$p per item with p > q. The customer demand K (e.g. number of items that will be sold when the number of items offered is large enough) is a discrete random variable in N. The probabilities P[K = k] = pk for all k in N is known through empirical analysis. How many items should the company produce to maximize the expectation value of its profit?

2. Relevant equations

3. The attempt at a solution
So i started with setting up a profit function G = pK - qx, where x is the number of items to be produced.
I then take the expectation value of the profit = E(G) = E(pK - qx) = pE(K) - qE(x) now what? I wanted to differentiate w.r.t. x but this won't help here.

I also don't see where I can substitute pk in: E(K) = Sum(E(k)pk) ??

2. Apr 28, 2012

### Ray Vickson

If K is the demand, the number of units sold is S = min(K,Q), where Q is the number produced; that is: if Q > K we sell all K units (and are left with Q-K units unsold), but if Q < K we sell Q (i.e., we sell everything we have available). You need to work out the expected value of S.

RGV

3. Apr 29, 2012

### sunrah

yes, but how? I honestly have no idea.

4. Apr 29, 2012

### Dickfore

x is not a random variable, E[x] = x.

As was pointed out in post #2, your G is not as it is given in your op:
$$G(K, x) = \left\lbrace \begin{array}{rl} (p - q) x &, x < K \\ p K - q x &, x \ge K \end{array} \right.$$

Last edited: Apr 29, 2012
5. Apr 29, 2012

### sunrah

ok thanks, so differentiating E[G(K,x)]

$$\frac{dE[G(K,x)]}{dx} = \left\lbrace \begin{array}{rl} (p - q) &, x < K \\ - q &, x \ge K \end{array} \right.$$

so E[G(K,x)] is maximised when

$$q = \left\lbrace \begin{array}{rl} p &, x < K \\ 0 &, x \ge K \end{array} \right.$$

Last edited: Apr 29, 2012
6. Apr 29, 2012

### Ray Vickson

Start by writing down the formula for the expected profit for given production quantity Q, then see if you can simplify it down to a usable form, say F(Q). To figure out the expected profit maximizing Q, the typical approach in these discrete problems is to look at F(Q+1) - F(Q), and try to find where it switches sign, because that tells you when the graph of y = F(Q) turns over. But first, you need F(Q).

RGV

Last edited: Apr 29, 2012
7. Apr 29, 2012

### Ray Vickson

You can't do this. Of course, if you employed a perfect fortune-teller who could tell you exactly what the future demand K will be (before you produce anything) then you would produce exactly that value of x= K. However, that is not what happens. In reality, you first produce the x units then learn afterwards what K is. So, maybe you produced too much, or maybe you did not produce enough. You won't know until after all the money has been spent on production. You cannot avoid making an imperfect decision, but you can try to "win" in the long run, by maximizing the *expected* profit.

BTW, in problems like this, with discrete demand (= 0,1,2,3,...) the production quantity x will also be discrete, so generally you are not able to take the derivative dEG(x,K)/dx, but instead must work with a finite-difference EG(x+1,K) - EG(x,K).

RGV