"Assume that a monthly demand X is Poisson distributed with a mean of 200. Given that a grocery store can only place an order at the beginning of a month, how many item should be ordered to make the expected lost sales less than 10."
Not sure how to start this question. I know that X~poisson(200) So on average the demand is 200.
And if for example we order 220 but the demand is 230 we would have 10 lost sales.
So I can make a random variable $L$ be lost sales but not sure how that would be distributed.
I know for example if we order 220
then we have $P(X>220)=1-F(220)=1-.924=.075$ of demand being bigger than the order.
Defining
$L(Q)=\max\{X-Q,0\},$
the expected loss is given by
$$\mathbb E (L(Q))=\sum_{i=0}^{\infty} \max\{i-Q,0\} \frac{\lambda^i e^{-\lambda}}{i!}=\sum_{i=Q}^{\infty} (i-Q)\frac{\lambda^i e^{-\lambda}}{i!}=\color{blue}{\lambda -Q + \sum_{i=0}^{Q-1} (Q-i)\frac{\lambda^i e^{-\lambda}}{i!}.}$$
This can be used to find values of $Q$ for which $$\mathbb E (L(Q)) \le 10.$$
For $\lambda=200$, the range is obtained as $$Q \ge m=193.$$ Note that the expectation $\mathbb E (L(Q))$ is decreasing in $Q$.
Remark 1: For computing the summation:
$$\sum_{i=0}^{Q-1} (Q-i)\frac{\lambda^i e^{-\lambda}}{i!}=\sum_{i=0}^{Q-1} (Q-i) \mathbb P (X=i)$$
each probability needs to be recursively computed as
$$\mathbb P (X=i)=\frac{\lambda}{i} \mathbb P (X=i-1), \, i \ge 1$$
with $\mathbb P (X=0)=e^{-\lambda} $ for computational stability.
Remark 2: To find $m$, the direct search method is used by noting that
$$m \ge \lambda - 10.$$
So for $\lambda=200$, the start point of the direct search for finding $m$ is $200 - 10=190$.