derivative of the expectation of max function

116 Views Asked by At

What is the first and second and third derivative with respect to $w_{i}$ of the following function ?? ($r_{i}$'s are random variables) $$f(w,r)=E\bigg[\bigg(\sum_{i=1}^{n}{w_{i}(a-r_{i})},0\bigg)_{+}^3 \bigg]$$

I am getting the answer: $\frac{\partial f}{\partial w_{i}}=3E\bigg[\bigg(\sum_{i=1}^{n}{w_{i}(a-r_{i})},0\bigg)^2_{+} (a-r_{i})\bigg]$

and $\frac{\partial^2 f}{\partial w_{i}^2}=6E\bigg[\bigg(\sum_{i=1}^{n}{w_{i}(a-r_{i})},0\bigg)_{+} (a-r_{i})^2\bigg].$

Also what would be the third derivative ?

I am not sure about the answers. please clarify me.