Talk:Exponentially modified Gaussian distribution

The PDF for the exGaussian with parameters (mu=-3, sigma=1, nu=0.25; orange line) is wrong. Checked against R and matlab (e.g. http://rss.acs.unt.edu/Rdoc/library/gamlss.dist/html/exGAUS.html)

Formula for the CDF is wrong!
Formula for the CDF is wrong! — Preceding unsigned comment added by Ad van der Ven (talk • contribs) 14:05, 7 February 2022 (UTC)


 * I can confirm the cdf equation is incorrect. There appears to be an extra parenthesis as well as an unnecessary log as well as an incorrect substitution.  Further, this formulation is pointlessly complicated.  Substituting the values for u and v into gives the standard Gaussian cdf for the first term $$\Phi(x, \mu, \sigma)$$.
 * The correct expression would be
 * $$\Phi(x,\mu,\sigma) - \frac{1}{2} e^{\frac{\lambda}{2} (2\mu-2x+\sigma^2 \lambda)} \operatorname{erfc}\left(\frac{\mu-x+\sigma^2 \lambda}{\sqrt{2} \sigma}\right)$$
 * If this were used in a computer program, the exponential term would effectively be $$\infty \cdot 0$$. Rearranging the terms a bit, you get two expressions.   If the exponential is less than one, it can be expressed as $$\operatorname{erfc}$$ and if the exponential term is greater than one it could be rewritten in terms of erfcx which is consistent with the implementation discussion for the pdf in the body of the text.
 * I am not sure if just rearranging the equations constitutes "original" research. Thrameos (talk) 19:34, 15 June 2022 (UTC)
 * The computer implementable equations are
 * $$ g = \frac{\lambda}{2} \left(-2(x-\mu)+\lambda\sigma^2\right) $$
 * $$ h = \frac{-(x-\mu)+\lambda\sigma^2}{\sqrt{2}\sigma} $$
 * $$ cdf = \begin{cases}\Phi(x,\mu,\sigma) - \frac{1}{2} e^g \operatorname{erfc}(h) & h \le 0 \\ \Phi(x,\mu,\sigma) - \frac{1}{2} e^{-h^2+g} \operatorname{erfcx}(h) & \text{otherwise} \end{cases}$$ Thrameos (talk) 20:11, 15 June 2022 (UTC)

Error in Kurtosis excess
Using Mathematica 9.0, I find the Kurtosis excess to be $$\frac{\frac{9}{\lambda ^4}+\frac{6 \sigma ^2}{\lambda ^2}+3 \sigma ^4}{\left(\frac{1}{\lambda ^2}+\sigma ^2\right)^2}-3$$ (i.e., the factored constant at the front of the numerator is "2" in the article, but should be "3"). This alternative expression simplifies to $$\frac{6}{\left(\lambda ^2 \sigma ^2+1\right)^2}$$. Sadly, this is "original research". -- 139.78.143.6 (talk) 22:38, 22 July 2014 (UTC)

In several numerical examples with the fourth moment computed by numerical integration in MATLAB, I also found that the factored constant at the front of the numerator should be "3" rather than "2". — Preceding unsigned comment added by 122.61.123.248 (talk) 20:20, 1 January 2015 (UTC)

Bug in support
In the right hand box, instead of μ ∈ R, ... it should be x ∈ R — Preceding unsigned comment added by Fuzzyrandom (talk • contribs) 11:18, 4 February 2016 (UTC)

assumption about lambda
In the table it is clearly stated that it is assumed that: lambda > 0

If lambda > 0 then tau=1/lambda > 0 and sign(tau) is always 1. Therefore the term sign(tau) can be removed in the calculation of the mode.

Below in the text it is written "This function cannot be calculated for some values of parameters (for example, τ=0) because of arithmetic overflow. Alternative, but equivalent form of writing the function was proposed by Delley". Well, the thing is that tau=0 is not valid according to the assumption above and rises confusion again.

From my point of view the assumption that lambda > 0 makes sense. Given this assumption the term sign(tau) in the formula for the mode should be removed as well as the text below mentioning tau=0. However I am not sure whether there are useful cases to remove the positivity constraint on lambda and allow lambda to be any real value. Could someone who knows the details please resolve this issue? --192.124.28.164 (talk) 10:56, 3 August 2018 (UTC)

In the discussion of calculating the mode, the statement "The apex is always located on the original (unmodified) Gaussian." is made. On the face of it, this is patently wrong (see the formula for the mode where the whole point is that there is an offset from μ), though perhaps the author was thinking in terms of the Gaussian being convolved over the exponential, which is only one specific way of viewing the calculation. I suggest that this statement at best does not enhance communication, and at worst is misleading, and either way should be removed.

τ estimation from moments is wrong
The formula for the estimation of τ and correspondigly K from moments seems to be wrong. It is valid only for very small K values. I numerically tested that. The actual solution is pretty complex but it exists (I found it using Wolfram Alpha). 84.115.223.159 (talk) 19:18, 20 April 2024 (UTC)