Inverse Gaussian distribution explained

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

f(x;\mu,λ)=\sqrt

λ\expl(-
2\pix3
λ(x-\mu)2
2\mu2x

r)

for x > 0, where

\mu>0

is the mean and

λ>0

is the shape parameter.

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

X\sim\operatorname{IG}(\mu,λ)

.

Properties

Single parameter form

The probability density function (pdf) of the inverse Gaussian distribution has a single parameter form given by

f(x;\mu,\mu2) =

\mu
\sqrt{2\pix3
} \exp\biggl(-\frac\biggr).

In this form, the mean and variance of the distribution are equal,

E[X]=Var(X).

Also, the cumulative distribution function (cdf) of the single parameter inverse Gaussian distribution is related to the standard normal distribution by

\begin{align} \Pr(X<x)&=\Phi(-z1)+e2\Phi(-z2), \end{align}

where

z1=

\mu
x1/2

-x1/2

,

z2=

\mu
x1/2

+x1/2,

and the

\Phi

is the cdf of standard normal distribution. The variables

z1

and

z2

are related to each other by the identity
2
z
2

=

2
z
1

+4\mu.

In the single parameter form, the MGF simplifies to

M(t)=\exp[\mu(1-\sqrt{1-2t})].

An inverse Gaussian distribution in double parameter form

f(x;\mu,λ)

can be transformed into a single parameter form

f(y;\mu0,\mu

2)
0
by appropriate scaling

y=

\mu2x
λ

,

where

\mu0=\mu3/λ.

The standard form of inverse Gaussian distribution is

f(x;1,1) =

1
\sqrt{2\pix3
} \exp\biggl(-\frac\biggr).

Summation

If Xi has an

\operatorname{IG}(\mu0wi,λ0

2
w
i

)

distribution for i = 1, 2, ..., nand all Xi are independent, then
n
S=\sum
i=1

Xi \sim \operatorname{IG}\left(\mu0\sumwi,λ0\left(\sumwi\right)2\right).

Note that

\operatorname{Var
(X

i)}{\operatorname{E}(Xi)}=

2
\mu
2
w
i
0
=
λ
2
w
i
0
2
\mu
0
λ0

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

X\sim\operatorname{IG}(\mu,λ)tX\sim\operatorname{IG}(t\mu,tλ).

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.

For

λ>0

fixed, it is also a single-parameter natural exponential family distribution where the base distribution has density

h(x)=\sqrt{

λ
2\pix3

}\exp\left(-

λ
2x

\right)1[0,infty)(x).

Indeed, with

\theta\le0

,

p(x;\theta)=

\exp(\thetax)h(x)
\int\exp(\thetay)h(y)dy

is a density over the reals. Evaluating the integral, we get

p(x;\theta)=\sqrt{

λ
2\pix3

}\exp\left(-

λ
2x

+\thetax-\sqrt{-2λ\theta}\right)1[0,infty)(x).

Substituting

\theta=/(2\mu2)

makes the above expression equal to

f(x;\mu,λ)

.

Relationship with Brownian motion

Let the stochastic process Xt be given by

X0=0  

Xt=\nut+\sigmaWt        

where Wt is a standard Brownian motion. That is, Xt is a Brownian motion with drift

\nu>0

.

Then the first passage time for a fixed level

\alpha>0

by Xt is distributed according to an inverse-Gaussian:

T\alpha=inf\{t>0\midXt=\alpha\}\sim\operatorname{IG}\left(

\alpha\nu,
\left(\alpha
\sigma

\right)2\right) =

\alpha
\sigma\sqrt{2\pix3
} \exp\biggl(-\frac\biggr)i.e

P(T\alpha\in(T,T+dT))=

\alpha
\sigma\sqrt{2\piT3
} \exp\biggl(-\frac\biggr)dT

(cf. Schrödinger equation 19, Smoluchowski, equation 8, and Folks, equation 1).

Suppose that we have a Brownian motion

Xt

with drift

\nu

defined by:

Xt=\nut+\sigmaWt,X(0)=x0

And suppose that we wish to find the probability density function for the time when the process first hits some barrier

\alpha>x0

- known as the first passage time. The Fokker-Planck equation describing the evolution of the probability distribution

p(t,x)

is:

{\partialp\over{\partialt}}+\nu{\partialp\over{\partialx}}={1\over{2}}\sigma2{\partial2p\over{\partialx2

}}, \quad \begin p(0,x) &= \delta(x-x_) \\ p(t,\alpha) &= 0 \end

where

\delta()

is the Dirac delta function. This is a boundary value problem (BVP) with a single absorbing boundary condition

p(t,\alpha)=0

, which may be solved using the method of images. Based on the initial condition, the fundamental solution to the Fokker-Planck equation, denoted by

\varphi(t,x)

