Mean Value of Gompertz Distribution

In my attempts to answer my own question, I wanted to estimate a given distribution with Gompertz Distribution.

I wanted to use mode, median and mean values to estimate $b$ and $\eta$. These values on Wikipedia are given as

$$ mean=\frac{1}{b}e^\eta\Ei(-\eta)\\ mode=\frac{1}{b}\ln(\frac{1}{\eta})\\ median=\frac{1}{b}\ln[\left(\frac{-1}{\eta}\right)\ln(0.5)+1] $$

My approach is to find $\frac{median}{mod}$ to eliminate $b$.

Define $M=\frac{median}{mode}$

$$ M=\frac{\ln[\left(\frac{-1}{\eta}\right)\ln(0.5)+1]}{\ln(\frac{1}{\eta})} $$

$$ \left(\frac{1}{\eta}\right)^M=\frac{-1}{\eta}\ln(0.5)+1. $$

I thought this is as clean as it gets and solved it for $\eta$ with python. Later, I used the mean value to get $b$ as

$$ b=\frac{e^\eta\Ei(-\eta)}{mean}. $$

This results in a negative $b$, which is actually defined positive.

When I disregard mean value and compute $b$ and $\eta$ from mode and median, I get some meaningful results, displayed below. Not the best approximation, but it still resembles the starting distribution.

enter image description here

I checked this question but it didn't help.

Where do I go wrong? Is the mean expression for Gompertz distribution wrong on wikipedia?

Thanks!


Solution 1:

If you obtain a positive solution for $\hat\eta$, then $\hat b$ will also be positive, since $\hat\mu > 0$, and $$\operatorname{Ei}(-\hat\eta) = \int_{v = \hat \eta}^\infty \frac{e^{-v}}{v} \, dv > 0$$ whenever $\hat \eta > 0$.