Inverse Gaussian distribution

From The Right Wiki
(Redirected from Wald distribution)
Jump to navigationJump to search
Inverse Gaussian
Probability density function
File:Inverse Gaussian Probability Densitiy Function.svg
Cumulative distribution function
File:Inverse Gaussian Cumulative Distribution Function.svg
Notation IG(μ,λ)
Parameters μ>0
λ>0
Support x(0,)
PDF λ2πx3exp[λ(xμ)22μ2x]
CDF

Φ(λx(xμ1)) +exp(2λμ)Φ(λx(xμ+1))

where Φ is the standard normal (standard Gaussian) distribution c.d.f.
Mean

E[X]=μ

E[1X]=1μ+1λ
Mode μ[(1+9μ24λ2)123μ2λ]
Variance

Var[X]=μ3λ

Var[1X]=1μλ+2λ2
Skewness 3(μλ)1/2
Excess kurtosis 15μλ
MGF exp[λμ(112μ2tλ)]
CF exp[λμ(112μ2itλ)]

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;μ,λ)=λ2πx3exp(λ(xμ)22μ2x)

for x > 0, where μ>0 is the mean and λ>0 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)[contradictory] 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 XIG(μ,λ).

Properties

Single parameter form

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

f(x;μ,μ2)=μ2πx3exp((xμ)22x).

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

Pr(X<x)=Φ(z1)+e2μΦ(z2),

where z1=μx1/2x1/2, z2=μx1/2+x1/2, and the Φ is the cdf of standard normal distribution. The variables z1 and z2 are related to each other by the identity z22=z12+4μ. In the single parameter form, the MGF simplifies to

M(t)=exp[μ(112t)].

An inverse Gaussian distribution in double parameter form f(x;μ,λ) can be transformed into a single parameter form f(y;μ0,μ02) by appropriate scaling y=μ2xλ, where μ0=μ3/λ. The standard form of inverse Gaussian distribution is

f(x;1,1)=12πx3exp((x1)22x).

Summation

If Xi has an IG(μ0wi,λ0wi2) distribution for i = 1, 2, ..., n and all Xi are independent, then

S=i=1nXiIG(μ0wi,λ0(wi)2).

Note that

Var(Xi)E(Xi)=μ02wi2λ0wi2=μ02λ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

XIG(μ,λ)tXIG(tμ,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[2] where the base distribution has density

h(x)=λ2πx3exp(λ2x)𝟙[0,)(x).

Indeed, with θ0,

p(x;θ)=exp(θx)h(x)exp(θy)h(y)dy

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

p(x;θ)=λ2πx3exp(λ2x+θx2λθ)𝟙[0,)(x).

Substituting θ=λ/(2μ2) makes the above expression equal to f(x;μ,λ).

Relationship with Brownian motion

File:Inverse gaussian as stopping time of random walk.png
Example of stopped random walks with α=1,ν=0.1,σ=0.2. The upper figure shows the histogram of waiting times, along with the prediction according to inverse gaussian distribution. The lower figure shows the trajectories.

Let the stochastic process Xt be given by

X0=0
Xt=νt+σWt

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

Tα=inf{t>0Xt=α}IG(αν,(ασ)2)=ασ2πx3exp((ανx)22σ2x)

i.e

P(Tα(T,T+dT))=ασ2πT3exp((ανT)22σ2T)dT

(cf. Schrödinger[3] equation 19, Smoluchowski[4], equation 8, and Folks[5], equation 1).

Derivation of the first passage time distribution

Suppose that we have a Brownian motion Xt with drift ν defined by:

Xt=νt+σWt,X(0)=x0

And suppose that we wish to find the probability density function for the time when the process first hits some barrier α>x0 - known as the first passage time. The Fokker-Planck equation describing the evolution of the probability distribution p(t,x) is:

pt+νpx=12σ22px2,{p(0,x)=δ(xx0)p(t,α)=0

where δ() is the Dirac delta function. This is a boundary value problem (BVP) with a single absorbing boundary condition p(t,α)=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 φ(t,x), is:

φ(t,x)=12πσ2texp[(xx0νt)22σ2t]

Define a point m, such that m>α. 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)=δ(xx0)Aδ(xm)

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)=12πσ2t{exp[(xx0νt)22σ2t]Aexp[(xmνt)22σ2t]}

Now we must determine the value of A. The fully absorbing boundary condition implies that:

(αx0νt)2=2σ2tlogA+(αmνt)2