, is:

\varphi(t,x)={1\over{\sqrt{2\pi\sigma2t}}}\exp\left[-{(x-x0-\nut)2\over{2\sigma2t}}\right]

Define a point

m

, such that

m>\alpha

. 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:

p(0,x)=\delta(x-x0)-A\delta(x-m)

where

A

is a constant. Due to the linearity of the BVP, the solution to the Fokker-Planck equation with this initial condition is:

p(t,x)={1\over{\sqrt{2\pi\sigma2t}}}\left\{\exp\left[-{(x-x0-\nut)2\over{2\sigma2t}}\right]-A\exp\left[-{(x-m-\nut)2\over{2\sigma2t}}\right]\right\}

Now we must determine the value of

A

. The fully absorbing boundary condition implies that:

(\alpha-x0-\nut)2=-2\sigma2tlogA+(\alpha-m-\nut)2

At

p(0,\alpha)

, we have that

(\alpha-x0)2=(\alpha-m)2\impliesm=2\alpha-x0

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

A=

2\nu(\alpha-x0)/\sigma2
e

Therefore, the full solution to the BVP is:

p(t,x)={1\over{\sqrt{2\pi\sigma2t}}}\left\{\exp\left[-{(x-x0-\nut)2\over{2\sigma2t}}\right]-

2\nu(\alpha-x0)/\sigma2
e

\exp\left[-{(x+x0-2\alpha-\nut)2\over{2\sigma2t}}\right]\right\}

Now that we have the full probability density function, we are ready to find the first passage time distribution

f(t)

. The simplest route is to first compute the survival function

S(t)

, which is defined as:

\begin{aligned}S(t)&=

\alpha
\int
-infty

p(t,x)dx\&=\Phi\left({\alpha-x0-\nut\over{\sigma\sqrt{t}}}\right)-

2\nu(\alpha-x0)/\sigma2
e

\Phi\left({-\alpha+x0-\nut\over{\sigma\sqrt{t}}}\right)\end{aligned}

where

\Phi()

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

\alpha

at some time

t

. Finally, the first passage time distribution

f(t)

is obtained from the identity:

\begin{aligned}f(t)&=-{dS\over{dt}}\&={(\alpha-x0)\over{\sqrt{2\pi\sigma2t3

}}} e^ \end

Assuming that

x0=0

, the first passage time follows an inverse Gaussian distribution:

f(t)={\alpha\over{\sqrt{2\pi\sigma2t3

}}} e^ \sim \text\left[{\alpha\over{\nu}},\left({\alpha\over{\sigma}} \right)^{2} \right]

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

f\left(x;0,\left(

\alpha
\sigma

\right)2\right) =

\alpha
\sigma\sqrt{2\pix3
} \exp\left(-\frac\right)

(see also Bachelier). This is a Lévy distribution with parameters

c=\left(\alpha
\sigma

\right)2

and

\mu=0

.

Maximum likelihood

The model where

Xi\sim\operatorname{IG}(\mu,λwi),i=1,2,\ldots,n

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

L(\mu,λ)= \left(

λ
2\pi
n
2 \left(
\right)
n
\prod
i=1
wi
3
X
i
1
2
\right)\exp\left(
λ
\mu
n
\sum
i=1

wi-

λ
2\mu2
n
\sum
i=1

wiXi-

λ
2
n
\sum
i=1

wi

1{X
i}

\right).

Solving the likelihood equation yields the following maximum likelihood estimates

\widehat{\mu}=

n
\sumwiXi
i=1
n
\sumwi
i=1

,

1
\widehat{λ
}= \frac \sum_^n w_i \left(\frac-\frac \right).

\widehat{\mu}

and

\widehat{λ}

are independent and

\widehat{\mu}\sim\operatorname{IG}\left(\mu,λ

n
\sum
i=1

wi\right),   

n
\widehat{λ
} \sim \frac \chi^2_.

Sampling from an inverse-Gaussian distribution

The following algorithm may be used.

Generate a random variate from a normal distribution with mean 0 and standard deviation equal 1

\displaystyle\nu\simN(0,1).

Square the value

\displaystyley=\nu2

and use the relation

x=\mu+

\mu2y

-

\mu

\sqrt{4\muλy+\mu2y2}.

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

\displaystylez\simU(0,1).

If

z\le

\mu
\mu+x

then return

\displaystyle x

else return
\mu2
x

.

Sample code in Java:

public double inverseGaussian(double mu, double lambda)

And to plot Wald distribution in Python using matplotlib and NumPy:import matplotlib.pyplot as pltimport numpy as np

h = plt.hist(np.random.wald(3, 2, 100000), bins=200, density=True)

plt.show

Related distributions

X\sim\operatorname{IG}(\mu,λ)

, then

