Suppose $X$ is non-central exponentially distributed with location $k$ and rate $\lambda$. Then, what is $E(\log(X))$.

I know that for $k=0$, the answer is $-\log(\lambda) - \gamma$ where $\gamma$ is the Euler-Mascheroni constant. What about when $k > 0$?

  • $\begingroup$ Have you tried integrating in Mathematica? $\endgroup$
    – user10525
    Jun 18, 2012 at 16:01
  • 4
    $\begingroup$ I assume $k > 0$ (when the density is written as $\lambda \exp\{-\lambda(x-k)\}$,) otherwise $x < 0$ with probability > 0, with dreadful consequences for $\mathbb{E}\log x$. $\endgroup$
    – jbowman
    Jun 18, 2012 at 16:25
  • 2
    $\begingroup$ I got ${\mathbb E}[\log(X)]=e^{k\lambda}\Gamma(0,k\lambda)+\log(k)$. Mathematica is faster if you use the command Assumptions for specifying the parameter space. $\endgroup$
    – user10525
    Jun 18, 2012 at 16:35
  • 4
    $\begingroup$ Does the upper incomplete gamma function count as closed form? (To me, it does not.) This is just conveniently hiding an integral via notation. $\endgroup$
    – cardinal
    Jun 18, 2012 at 16:50
  • 2
    $\begingroup$ @NeilG This is the Mathematica code Integrate[Log[x + k]*\[Lambda]*Exp[-\[Lambda]*x], {x, 0, \[Infinity]}, Assumptions -> k > 0 && \[Lambda] > 0]. You can just copy it and paste it on a .nb file. I am not sure if the Wolfram Alpha allows for including restrictions. $\endgroup$
    – user10525
    Jun 18, 2012 at 18:45

1 Answer 1


The desired integral can be wrestled into submission by brute-force manipulations; here, we instead try to give an alternative derivation with a slightly more probabilistic flavor.

Let $X \sim \mathrm{Exp}(k,\lambda)$ be a noncentral exponential random variable with location parameter $k > 0$ and rate parameter $\lambda$. Then $X = Z + k$ where $Z \sim \mathrm{Exp}(\lambda)$.

Note that $\log(X/k) \geq 0$ and so, using a standard fact for computing the expectation of nonnegative random variables, $$ \newcommand{\e}{\mathbb E}\newcommand{\rd}{\mathrm d}\renewcommand{\Pr}{\mathbb P} \e \log(X/k) = \int_0^\infty \Pr(\log(X/k) > z)\,\rd z = \int_0^\infty \Pr(Z > k(e^z - 1)) \,\rd z \>. $$ But, $\Pr(Z > k(e^z -1)) = \exp(-\lambda k(e^z - 1))$ on $z \geq 0$ since $Z \sim \mathrm{Exp}(\lambda)$ and so $$ \e \log(X/k) = e^{\lambda k} \int_0^\infty \exp(-\lambda k e^z) \, \rd z = e^{\lambda k} \int_{\lambda k}^\infty t^{-1} e^{-t} \,\rd t \>, $$ where the last equality follows from the substitution $t = \lambda k e^z$, noting that $\rd z = \rd t / t$.

The integral on the right-hand size of the last display is just $\Gamma(0,\lambda k)$ by definition and so $$ \e \log X = e^{\lambda k} \Gamma(0,\lambda k) + \log k \>, $$ as confirmed by @Procrastinator's Mathematica computation in the comments to the question.

NB: The equivalent notation $\mathrm E_1(x)$ is also often used in place of $\Gamma(0,x)$.

  • 4
    $\begingroup$ +1 @Michael Chernick It seems like not everyone is lazy ;). $\endgroup$
    – user10525
    Jun 18, 2012 at 18:39
  • $\begingroup$ This is really great. I just want to point out for anyone implementing this that many implementations of the incomplete gamma function restrict the first parameter to be strictly positive. The identity $\Gamma(0, z) = -\operatorname{Ei}(-z)$ solves that minor problem. $\endgroup$
    – Neil G
    Jun 18, 2012 at 18:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.