Newsvendor problem with Poisson demand Problem:
The demand for a particular weekly magazine in a newsstand follows a Poisson distribution averaging 5.2 copies per week. The value paid for each magazine is 15.00 and the sale price is 30.00. Admit that, by the end of the week, the newsvendor can sell all the magazines left over for the price of 8.00 per unit. What's the weekly amount of magazines the newsvendor should buy?
Partial Solution:
Let $q$ be the weekly amount of magazines the newsvendor should buy: 
$$X = \text{Poisson}(5.2)$$
$$Y = \left\{\matrix{22X - 7q, &X \le q \\
                    15q, &X \gt q.}\right.$$
We want to maximize newsvendor's profit, so we need to compute $q^* = \arg\max(E[Y])$:
$$E[Y]=\sum_{k=0}^{q} (22k - 7q)  \frac{e^{-5.2} 5.2^k}{k!} + \sum_{k=q+1}^{\infty} (15q) \frac{e^{-5.2} 5.2^k}{k!}.$$
Question:
Am I on the right track? If so, how to solve $\frac{\partial E[Y]}{\partial q} = 0$?
 A: Let's think about this the way a street-wise vendor might: that is, somebody who already orders $q$ copies per week, is wondering whether changing their order might increase their expected profit, and wants to do as little arithmetic as possible to get the answer.

If I buy one more copy each week, then I will make an extra $30-15=15$ dollars each time the weekly demand is at least $q+1$.  Otherwise, I will lose another $15-8=7$ dollars.  Is this worth it?

This is a binary event--it has just two possibilities.  If we write $F(q)$ for the chance the demand is less than or equal to $q,$ the two events have chances $1-F(q)$ in the first case and $F(q)$ in the second.  The expected change in profit therefore is
$$(30-15)(1-F(q)) + (8-15)F(q).$$
Thus, the vendor might elect to increase her weekly order provided this yields a positive (or even non-negative) result.  This inequality is easily solved for $F(q)$ because algebra tells us it's equivalent to
$$ 15 - 22 F(q) \ge 0.\tag{*}$$
Now (to continue the streetwise reasoning), it would be worthwhile reducing the weekly stock from $q$ to $q-1$ exactly when it would not be worthwhile increasing it from $q-1$ to $q.$  Thus we needn't do a second calculation because it's clear that if any value of $q$ yields an expected positive profit, then that value should be successively increased by one right up to the point where $(*)$ stops holding.
Therefore you can solve this problem in two easy steps:


*

*Find a value of $q$ that yields a positive expected profit.  If there is no such value, then the solution is not to buy any copies of this magazine!

*Assuming you can find such a value, find the largest $q$ that solves equation $(*)$--and increase it by $1.$
At this point you have information no real-world vendor has: you can compute $F$ for any $q.$  I leave it to you to exploit your special ability to find the unique solution to this problem.  If you can compute $F^{-1},$ the solution is particularly easy to find.  (Use the qpois function in R, for instance.)
