# Expectation of a maximum function

Given for some $y_k$, \begin{align} w_k &= \begin{cases} 0 &\text{w.p. } \frac{1}{4} \\ 1 &\text{w.p. } \frac{2}{4} \\ 2 &\text{w.p. } \frac{1}{4} \end{cases} \\ L_k(y_k) &= E\left[\max\{0,-y_k+w_k\}\right] + E\left[\max\{0,y_k-w_k\} \right] \\ \end{align} How do you apply the expectation to the maximum functions? Is it simply, \begin{align} E\left[\max\{0,-y_k+w_k\}\right] &= \max\{E[0]\,E[-y_k+w_k]\}\\ &= \max\{0,\frac{1}{4}(-y_k+0) + \frac{2}{4}(-y_k+1) + \frac{1}{4}(-y_k+2)\} \end{align}

• What is $y_k$? – Nitish Mar 2 '14 at 20:32
• @Nitish $y_k$ is a decision variable (this question is part of a dynamic programming problem). For the purpose of this question, it is simply a fixed variable. – Elpezmuerto Mar 2 '14 at 21:53

I'd probably do it this way: \begin{align} \max \{ 0,w_k-y_k\}&=\cases{w_k-y_k & $w_k\geq y_k$\\0 &Otherwise}\\ \mathbb{E}\max \{ 0,w_k-y_k\}&=\sum_{w_k} (w_k-y_k)\cdot I(w_k\geq y_k) \end{align} where $I(\bullet)$ is the Indicator Function.