Mean under one-sided exponential tilting (source code)

= Mean under one-sided exponential tilting
{title2=$\mathbb E^\lambda X=\phi'(\lambda)/\phi(\lambda),\quad\lambda>0$}

Suppose $\phi(\lambda)=\mathbb E e^{\lambda X}<\infty$ for all $\lambda\geq0$. Under the <exponential tilting> $d\mu^\lambda=e^{\lambda x}d\mu/\phi(\lambda)$, $X$ is an <integrable random variable> whenever $\lambda>0$: its negative exponential tail is bounded, and its positive contribution is dominated by a larger positive <exponential moment>. <Differentiation under the integral sign> gives the displayed mean. At the endpoint $\lambda=0$, the positive part of $X$ is integrable, but the negative part need not be. The right derivative $\phi'_+(0)=\mathbb E X$ is valid as an extended value, possibly $-\infty$; a finite mean at zero requires an extra negative-tail integrability assumption.