kX\sim\operatorname{IG}(k\mu,kλ)

for any number

k>0.

Xi\sim\operatorname{IG}(\mu,λ)

then
n
\sum
i=1

Xi\sim\operatorname{IG}(n\mu,n2λ)

Xi\sim\operatorname{IG}(\mu,λ)

for

i=1,\ldots,n

then

\bar{X}\sim\operatorname{IG}(\mu,nλ)

Xi\sim\operatorname{IG}(\mui,2

2
\mu
i)
then
n
\sum
i=1

Xi\sim

n
\operatorname{IG}\left(\sum
i=1

\mui,2\left(

n
\sum
i=1

\mui\right)2\right)

X\sim\operatorname{IG}(\mu,λ)

, then

λ(X-\mu)2/\mu2X\sim\chi2(1)

.[1]

The convolution of an inverse Gaussian distribution (a Wald distribution) and an exponential (an ex-Wald distribution) is used as a model for response times in psychology, with visual search as one example.[2]

History

This distribution appears to have been first derived in 1900 by Louis Bachelier as the time a stock reaches a certain price for the first time. In 1915 it was used independently by Erwin Schrödinger and Marian v. Smoluchowski 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.[3] Abraham Wald re-derived this distribution in 1944 as the limiting form of a sample in a sequential probability ratio test. The name inverse Gaussian was proposed by Maurice Tweedie in 1945.[4] Tweedie investigated this distribution in 1956[5] and 1957[6] [7] and established some of its statistical properties. The distribution was extensively reviewed by Folks and Chhikara in 1978.

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.[8] Functions for the inverse Gaussian distribution are provided for the R programming language by several packages including rmutil,[9] [10] SuppDists,[11] STAR,[12] invGauss,[13] LaplacesDemon,[14] and statmod.[15]

See also

Further reading

External links

Notes and References

  1. On the inverse Gaussian distribution function . Journal of the American Statistical Association . 63 . 4 . 1514–1516 . Shuster . J. . 1968. 10.1080/01621459.1968.10480942 .
  2. 10.1037/a0020747. 21090905. 3062635. What are the shapes of response time distributions in visual search?. Journal of Experimental Psychology: Human Perception and Performance. 37. 1. 58–71. 2011. Palmer . E. M. . Horowitz . T. S. . Torralba . A. . Wolfe . J. M. .
  3. Hadwiger . H. . 1940 . Eine analytische Reproduktionsfunktion für biologische Gesamtheiten . . 7 . 3–4 . 101–113 . 10.1080/03461238.1940.10404802.
  4. Tweedie . M. C. K. . 1945 . Inverse Statistical Variates . . 155 . 3937 . 453 . 10.1038/155453a0 . 1945Natur.155..453T . 4113244 . free .
  5. Tweedie . M. C. K. . 1956 . Some Statistical Properties of Inverse Gaussian Distributions . Virginia Journal of Science . New Series . 7 . 3 . 160–165.
  6. Tweedie . M. C. K. . 1957 . Statistical Properties of Inverse Gaussian Distributions I . Annals of Mathematical Statistics . 28 . 2 . 362–377 . 10.1214/aoms/1177706964 . 2237158 . free .
  7. Tweedie . M. C. K. . 1957 . Statistical Properties of Inverse Gaussian Distributions II . Annals of Mathematical Statistics . 28 . 3 . 696–705 . 10.1214/aoms/1177706881 . 2237229 . free .
  8. Giner . Göknur . Smyth . Gordon . statmod: Probability Calculations for the Inverse Gaussian Distribution . The R Journal. 8. 1. 339–351. August 2016. 10.32614/RJ-2016-024 . 1603.06687 . free.
  9. Web site: Lindsey. James . rmutil: Utilities for Nonlinear Regression and Repeated Measurements Models . 2013-09-09 .
  10. Web site: Swihart . Bruce . Lindsey. James . rmutil: Utilities for Nonlinear Regression and Repeated Measurements Models . 2019-03-04 .
  11. Web site: Wheeler . Robert . SuppDists: Supplementary Distributions . 2016-09-23.
  12. Web site: Pouzat . Christophe . STAR: Spike Train Analysis with R . 2015-02-19.
  13. Web site: Gjessing . Hakon K. . Threshold regression that fits the (randomized drift) inverse Gaussian distribution to survival data . 2014-03-29.
  14. Web site: Hall . Byron . Hall . Martina . Statisticat . LLC . Brown . Eric . Hermanson . Richard . Charpentier . Emmanuel . Heck . Daniel . Laurent . Stephane . Gronau . Quentin F. . Singmann . Henrik . LaplacesDemon: Complete Environment for Bayesian Inference . 2014-03-29.
  15. Web site: Giner . Göknur . Smyth . Gordon . statmod: Statistical Modeling . 2017-06-18.