Family of continuous probability distributions
In probability theory, the inverse Gaussian distribution (also known as the Wald distribution) is a two-parameter family of continuous probability distributions with support on (0,∞).
Its probability density function is given by

for x > 0, where
is the mean and
is the shape parameter.[1]
The inverse Gaussian distribution has several properties analogous to a Gaussian distribution. The name can be misleading: it is an "inverse" only in that, while the Gaussian describes a Brownian motion's level at a fixed time, the inverse Gaussian describes the distribution of the time a Brownian motion with positive drift takes to reach a fixed positive level.
Its cumulant generating function (logarithm of the characteristic function) is the inverse of the cumulant generating function of a Gaussian random variable.
To indicate that a random variable X is inverse Gaussian-distributed with mean μ and shape parameter λ we write
.
Properties
Single parameter form
The probability density function (pdf) of the inverse Gaussian distribution has a single parameter form given by

In this form, the mean and variance of the distribution are equal,
Also, the cumulative distribution function (cdf) of the single parameter inverse Gaussian distribution is related to the standard normal distribution by

where
,
and the
is the cdf of standard normal distribution. The variables
and
are related to each other by the identity
In the single parameter form, the MGF simplifies to
![{\displaystyle M(t)=\exp[\mu (1-{\sqrt {1-2t)))].}](https://wikimedia.org/api/rest_v1/media/math/render/svg/ae6080ed21f32de632d3783d40b151ec12192381)
An inverse Gaussian distribution in double parameter form
can be transformed into a single parameter form
by appropriate scaling
where
The standard form of inverse Gaussian distribution is

Summation
If Xi has an
distribution for i = 1, 2, ..., n
and all Xi are independent, then

Note that

is constant for all i. This is a necessary condition for the summation. Otherwise S would not be Inverse Gaussian distributed.
Scaling
For any t > 0 it holds that

Exponential family
The inverse Gaussian distribution is a two-parameter exponential family with natural parameters −λ/(2μ2) and −λ/2, and natural statistics X and 1/X.
Relationship with Brownian motion
Let the stochastic process Xt be given by


where Wt is a standard Brownian motion. That is, Xt is a Brownian motion with drift
.
Then the first passage time for a fixed level
by Xt is distributed according to an inverse-Gaussian:

i.e

(cf. Schrödinger[2] equation 19, Smoluchowski[3], equation 8, and Folks[4], equation 1).
Derivation of the first passage time distribution
|
Suppose that we have a Brownian motion with drift defined by:

And suppose that we wish to find the probability density function for the time when the process first hits some barrier - known as the first passage time. The Fokker-Planck equation describing the evolution of the probability distribution is:

where is the Dirac delta function. This is a boundary value problem (BVP) with a single absorbing boundary condition , which may be solved using the method of images. Based on the initial condition, the fundamental solution to the Fokker-Planck equation, denoted by , is:
![{\displaystyle \varphi (t,x)={1 \over {\sqrt {2\pi \sigma ^{2}t))}\exp \left[-{(x-x_{0}-\nu t)^{2} \over {2\sigma ^{2}t))\right]}](https://wikimedia.org/api/rest_v1/media/math/render/svg/4cbc3d37009e3df657cf10626e3ac610e886b612)
Define a point , such that . This will allow the original and mirror solutions to cancel out exactly at the barrier at each instant in time. This implies that the initial condition should be augmented to become:

where is a constant. Due to the linearity of the BVP, the solution to the Fokker-Planck equation with this initial condition is:
![{\displaystyle p(t,x)={1 \over {\sqrt {2\pi \sigma ^{2}t))}\left\{\exp \left[-{(x-x_{0}-\nu t)^{2} \over {2\sigma ^{2}t))\right]-A\exp \left[-{(x-m-\nu t)^{2} \over {2\sigma ^{2}t))\right]\right\))](https://wikimedia.org/api/rest_v1/media/math/render/svg/3c6de71603d6b58902d5041f7f411cbe9e89bd1b)
Now we must determine the value of . The fully absorbing boundary condition implies that:

At , we have that . Substituting this back into the above equation, we find that:

Therefore, the full solution to the BVP is:
![{\displaystyle p(t,x)={1 \over {\sqrt {2\pi \sigma ^{2}t))}\left\{\exp \left[-{(x-x_{0}-\nu t)^{2} \over {2\sigma ^{2}t))\right]-e^{2\nu (\alpha -x_{0})/\sigma ^{2))\exp \left[-{(x+x_{0}-2\alpha -\nu t)^{2} \over {2\sigma ^{2}t))\right]\right\))](https://wikimedia.org/api/rest_v1/media/math/render/svg/3908c9c70eea2d98524cf0852c7599dc4ab823bd)
Now that we have the full probability density function, we are ready to find the first passage time distribution . The simplest route is to first compute the survival function , which is defined as:

where is the cumulative distribution function of the standard normal distribution. The survival function gives us the probability that the Brownian motion process has not crossed the barrier at some time . Finally, the first passage time distribution is obtained from the identity:

Assuming that , the first passage time follows an inverse Gaussian distribution:
![{\displaystyle f(t)={\alpha \over {\sqrt {2\pi \sigma ^{2}t^{3))))e^{-(\alpha -\nu t)^{2}/2\sigma ^{2}t}\sim {\text{IG))\left[{\alpha \over {\nu )),\left({\alpha \over {\sigma ))\right)^{2}\right]}](https://wikimedia.org/api/rest_v1/media/math/render/svg/e4a067af1e7148d854eabb348d311e4baf500edb)
|
When drift is zero
A common special case of the above arises when the Brownian motion has no drift. In that case, parameter μ tends to infinity, and the first passage time for fixed level α has probability density function

(see also Bachelier[5]: 74 [6]: 39 ). This is a Lévy distribution with parameters
and
.
Maximum likelihood
The model where

with all wi known, (μ, λ) unknown and all Xi independent has the following likelihood function

Solving the likelihood equation yields the following maximum likelihood estimates

and
are independent and

Sampling from an inverse-Gaussian distribution
The following algorithm may be used.[7]
Generate a random variate from a normal distribution with mean 0 and standard deviation equal 1

Square the value

and use the relation

Generate another random variate, this time sampled from a uniform distribution between 0 and 1

If
then return
else return
Sample code in Java:
public double inverseGaussian(double mu, double lambda) {
Random rand = new Random();
double v = rand.nextGaussian(); // Sample from a normal distribution with a mean of 0 and 1 standard deviation
double y = v * v;
double x = mu + (mu * mu * y) / (2 * lambda) - (mu / (2 * lambda)) * Math.sqrt(4 * mu * lambda * y + mu * mu * y * y);
double test = rand.nextDouble(); // Sample from a uniform distribution between 0 and 1
if (test <= (mu) / (mu + x))
return x;
else
return (mu * mu) / x;
}
Wald distribution using Python with aid of matplotlib and NumPy
And to plot Wald distribution in Python using matplotlib and NumPy:
import matplotlib.pyplot as plt
import numpy as np
h = plt.hist(np.random.wald(3, 2, 100000), bins=200, density=True)
plt.show()
History
This distribution appears to have been first derived in 1900 by Louis Bachelier[5][6] as the time a stock reaches a certain price for the first time. In 1915 it was used independently by Erwin Schrödinger[2] and Marian v. Smoluchowski[3] as the time to first passage of a Brownian motion. In the field of reproduction modeling it is known as the Hadwiger function, after Hugo Hadwiger who described it in 1940.[11] Abraham Wald re-derived this distribution in 1944[12] as the limiting form of a sample in a sequential probability ratio test. The name inverse Gaussian was proposed by Maurice Tweedie in 1945.[13] Tweedie investigated this distribution in 1956[14] and 1957[15][16] and established some of its statistical properties. The distribution was extensively reviewed by Folks and Chhikara in 1978.[4]
Numeric computation and software
Despite the simple formula for the probability density function, numerical probability calculations for the inverse Gaussian distribution nevertheless require special care to achieve full machine accuracy in floating point arithmetic for all parameter values.[17] Functions for the inverse Gaussian distribution are provided for the R programming language by several packages including rmutil,[18][19] SuppDists,[20] STAR,[21] invGauss,[22] LaplacesDemon,[23] and statmod.[24]