Convexity of loss function with respect to the mean Let $X\,$ be a non-negative r.v. with known pdf $f(x|\theta)$ but with a single unknown parameter $\theta$. Suppose that the mean $\mu$ can be used to uniquely determine the value of $\theta$, i.e. if given the value of $\mu$, then the value of $\theta$ can be calculated directly. Thus, an alternative way of writing the pdf is $f(x|\mu)$.
Consider the loss function $L(z,\mu)=\int_z^\infty (x-z)f(x|\mu)\,\mathrm{d}x = \mathbb{E}_{\mu}\{[X-z]^+\}$.
My question is, is it possible to shown that this function is convex in $\mu$ for general $f(\cdot)$?

By way of example, consider the exponential distribution with $f(x|\theta)=\theta e^{-x\theta}$. Then clearly $\theta=\frac{1}{\mu}$, and so write $f(x|\mu)=\frac{1}{\mu}e^{-x/\mu}$. Observing that:
$\int_z^\infty (x-z)f(x|\mu)\,\mathrm{d}x =\int_z^\infty xf(x|\mu)\,\mathrm{d}x-z(1-F(z|\mu))$
where $F(x|\mu)$ is the cdf of $X$ given $\mu$, and using the fact that $\int_z^\infty xf(x|\mu)\,\mathrm{d}x=(z+\mu)e^{-z/\mu}$ and that $F(z|\mu)=1-e^{-z/\mu}$ for the exponential distribution, then clearly
$\frac{dL(z,\mu)}{d\mu}=\left(\frac{z^2+z\mu+\mu^2}{\mu^2}\right)e^{-z/\mu}-\left(\frac{z}{\mu}\right)^2e^{-z/\mu}=\left(\frac{z}{u}+1\right)e^{-z/\mu}$
$\frac{d^2L(z,\mu)}{d\mu^2}=\frac{z^2}{\mu^3}e^{-z/\mu} \geq 0$
Since the second derivative is non-negative, the loss function for the exponential distribution is convex with respect to the mean, $\mu$.

Many thanks in advance for your help!
 A: I don't see any reason why this should be generally true.  Intuitively, the loss depends on the tail of $f$ which exceeds $z$, whereas the mean depends also on the rest of $f$.  If we mess around with that left tail of $f$, we should be able to make the loss and the mean do almost whatever we want.
Simple examples are afforded by two-point distributions.  Let $F_\mu$ be supported at values $1$ and $a \lt 1$ depending on $\mu$.  Let the probability of $1$ be $g(\mu)$, $0 \lt g(\mu) \lt 1$.  Then, since $\mu$ needs to be the expectation of $F_\mu$, we have
$$(1 - g(\mu)) a(\mu) + g(\mu) 1 = \mu,$$
with solution
$$a(\mu) = \frac{\mu-g(\mu)}{1-g(\mu)}.$$
For $z$ such that $a(\mu) \lt z \lt 1$, the loss $L(z,\mu)$ equals $(1-z)g(\mu)$, whence it is convex at $\mu$ if and only if $g$ is convex at $\mu$.
To be concrete, let $g(\mu) = \exp(\mu) / (1 + \exp(\mu))$, which is concave for $\mu \gt 0$.  As $\mu$ ranges from $0$ up to $1$, $a(\mu)$ ranges continuously from $-1$ to $1$.  Therefore, for each $-1 \lt z \lt 1$, there will be some interval for $\mu$ starting at $0$ for which the loss is a concave function of $\mu$.
