Английская Википедия:Inverse Gaussian distribution
Шаблон:Short description Шаблон:For Шаблон:Probability distribution \left(\frac{x}{\mu}-1 \right)\right) </math> <math>{}+\exp\left(\frac{2 \lambda}{\mu}\right) \Phi\left(-\sqrt{\frac{\lambda}{x}}\left(\frac{x}{\mu}+1 \right)\right) </math> where <math> \Phi </math> is the standard normal (standard Gaussian) distribution c.d.f.
| quantile = | mean = <math>\operatorname{E}[X] = \mu </math>
<math>\operatorname{E}[\frac{1}{X}] = \frac{1}{\mu} + \frac{1}{\lambda}</math> | median = | mode =<math>\mu\left[\left(1+\frac{9 \mu^2}{4 \lambda^2}\right)^\frac{1}{2}-\frac{3 \mu}{2 \lambda}\right]</math> | variance =<math>\operatorname{Var}[ X] = \frac{\mu^3}{\lambda} </math>
<math>\operatorname{Var}[\frac{1}{X}] = \frac{1}{\mu \lambda} + \frac{2}{\lambda^2}</math> | skewness =<math>3\left(\frac{\mu}{\lambda}\right)^{1/2} </math> | kurtosis =<math>\frac{15 \mu}{\lambda} </math> | entropy = | mgf =<math>\exp\left[{\frac{\lambda}{\mu}\left(1-\sqrt{1-\frac{2\mu^2t}{\lambda}}\right)}\right]</math> | char =<math>\exp\left[{\frac{\lambda}{\mu}\left(1-\sqrt{1-\frac{2\mu^2\mathrm{i}t}{\lambda}}\right)}\right]</math> | 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
- <math> f(x;\mu,\lambda) = \sqrt\frac{\lambda}{2 \pi x^3} \exp\biggl(-\frac{\lambda (x-\mu)^2}{2 \mu^2 x}\biggr)</math>
for x > 0, where <math>\mu > 0</math> is the mean and <math>\lambda > 0</math> is the shape parameter.Шаблон:R
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 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 <math>X \sim \operatorname{IG}(\mu, \lambda)\,\!</math>.
Properties
Single parameter form
The probability density function (pdf) of the inverse Gaussian distribution has a single parameter form given by
- <math> f(x;\mu,\mu^2)
= \frac{\mu}{\sqrt{2 \pi x^3}} \exp\biggl(-\frac{(x-\mu)^2}{2x}\biggr). </math>
In this form, the mean and variance of the distribution are equal, <math>\mathbb{E}[X] = \text{Var}(X).</math>
Also, the cumulative distribution function (cdf) of the single parameter inverse Gaussian distribution is related to the standard normal distribution by
- <math>
\begin{align} \Pr(X < x) &= \Phi(-z_1) + e^{2 \mu} \Phi(-z_2), \end{align} </math>
where <math>z_1 = \frac{\mu}{x^{1/2}} - x^{1/2}</math>, <math>z_2 = \frac{\mu}{x^{1/2}} + x^{1/2},</math> and the <math>\Phi</math> is the cdf of standard normal distribution. The variables <math>z_1</math> and <math>z_2</math> are related to each other by the identity <math>z_2^2 = z_1^2 + 4\mu.</math>
In the single parameter form, the MGF simplifies to
- <math> M(t) = \exp[\mu(1-\sqrt{1-2 t})].</math>
An inverse Gaussian distribution in double parameter form <math>f(x;\mu,\lambda)</math> can be transformed into a single parameter form <math>f(y;\mu_0,\mu_0^2)</math> by appropriate scaling <math>y = \frac{\mu^2 x}{\lambda},</math> where <math>\mu_0 = \mu^3/\lambda.</math>
The standard form of inverse Gaussian distribution is
- <math> f(x;1,1)
= \frac{1}{\sqrt{2 \pi x^3}} \exp\biggl(-\frac{(x-1)^2}{2x}\biggr). </math>
Summation
If Xi has an <math>\operatorname{IG}(\mu_0 w_i, \lambda_0 w_i^2 )\,\!</math> distribution for i = 1, 2, ..., n and all Xi are independent, then
- <math>
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). </math>
Note that
- <math>
\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} </math>
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
- <math>
X \sim \operatorname{IG}(\mu,\lambda) \,\,\,\,\,\, \Rightarrow \,\,\,\,\,\, tX \sim \operatorname{IG}(t\mu,t\lambda). </math>
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 <math>\lambda>0</math> fixed, it is also a single-parameter natural exponential family distributionШаблон:R where the base distribution has density
- <math>
h(x) = \sqrt{ \frac{\lambda}{2\pi x^3} } \exp\left( - \frac{\lambda}{2x} \right) \mathbb{1}_{[0,\infty)}(x)\,. </math>
Indeed, with <math> \theta\le 0 </math>,
- <math>
p(x;\theta) = \frac{\exp(\theta x) h(x)} {\int \exp(\theta y) h(y) dy} </math>
is a density over the reals. Evaluating the integral, we get
- <math>
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)\,. </math>
Substituting <math>\theta = -\lambda/(2\mu^2)</math> makes the above expression equal to <math>f(x;\mu,\lambda)</math>.
Relationship with Brownian motion
Let the stochastic process Xt be given by
- <math>X_0 = 0\quad</math>
- <math>X_t = \nu t + \sigma W_t\quad\quad\quad\quad</math>
where Wt is a standard Brownian motion. That is, Xt is a Brownian motion with drift <math>\nu > 0</math>.
Then the first passage time for a fixed level <math>\alpha > 0</math> by Xt is distributed according to an inverse-Gaussian:
- <math>
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)
</math> i.e
- <math>
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 </math>
(cf. SchrödingerШаблон:R equation 19, SmoluchowskiШаблон:R, equation 8, and FolksШаблон:R, equation 1).
Шаблон:Collapse top Suppose that we have a Brownian motion <math>X_{t}</math> with drift <math>\nu</math> defined by:
- <math>X_{t} = \nu t + \sigma W_{t}, \quad X(0) = x_{0}</math>
And suppose that we wish to find the probability density function for the time when the process first hits some barrier <math>\alpha > x_{0}</math> - known as the first passage time. The Fokker-Planck equation describing the evolution of the probability distribution <math>p(t,x)</math> is:
- <math>{\partial p\over{\partial t}} + \nu {\partial p\over{\partial x}} = {1\over{2}}\sigma^{2}{\partial^{2}p\over{\partial x^{2}}}, \quad \begin{cases} p(0,x) &= \delta(x-x_{0}) \\ p(t,\alpha) &= 0 \end{cases} </math>
where <math>\delta(\cdot)</math> is the Dirac delta function. This is a boundary value problem (BVP) with a single absorbing boundary condition <math>p(t,\alpha)=0</math>, which may be solved using the method of images. Based on the initial condition, the fundamental solution to the Fokker-Planck equation, denoted by <math>\varphi(t,x)</math>, is:
- <math> \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] </math>
Define a point <math>m</math>, such that <math>m>\alpha</math>. 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:
- <math> p(0,x) = \delta(x-x_{0}) - A\delta(x-m)</math>
where <math>A</math> is a constant. Due to the linearity of the BVP, the solution to the Fokker-Planck equation with this initial condition is:
- <math> 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\} </math>
Now we must determine the value of <math>A</math>. The fully absorbing boundary condition implies that:
- <math>(\alpha-x_{0}-\nu t)^{2} = -2\sigma^{2}t \log A + (\alpha - m - \nu t)^{2}</math>
At <math>p(0,\alpha)</math>, we have that <math>(\alpha-x_{0})^{2} = (\alpha-m)^{2} \implies m = 2\alpha - x_{0}</math>. Substituting this back into the above equation, we find that:
- <math>A = e^{2\nu(\alpha - x_{0})/\sigma^{2}} </math>
Therefore, the full solution to the BVP is:
- <math>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\}</math>
Now that we have the full probability density function, we are ready to find the first passage time distribution <math>f(t)</math>. The simplest route is to first compute the survival function <math>S(t)</math>, which is defined as:
- <math>\begin{aligned} S(t) &= \int_{-\infty}^{\alpha}p(t,x)dx \\ &= \Phi\left( {\alpha - x_{0} - \nu t\over{\sigma\sqrt{t}}} \right ) - e^{2\nu(\alpha-x_{0})/\sigma^{2}}\Phi\left( {-\alpha+x_{0}-\nu t\over{\sigma\sqrt{t}}} \right ) \end{aligned}</math>
where <math>\Phi(\cdot)</math> 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 <math>\alpha</math> at some time <math>t</math>. Finally, the first passage time distribution <math>f(t)</math> is obtained from the identity:
- <math>\begin{aligned} f(t) &= -{dS\over{dt}} \\ &= {(\alpha-x_{0})\over{\sqrt{2\pi \sigma^{2}t^{3}}}} e^{-(\alpha - x_{0}-\nu t)^{2}/2\sigma^{2}t} \end{aligned} </math>
Assuming that <math>x_{0} = 0</math>, the first passage time follows an inverse Gaussian distribution:
- <math>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]</math>
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
- <math> f \left( x; 0, \left(\frac \alpha \sigma \right)^2 \right)
= \frac \alpha {\sigma \sqrt{2 \pi x^3}} \exp\left(-\frac{\alpha^2 }{2 \sigma^2 x}\right) </math>
(see also BachelierШаблон:RШаблон:R). This is a Lévy distribution with parameters <math>c=\left(\frac \alpha \sigma \right)^2</math> and <math>\mu=0</math>.
Maximum likelihood
The model where
- <math>
X_i \sim \operatorname{IG}(\mu,\lambda w_i), \,\,\,\,\,\, i=1,2,\ldots,n </math>
with all wi known, (μ, λ) unknown and all Xi independent has the following likelihood function
- <math>
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). </math>
Solving the likelihood equation yields the following maximum likelihood estimates
- <math>
\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). </math>
<math>\widehat{\mu}</math> and <math>\widehat{\lambda}</math> are independent and
- <math>
\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}. </math>
Sampling from an inverse-Gaussian distribution
The following algorithm may be used.Шаблон:R
Generate a random variate from a normal distribution with mean 0 and standard deviation equal 1
- <math>
\displaystyle \nu \sim N(0,1). </math>
Square the value
- <math>
\displaystyle y = \nu^2 </math>
and use the relation
- <math>
x = \mu + \frac{\mu^2 y}{2\lambda} - \frac{\mu}{2\lambda}\sqrt{4\mu \lambda y + \mu^2 y^2}. </math>
Generate another random variate, this time sampled from a uniform distribution between 0 and 1
- <math>
\displaystyle z \sim U(0,1). </math>
If <math> z \le \frac{\mu}{\mu+x} </math> then return <math> \displaystyle x </math> else return <math> \frac{\mu^2}{x}. </math>
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;
}
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 <math> X \sim \operatorname{IG}(\mu,\lambda)</math>, then <math> k X \sim \operatorname{IG}(k \mu,k \lambda)</math> for any number <math>k > 0.</math>Шаблон:R
- If <math> X_i \sim \operatorname{IG}(\mu,\lambda)\,</math> then <math> \sum_{i=1}^n X_i \sim \operatorname{IG}(n \mu,n^2 \lambda)\,</math>
- If <math> X_i \sim \operatorname{IG}(\mu,\lambda)\,</math> for <math>i=1,\ldots,n\,</math> then <math> \bar{X} \sim \operatorname{IG}(\mu,n \lambda)\,</math>
- If <math> X_i \sim \operatorname{IG}(\mu_i,2 \mu^2_i)\,</math> then <math> \sum_{i=1}^n X_i \sim \operatorname{IG}\left(\sum_{i=1}^n \mu_i, 2 \left( \sum_{i=1}^n \mu_i \right)^2\right)\,</math>
- If <math> X \sim \operatorname{IG}(\mu,\lambda)</math>, then <math> \lambda (X-\mu)^2/\mu^2X \sim \chi^2(1)</math>.[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,Шаблон:R with visual search as one example.[2]
History
This distribution appears to have been first derived in 1900 by Louis BachelierШаблон:R as the time a stock reaches a certain price for the first time. In 1915 it was used independently by Erwin SchrödingerШаблон:R and Marian v. SmoluchowskiШаблон:R 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Шаблон:R 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.Шаблон:R
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
- Generalized inverse Gaussian distribution
- Tweedie distributions—The inverse Gaussian distribution is a member of the family of Tweedie exponential dispersion models
- Stopping time
References
Further reading
External links
- Inverse Gaussian Distribution in Wolfram website.
Шаблон:ProbDistributions Шаблон:Authority control
- ↑ Шаблон:Cite journal
- ↑ Шаблон:Cite journal
- ↑ Шаблон:Cite journal
- ↑ Шаблон:Cite journal
- ↑ Шаблон:Cite journal
- ↑ Шаблон:Cite journal
- ↑ Шаблон:Cite journal
- ↑ Шаблон:Cite journal
- ↑ Шаблон:Cite web
- ↑ Шаблон:Cite web
- ↑ Шаблон:Cite web
- ↑ Шаблон:Cite web
- ↑ Шаблон:Cite web
- ↑ Шаблон:Cite web
- ↑ Шаблон:Cite web
- Английская Википедия
- Страницы с неработающими файловыми ссылками
- Continuous distributions
- Exponential family distributions
- Infinitely divisible probability distributions
- Articles with example Java code
- Articles with example Python (programming language) code
- Страницы, где используется шаблон "Навигационная таблица/Телепорт"
- Страницы с телепортом
- Википедия
- Статья из Википедии
- Статья из Английской Википедии