Trying to solve a dynamic programming inventory control problem for a final research paper for a graduate dynamic programming (CS/Industrial Systems Eng.) course, which involves an expectation E(max(y-w,0)) where w is randomly distributed (Poisson) and y is more or less the control variable (this is part of the holding/shortage cost equation and comes from Bertsekas description of the problem in Dynamic Programming and Optimal Control, vol. 1).
What I’m wondering is, would this expectation be equivalent to max(y-E(w),0)?
I’m not super familiar with expectations, but know in some cases you can apply expectations to only the terms that relate to the random distribution (e.g. E(y-x)= y-E(x)). But in this case I’m thinking that shouldn’t apply since e.g. if y = E(w) there would be a non-zero probability that max (y-w,0) is positive and no possibility of it being negative, implying the expectation should be strictly positive (albeit nearly zero in many cases).
When I try to solve it computationally with the mean of the distribution set to 1000, I get E(max(1000-w,0))=12.614 or so, so wanted to double-check that this makes sense.
The exact formula is \begin{align} \mathbb E\big[\max(y-w,0)\big]=\sum_{n=0}^\infty e^{-\lambda}\frac{\lambda^n}{n!}\max(y-n,0)=e^{-\lambda}\sum_{n=0}^y\frac{\lambda^n}{n!}(y-n)\,. \end{align} For large intensities $\lambda$ this is not practical. Instead we approximate $w$ by a normally distributed variable that has mean $\overline{w}=\lambda$ and variance $\lambda\,.$ The standard deviation is then $$\sigma=\sqrt{\lambda}\,.$$ Then, \begin{align} &\mathbb E\big[\max(y-w,0)\big]=\int_{-\infty}^{\frac{y-\overline{w}}{\sigma}}(y-\overline{w}-\sigma \,x)\,\varphi(x)\,dx\\ &=(y-\overline{w})\,\Phi\left(\frac{y-\overline{w}}{\sigma}\right)+\sigma\,\varphi\left(\frac{y-\overline{w}}{\sigma}\right)\, \end{align} where $\Phi$ is the standard normal CDF and $\varphi$ the standard normal PDF. For $y=\overline{w}=\lambda=1000$ I get an expectation of $12.62\,.$