Inverse Gaussian distribution
{{Short description|Family of continuous probability distributions}}
{{For|the distribution of 1/x when x is Gaussian|Reciprocal normal distribution}}
{{Probability distribution
| name =Inverse Gaussian
| type =density
| pdf_image =325px
| pdf_caption=
| cdf_image =325px
| cdf_caption=
| notation =
| parameters =
| support =
| pdf =
| cdf =
where is the standard normal (standard Gaussian) distribution c.d.f.
| quantile =
| mean =
| median =
| mode =
| variance =
| skewness =
| kurtosis =
| entropy =
| mgf =
| char =
| pgf =
| fisher =
| KLDiv =
| JSDiv =
}}
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.{{r|Chhikara1989}}
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 inline |article= Cumulant |section= Definition |reason= Cumulant article defines the cumulant generating function as the natural logarithm of the moment-generating function, not the characteristic function. |date= February 2024}} 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
:
= \frac{\mu}{\sqrt{2 \pi x^3}} \exp\biggl(-\frac{(x-\mu)^2}{2x}\biggr).
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
:
\begin{align}
\Pr(X < x) &= \Phi(-z_1) + e^{2 \mu} \Phi(-z_2),
\end{align}
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
:
An inverse Gaussian distribution in double parameter form can be transformed into a single parameter form by appropriate scaling where
The above paragraph can be re-written as: if , then {{r|Folks1978}}. This approach is better in the sense that it clearly shows dimensionless nature of the single parameter form (note that ). This property follows from a more general fact: if and , then {{r|Tweedie1957a}}.
The standard form of inverse Gaussian distribution is
:
= \frac{1}{\sqrt{2 \pi x^3}} \exp\biggl(-\frac{(x-1)^2}{2x}\biggr).
=Summation=
If Xi has an distribution for i = 1, 2, ..., n
and all Xi are independent, then
:
S=\sum_{i=1}^n X_i
\sim
\operatorname{IG}\left( \mu_0 \sum w_i, \lambda_0 \left(\sum w_i \right)^2 \right).
Note that
:
\frac{\operatorname{Var}(X_i)}{\operatorname{E}(X_i)}= \frac{\mu_0^2 w_i^2 }{\lambda_0 w_i^2} =\frac{\mu_0^2}{\lambda_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,\lambda) \,\,\,\,\,\, \Rightarrow \,\,\,\,\,\, tX \sim \operatorname{IG}(t\mu,t\lambda).
=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 fixed, it is also a single-parameter natural exponential family distribution{{r|Seshadri1999}} where the base distribution has density
:
h(x) = \sqrt{ \frac{\lambda}{2\pi x^3} } \exp\left( - \frac{\lambda}{2x} \right) \mathbb{1}_{[0,\infty)}(x)\,.
Indeed, with ,
:
p(x;\theta) = \frac{\exp(\theta x) h(x)}
{\int \exp(\theta y) h(y) dy}
is a density over the reals. Evaluating the integral, we get
:
p(x;\theta) =
\sqrt{ \frac{\lambda}{2\pi x^3} } \exp\left( - \frac{\lambda}{2x} +\theta x - \sqrt{-2\lambda\theta} \right) \mathbb{1}_{[0,\infty)}(x)\,.
Substituting makes the above expression equal to .
Relationship with Brownian motion
File:Inverse gaussian as stopping time of random walk.png
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:
:
T_\alpha = \inf\{ t > 0 \mid X_t=\alpha \} \sim \operatorname{IG} \left(\frac\alpha\nu, \left(\frac \alpha \sigma \right)^2 \right)
= \frac{\alpha}{\sigma\sqrt{2 \pi x^3}} \exp\biggl(-\frac{(\alpha-\nu x)^2}{2 \sigma^2 x}\biggr)
i.e
:
P(T_{\alpha} \in (T, T + dT)) =
\frac{\alpha}{\sigma\sqrt{2 \pi T^3}} \exp\biggl(-\frac{(\alpha-\nu T)^2}{2 \sigma^2 T}\biggr)dT
(cf. Schrödinger{{r|Schrödinger1915}} equation 19, Smoluchowski{{r|Smoluchowski1915}}, equation 8, and Folks{{r|Folks1978}}, equation 1).
{{Collapse top|title=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:
:
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:
:
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:
:
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:
:
{{Collapse bottom}}
=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
:
= \frac \alpha {\sigma \sqrt{2 \pi x^3}} \exp\left(-\frac{\alpha^2 }{2 \sigma^2 x}\right)
(see also Bachelier{{r|Bachelier1900a|p=74}}{{r|Bachelier1900b|p=39}}). This is a Lévy distribution with parameters and .
Maximum likelihood
The model where
:
X_i \sim \operatorname{IG}(\mu,\lambda w_i), \,\,\,\,\,\, i=1,2,\ldots,n
with all wi known, (μ, λ) unknown and all Xi independent has the following likelihood function
:
L(\mu, \lambda)=
\left( \frac{\lambda}{2\pi} \right)^\frac n 2
\left( \prod^n_{i=1} \frac{w_i}{X_i^3} \right)^{\frac{1}{2}}
\exp\left(\frac{\lambda}{\mu} \sum_{i=1}^n w_i -\frac{\lambda}{2\mu^2}\sum_{i=1}^n w_i X_i - \frac\lambda 2 \sum_{i=1}^n w_i \frac1{X_i} \right).
Solving the likelihood equation yields the following maximum likelihood estimates
:
\widehat{\mu}= \frac{\sum_{i=1}^n w_i X_i}{\sum_{i=1}^n w_i}, \,\,\,\,\,\,\,\, \frac{1}{\widehat{\lambda}}= \frac{1}{n} \sum_{i=1}^n w_i \left( \frac{1}{X_i}-\frac{1}{\widehat{\mu}} \right).
and are independent and
:
\widehat{\mu} \sim \operatorname{IG} \left(\mu, \lambda \sum_{i=1}^n w_i \right), \qquad \frac{n}{\widehat{\lambda}} \sim \frac{1}{\lambda} \chi^2_{n-1}.
Sampling from an inverse-Gaussian distribution
The following algorithm may be used.{{r|Michael1976}}
Generate a random variate from a normal distribution with mean 0 and standard deviation equal 1
:
\displaystyle \nu \sim N(0,1).
Square the value
:
\displaystyle y = \nu^2
and use the relation
:
x = \mu + \frac{\mu^2 y}{2\lambda} - \frac{\mu}{2\lambda}\sqrt{4\mu \lambda y + \mu^2 y^2}.
Generate another random variate, this time sampled from a uniform distribution between 0 and 1
:
\displaystyle z \sim U(0,1).
If
z \le \frac{\mu}{\mu+x}
then return
\displaystyle
x
else return
\frac{\mu^2}{x}.
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
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 , then for any number {{r|Chhikara1989}}
- If then
- If for then
- If then
- If , then .{{Cite journal | title = On the inverse Gaussian distribution function | journal = Journal of the American Statistical Association | volume = 63 | issue = 4 | pages = 1514–1516 | last1 = Shuster | first1 = J. | year = 1968| doi = 10.1080/01621459.1968.10480942 }}
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,{{r|Schwarz2001}} with visual search as one example.{{Cite journal | doi = 10.1037/a0020747| pmid = 21090905| pmc = 3062635| title = What are the shapes of response time distributions in visual search?| journal = Journal of Experimental Psychology: Human Perception and Performance| volume = 37| issue = 1| pages = 58–71| year = 2011| last1 = Palmer | first1 = E. M. | last2 = Horowitz | first2 = T. S. | last3 = Torralba | first3 = A. | last4 = Wolfe | first4 = J. M. }}
History
This distribution appears to have been first derived in 1900 by Louis Bachelier{{r|Bachelier1900a|Bachelier1900b}} as the time a stock reaches a certain price for the first time. In 1915 it was used independently by Erwin Schrödinger{{r|Schrödinger1915}} and Marian v. Smoluchowski{{r|Smoluchowski1915}} 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.{{cite journal |last=Hadwiger |first=H. |year=1940 |title=Eine analytische Reproduktionsfunktion für biologische Gesamtheiten |journal=Skandinavisk Aktuarietidskrijt |volume=7 |issue=3–4 |pages=101–113 |doi=10.1080/03461238.1940.10404802}} Abraham Wald re-derived this distribution in 1944{{r|Wald1944}} as the limiting form of a sample in a sequential probability ratio test. The name inverse Gaussian was proposed by Maurice Tweedie in 1945.{{Cite journal |last=Tweedie | first=M. C. K. |year=1945 | title=Inverse Statistical Variates |journal=Nature | volume=155 | issue=3937 | pages=453 |doi=10.1038/155453a0 | bibcode=1945Natur.155..453T | s2cid=4113244 | doi-access=free }} Tweedie investigated this distribution in 1956{{cite journal |last=Tweedie |first=M. C. K. |year=1956 |title=Some Statistical Properties of Inverse Gaussian Distributions |journal=Virginia Journal of Science |series=New Series |volume=7 |issue=3 |pages=160–165}} and 1957{{Cite journal |last=Tweedie | first=M. C. K. |year=1957 | title=Statistical Properties of Inverse Gaussian Distributions I |journal=Annals of Mathematical Statistics | volume=28 | issue=2 | pages=362–377 | doi=10.1214/aoms/1177706964 | jstor=2237158 | doi-access=free }}{{Cite journal |last=Tweedie | first=M. C. K. |year=1957 | title=Statistical Properties of Inverse Gaussian Distributions II |journal=Annals of Mathematical Statistics | volume=28 | issue=3 | pages=696–705 | doi=10.1214/aoms/1177706881 | jstor=2237229 | url=http://projecteuclid.org/euclid.aoms/1177706881 | doi-access=free | url-access=subscription }} and established some of its statistical properties. The distribution was extensively reviewed by Folks and Chhikara in 1978.{{r|Folks1978}}
=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.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 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.{{cite journal | last1=Giner | first1=Göknur | last2=Smyth | first2=Gordon |title=statmod: Probability Calculations for the Inverse Gaussian Distribution | journal=The R Journal| volume=8|issue=1|pages=339–351| date=August 2016|url=https://journal.r-project.org/archive/2016-1| doi=10.32614/RJ-2016-024 | arxiv=1603.06687 |doi-access=free}} Functions for the inverse Gaussian distribution are provided for the R programming language by several packages including rmutil,{{cite web |last1=Lindsey|first1=James |title=rmutil: Utilities for Nonlinear Regression and Repeated Measurements Models |url=http://www.commanster.eu/rcode.html |date=2013-09-09 }}{{cite web |last1=Swihart |first1=Bruce |last2=Lindsey|first2=James |title=rmutil: Utilities for Nonlinear Regression and Repeated Measurements Models |url=https://cran.r-project.org/package=rmutil |date=2019-03-04 }} SuppDists,{{cite web |last1=Wheeler |first1=Robert |title=SuppDists: Supplementary Distributions |url=https://cran.r-project.org/package=SuppDists |date=2016-09-23}} STAR,{{cite web |last1=Pouzat |first1=Christophe |title=STAR: Spike Train Analysis with R |url=https://cran.r-project.org/package=STAR |date=2015-02-19}} invGauss,{{cite web |last1=Gjessing |first1=Hakon K. |title=Threshold regression that fits the (randomized drift) inverse Gaussian distribution to survival data |url=https://cran.r-project.org/package=invGauss |date=2014-03-29}} LaplacesDemon,{{cite web |last1=Hall |first1=Byron |last2=Hall |first2=Martina |last3=Statisticat |first3=LLC |last4=Brown |first4=Eric |last5=Hermanson |first5=Richard |last6=Charpentier |first6=Emmanuel |last7=Heck |first7=Daniel |last8=Laurent |first8=Stephane |last9=Gronau |first9=Quentin F. |last10=Singmann |first10=Henrik |title=LaplacesDemon: Complete Environment for Bayesian Inference |url=https://cran.r-project.org/package=LaplacesDemon |date=2014-03-29}} and statmod.{{cite web |last1=Giner |first1=Göknur |last2=Smyth |first2=Gordon |title=statmod: Statistical Modeling |url=https://cran.r-project.org/web/packages/statmod/index.html|date=2017-06-18}}
See also
- Generalized inverse Gaussian distribution
- Tweedie distributions—The inverse Gaussian distribution is a member of the family of Tweedie exponential dispersion models
- Stopping time
References
{{Reflist
|refs=
{{citation
|last1=Chhikara |first1=Raj S.
|last2=Folks |first2=J. Leroy
|title=The Inverse Gaussian Distribution: Theory, Methodology and Applications
|year=1989
|publisher=Marcel Dekker, Inc |location=New York, NY, USA
|isbn=0-8247-7997-5
}}
{{citation
|title=The Inverse Gaussian Distribution
|first=V. |last=Seshadri |publisher=Springer-Verlag |year=1999 |isbn=978-0-387-98618-0 }}
{{citation
|last=Schrödinger |first=Erwin
|title=Zur Theorie der Fall- und Steigversuche an Teilchen mit Brownscher Bewegung |journal=Physikalische Zeitschrift
|trans-title=On the Theory of Fall- and Rise Experiments on Particles with Brownian Motion
|language=de
|year=1915 |volume=16 |issue=16 |pages=289–295
|url=https://babel.hathitrust.org/cgi/pt?id=njp.32101054770928;view=1up;seq=337
}}
{{citation
|last=Smoluchowski |first=Marian
|title=Notiz über die Berechnung der Brownschen Molekularbewegung bei der Ehrenhaft-Millikanschen Versuchsanordnung
|trans-title=Note on the Calculation of Brownian Molecular Motion in the Ehrenhaft-Millikan Experimental Set-up
|language=de
|journal=Physikalische Zeitschrift
|year=1915 |volume=16 |issue=17/18 |pages=318–321
|url=https://babel.hathitrust.org/cgi/pt?id=njp.32101054770928;view=1up;seq=366
}}
{{citation
|last1=Folks |first1=J. Leroy
|last2=Chhikara |first2=Raj S.
|title=The Inverse Gaussian Distribution and Its Statistical Application—A Review
|journal=Journal of the Royal Statistical Society |series=Series B (Methodological)
|year=1978 |volume=40 |issue=3 |pages=263–275
|doi=10.1111/j.2517-6161.1978.tb01039.x |jstor=2984691
|s2cid=125337421
}}
{{citation
|last=Bachelier |first=Louis
|title=Théorie de la spéculation
|trans-title=The Theory of Speculation
|language=fr
|journal=Ann. Sci. Éc. Norm. Supér.
|year=1900 |volume=Serie 3;17 |pages=21–89
|doi=10.24033/asens.476
|url=http://archive.numdam.org/article/ASENS_1900_3_17__21_0.pdf
|doi-access=free
}}
{{citation
|last=Bachelier |first=Louis
|year=1900
|title=The Theory of Speculation
|journal=Ann. Sci. Éc. Norm. Supér.
|volume=Serie 3;17 |pages=21–89 (Engl. translation by David R. May, 2011)
|doi=10.24033/asens.476
|url=https://drive.google.com/file/d/0B5LLDy7-d3SKNGI0M2E0NGItYzFlMS00NGU2LWE2ZDAtODc3MDY3MzdiNmY0/view
|doi-access=free}}
{{citation
|last1=Michael |first1=John R.
|last2=Schucany |first2=William R.
|last3=Haas |first3=Roy W.
|title=Generating Random Variates Using Transformations with Multiple Roots
|journal=The American Statistician
|year=1976 |volume=30 |issue=2 |pages=88–90
|doi=10.1080/00031305.1976.10479147 |jstor=2683801
}}
{{citation
|last1=Schwarz |first1=Wolfgang
|title=The ex-Wald distribution as a descriptive model of response times
|journal=Behavior Research Methods, Instruments, and Computers
|year=2001 |volume=33 |issue=4 |pages=457–469
|doi=10.3758/bf03195403 |pmid=11816448
|doi-access=free}}
{{citation
|last=Wald |first=Abraham
|title=On Cumulative Sums of Random Variables
|journal=Annals of Mathematical Statistics
|year=1944 |volume=15 |issue=3 |pages=283–296
|doi=10.1214/aoms/1177731235 |jstor=2236250
|doi-access=free}}
}}
Further reading
- {{cite book |title=System Reliability Theory |first2=Marvin |last2=Rausand |first1=Arnljot |last1=Høyland |author-link1=Arnljot Høyland |location=New York |publisher=Wiley |year=1994 |isbn=978-0-471-59397-3 }}
- {{cite book |title=The Inverse Gaussian Distribution |first=V. |last=Seshadri |publisher=Oxford University Press |year=1993 |isbn=978-0-19-852243-0 }}
External links
- [http://mathworld.wolfram.com/InverseGaussianDistribution.html Inverse Gaussian Distribution] in Wolfram website.
{{ProbDistributions|continuous-semi-infinite}}
{{Authority control}}
{{DEFAULTSORT:Inverse Gaussian Distribution}}
Category:Continuous distributions
Category:Exponential family distributions
Category:Infinitely divisible probability distributions
Category:Articles with example Java code
Category:Articles with example Python (programming language) code