At p(0,α), we have that (αx0)2=(αm)2m=2αx0. Substituting this back into the above equation, we find that:

A=e2ν(αx0)/σ2

Therefore, the full solution to the BVP is:

p(t,x)=12πσ2t{exp[(xx0νt)22σ2t]e2ν(αx0)/σ2exp[(x+x02ανt)22σ2t]}

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:

S(t)=αp(t,x)dx=Φ(αx0νtσt)e2ν(αx0)/σ2Φ(α+x0νtσt)

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 t. Finally, the first passage time distribution f(t) is obtained from the identity:

f(t)=dSdt=(αx0)2πσ2t3e(αx0νt)2/2σ2t

Assuming that x0=0, the first passage time follows an inverse Gaussian distribution:

f(t)=α2πσ2t3e(ανt)2/2σ2tIG[αν,(ασ)2]

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(x;0,(ασ)2)=ασ2πx3exp(α22σ2x)

(see also Bachelier[6]: 74 [7]: 39 ). This is a Lévy distribution with parameters c=(ασ)2 and μ=0.

Maximum likelihood

The model where

XiIG(μ,λwi),i=1,2,,n

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

L(μ,λ)=(λ2π)n2(i=1nwiXi3)12exp(λμi=1nwiλ2μ2i=1nwiXiλ2i=1nwi1Xi).

Solving the likelihood equation yields the following maximum likelihood estimates

μ^=i=1nwiXii=1nwi,1λ^=1ni=1nwi(1Xi1μ^).

μ^ and λ^ are independent and

μ^IG(μ,λi=1nwi),nλ^1λχn12.

Sampling from an inverse-Gaussian distribution

The following algorithm may be used.[8]

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

νN(0,1).

Square the value

y=ν2

and use the relation

x=μ+μ2y2λμ2λ4μλy+μ2y2.

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

zU(0,1).

If zμμ+x then return x else return μ2x.

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;
}
File:Wald Distribution matplotlib.jpg
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()

Related distributions

  • If XIG(μ,λ), then kXIG(kμ,kλ) for any number k>0.[1]
  • If XiIG(μ,λ) then i=1nXiIG(nμ,n2λ)
  • If XiIG(μ,λ) for i=1,,n then X¯IG(μ,nλ)
  • If XiIG(μi,2μi2) then i=1nXiIG(i=1nμi,2(i=1nμi)2)
  • If XIG(μ,λ), then λ(Xμ)2/μ2Xχ2(1).[9]

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,[10] with visual search as one example.[11]

History

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

Rated Inverse Gaussian Distribution

Assuming that the time intervals between occurrences of a random phenomenon follow an inverse Gaussian distribution, the probability distribution for the number of occurrences of this event within a specified time window is referred to as rated inverse Gaussian.[18] While, first and second moment of this distribution are calculated, the derivation of the moment generating function remains an open problem.

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.[19] Functions for the inverse Gaussian distribution are provided for the R programming language by several packages including rmutil,[20][21] SuppDists,[22] STAR,[23] invGauss,[24] LaplacesDemon,[25] and statmod.[26]

See also

