Index: The Book of Statistical ProofsProbability Distributions ▷ Univariate continuous distributions ▷ ex-Gaussian distribution ▷ Probability density function

Theorem: Let $X$ be a random variable following an ex-Gaussian distribution:

$\label{eq:exg} X \sim \text{ex-Gaussian}(\mu, \sigma, \lambda) \; .$

Then the probability density function of $X$ is

$\label{eq:exg-pdf} f_X(t) = \frac{\lambda}{\sqrt{2\pi}} \exp\left[\frac{\lambda^2\sigma^2}{2} - \lambda(t-\mu)\right] \cdot \int_{-\infty}^{\frac{t-\mu}{\sigma}-\lambda\sigma} \exp\left[-\frac{1}{2}y^2\right] dy \; .$

Proof: Suppose $X$ follows an ex-Gaussian distribution. Then $X=A+B$, where $A$ and $B$ are independent, $A$ is normally distributed with mean $\mu$ and variance $\sigma^2$, and $B$ is exponentially distributed with rate $\lambda$. Then, the probability density function for $A$ is given by

$\label{eq:norm-pdf} f_A(t) = \frac{1}{\sigma\sqrt{2\pi}}\exp\left[-\frac{1}{2}\left(\frac{t-\mu}{\sigma}\right)^2\right] \; ,$

and the probability density function for $B$ is given by

$\label{eq:exp-pdf} f_B(t) = \left\{ \begin{array}{rl} \lambda\exp[-\lambda t] \;, & \text{if} \; t\geq 0\\ 0 \;, & \text{if} \; t <0 \; . \end{array} \right.$

Thus, the probability density function for the sum $X=A+B$ is given by taking the convolution of $f_A$ and $f_B$:

$\label{eq:convolution} \begin{split} f_X(t) &= \int_{-\infty}^{\infty} f_A(x)f_B(t-x)dx\\ &= \int_{-\infty}^{t} f_A(x)f_B(t-x)dx + \int_{t}^{\infty} f_A(x)f_B(t-x)dx \\ &= \int_{-\infty}^{t} f_A(x)f_B(t-x)dx \; , \end{split}$

which follows from the fact that $f_B(t-x) = 0$ for $x>t$. From here, we substitute the expressions \eqref{eq:norm-pdf} and \eqref{eq:exp-pdf} for the probability density functions $f_A$ and $f_B$ in \eqref{eq:convolution}:

$\label{eq:exg-pdf-s1} \begin{split} f_X(t) &= \int_{-\infty}^t \frac{1}{\sigma\sqrt{2\pi}}\exp\left[-\frac{1}{2}\left(\frac{x-\mu}{\sigma}\right)^2\right]\cdot \lambda\exp[-\lambda(t-x)]dx\\ &= \frac{\lambda}{\sigma\sqrt{2\pi}}\int_{-\infty}^t \exp\left[-\frac{1}{2}\left(\frac{x-\mu}{\sigma}\right)^2\right]\cdot \exp[-\lambda t+\lambda x]dx\\ &= \frac{\lambda}{\sigma\sqrt{2\pi}}\int_{-\infty}^t \exp\left[-\frac{1}{2}\left(\frac{x-\mu}{\sigma}\right)^2\right]\cdot \exp[-\lambda t]\cdot \exp[\lambda x]dx\\ &= \frac{\lambda\exp[-\lambda t]}{\sigma\sqrt{2\pi}}\int_{-\infty}^t \exp\left[-\frac{1}{2}\left(\frac{x-\mu}{\sigma}\right)^2+\lambda x\right]dx \; . \end{split}$

We can further simplify the integrand with a substitution; to this end, let

$\label{eq:substitution} y = g(x) = \frac{x-\mu}{\sigma} - \lambda\sigma$

This gives the following three identities:

$\label{eq:identity1} \frac{dy}{dx} = \frac{1}{\sigma} \; , \quad \text{or equivalently,} \quad dx = \sigma dy \; ,$ $\label{eq:identity2} \frac{x-\mu}{\sigma} = y+\lambda\sigma \; , \quad \text{and}$ $\label{eq:identity3} x = y\sigma + \lambda\sigma^2 + \mu \; .$

Substituting these identities into \eqref{eq:exg-pdf-s1} gives

$\label{eq:exg-pdf-s2} \begin{split} f_X(t) &= \frac{\lambda\exp[-\lambda t]}{\sigma\sqrt{2\pi}}\int_{-\infty}^{g(t)} \exp\left[-\frac{1}{2}(y+\lambda\sigma)^2+\lambda(y\sigma + \lambda\sigma^2+\mu)\right]\sigma dy\\ &= \frac{\lambda\sigma\exp[-\lambda t]}{\sigma\sqrt{2\pi}}\int_{-\infty}^{\frac{x-\mu}{\sigma}+\lambda\sigma} \exp\left[-\frac{1}{2}(y^2+2y\lambda\sigma + \lambda^2\sigma^2)+\lambda y\sigma + \lambda^2\sigma^2 + \lambda\mu\right] dy\\ &= \frac{\lambda\exp[-\lambda t]}{\sqrt{2\pi}}\int_{-\infty}^{\frac{x-\mu}{\sigma}+\lambda\sigma} \exp\left[-\frac{1}{2}y^2-y\lambda\sigma - \frac{\lambda^2\sigma^2}{2}+\lambda y\sigma + \lambda^2\sigma^2 + \lambda\mu\right] dy\\ &= \frac{\lambda\exp[-\lambda t]}{\sqrt{2\pi}}\int_{-\infty}^{\frac{x-\mu}{\sigma}+\lambda\sigma} \exp\left[-\frac{1}{2}y^2\right] \cdot \exp\left[\frac{\lambda^2\sigma^2}{2} + \lambda\mu\right] dy\\ &= \frac{\lambda\exp[-\lambda t]}{\sqrt{2\pi}}\cdot \exp\left[\frac{\lambda^2\sigma^2}{2} + \lambda\mu\right] \int_{-\infty}^{\frac{x-\mu}{\sigma}+\lambda\sigma} \exp\left[-\frac{1}{2}y^2\right] \cdot dy\\ &= \frac{\lambda}{\sqrt{2\pi}}\cdot \exp\left[-\lambda t + \frac{\lambda^2\sigma^2}{2} + \lambda\mu\right] \int_{-\infty}^{\frac{x-\mu}{\sigma}+\lambda\sigma} \exp\left[-\frac{1}{2}y^2\right] \cdot dy\\ &= \frac{\lambda}{\sqrt{2\pi}}\cdot \exp\left[\frac{\lambda^2\sigma^2}{2} - \lambda(t-\mu)\right] \int_{-\infty}^{\frac{x-\mu}{\sigma}+\lambda\sigma} \exp\left[-\frac{1}{2}y^2\right] \cdot dy \; . \end{split}$

This finishes the proof of \eqref{eq:exg-pdf}.

Sources:

Metadata: ID: P402 | shortcut: exg-pdf | author: tomfaulkenberry | date: 2023-04-18, 12:00.