References

  1. 1.0 1.1 Chhikara, Raj S.; Folks, J. Leroy (1989), The Inverse Gaussian Distribution: Theory, Methodology and Applications, New York, NY, USA: Marcel Dekker, Inc, ISBN 0-8247-7997-5
  2. Seshadri, V. (1999), The Inverse Gaussian Distribution, Springer-Verlag, ISBN 978-0-387-98618-0
  3. 3.0 3.1 Schrödinger, Erwin (1915), "Zur Theorie der Fall- und Steigversuche an Teilchen mit Brownscher Bewegung" [On the Theory of Fall- and Rise Experiments on Particles with Brownian Motion], Physikalische Zeitschrift (in Deutsch), 16 (16): 289–295
  4. 4.0 4.1 Smoluchowski, Marian (1915), "Notiz über die Berechnung der Brownschen Molekularbewegung bei der Ehrenhaft-Millikanschen Versuchsanordnung" [Note on the Calculation of Brownian Molecular Motion in the Ehrenhaft-Millikan Experimental Set-up], Physikalische Zeitschrift (in Deutsch), 16 (17/18): 318–321
  5. 5.0 5.1 Folks, J. Leroy; Chhikara, Raj S. (1978), "The Inverse Gaussian Distribution and Its Statistical Application—A Review", Journal of the Royal Statistical Society, Series B (Methodological), 40 (3): 263–275, doi:10.1111/j.2517-6161.1978.tb01039.x, JSTOR 2984691, S2CID 125337421
  6. 6.0 6.1 Bachelier, Louis (1900), "Théorie de la spéculation" [The Theory of Speculation] (PDF), Ann. Sci. Éc. Norm. Supér. (in français), Serie 3, 17: 21–89, doi:10.24033/asens.476
  7. 7.0 7.1 Bachelier, Louis (1900), "The Theory of Speculation", Ann. Sci. Éc. Norm. Supér., Serie 3, 17: 21–89 (Engl. translation by David R. May, 2011), doi:10.24033/asens.476
  8. Michael, John R.; Schucany, William R.; Haas, Roy W. (1976), "Generating Random Variates Using Transformations with Multiple Roots", The American Statistician, 30 (2): 88–90, doi:10.1080/00031305.1976.10479147, JSTOR 2683801
  9. Shuster, J. (1968). "On the inverse Gaussian distribution function". Journal of the American Statistical Association. 63 (4): 1514–1516. doi:10.1080/01621459.1968.10480942.
  10. Schwarz, Wolfgang (2001), "The ex-Wald distribution as a descriptive model of response times", Behavior Research Methods, Instruments, and Computers, 33 (4): 457–469, doi:10.3758/bf03195403, PMID 11816448
  11. Palmer, E. M.; Horowitz, T. S.; Torralba, A.; Wolfe, J. M. (2011). "What are the shapes of response time distributions in visual search?". Journal of Experimental Psychology: Human Perception and Performance. 37 (1): 58–71. doi:10.1037/a0020747. PMC 3062635. PMID 21090905.
  12. Hadwiger, H. (1940). "Eine analytische Reproduktionsfunktion für biologische Gesamtheiten". Skandinavisk Aktuarietidskrijt. 7 (3–4): 101–113. doi:10.1080/03461238.1940.10404802.
  13. Wald, Abraham (1944), "On Cumulative Sums of Random Variables", Annals of Mathematical Statistics, 15 (3): 283–296, doi:10.1214/aoms/1177731235, JSTOR 2236250
  14. Tweedie, M. C. K. (1945). "Inverse Statistical Variates". Nature. 155 (3937): 453. Bibcode:1945Natur.155..453T. doi:10.1038/155453a0. S2CID 4113244.
  15. Tweedie, M. C. K. (1956). "Some Statistical Properties of Inverse Gaussian Distributions". Virginia Journal of Science. New Series. 7 (3): 160–165.
  16. Tweedie, M. C. K. (1957). "Statistical Properties of Inverse Gaussian Distributions I". Annals of Mathematical Statistics. 28 (2): 362–377. doi:10.1214/aoms/1177706964. JSTOR 2237158.
  17. Tweedie, M. C. K. (1957). "Statistical Properties of Inverse Gaussian Distributions II". Annals of Mathematical Statistics. 28 (3): 696–705. doi:10.1214/aoms/1177706881. JSTOR 2237229.
  18. Capacity per unit cost-achieving input distribution of rated-inverse gaussian biological neuron M Nasiraee, HM Kordy, J Kazemitabar IEEE Transactions on Communications 70 (6), 3788-3803
  19. Giner, Göknur; Smyth, Gordon (August 2016). "statmod: Probability Calculations for the Inverse Gaussian Distribution". The R Journal. 8 (1): 339–351. arXiv:1603.06687. doi:10.32614/RJ-2016-024.
  20. Lindsey, James (2013-09-09). "rmutil: Utilities for Nonlinear Regression and Repeated Measurements Models".
  21. Swihart, Bruce; Lindsey, James (2019-03-04). "rmutil: Utilities for Nonlinear Regression and Repeated Measurements Models".
  22. Wheeler, Robert (2016-09-23). "SuppDists: Supplementary Distributions".
  23. Pouzat, Christophe (2015-02-19). "STAR: Spike Train Analysis with R".
  24. Gjessing, Hakon K. (2014-03-29). "Threshold regression that fits the (randomized drift) inverse Gaussian distribution to survival data".
  25. Hall, Byron; Hall, Martina; Statisticat, LLC; Brown, Eric; Hermanson, Richard; Charpentier, Emmanuel; Heck, Daniel; Laurent, Stephane; Gronau, Quentin F.; Singmann, Henrik (2014-03-29). "LaplacesDemon: Complete Environment for Bayesian Inference".
  26. Giner, Göknur; Smyth, Gordon (2017-06-18). "statmod: Statistical Modeling".

Further reading

External links