normal-inverse-gamma Parameters
μ
{\displaystyle \mu \,}
location (real )
λ
>
0
{\displaystyle \lambda >0\,}
(real)
α
>
0
{\displaystyle \alpha >0\,}
(real)
β
>
0
{\displaystyle \beta >0\,}
(real) Support
x
∈
(
−
∞
,
∞
)
,
σ
2
∈
(
0
,
∞
)
{\displaystyle x\in (-\infty ,\infty )\,\!,\;\sigma ^{2}\in (0,\infty )}
PDF
λ
σ
2
π
β
α
Γ
(
α
)
(
1
σ
2
)
α
+
1
e
−
2
β
+
λ
(
x
−
μ
)
2
2
σ
2
{\displaystyle {\frac {\sqrt {\lambda }}{\sigma {\sqrt {2\pi }}}}{\frac {\beta ^{\alpha }}{\Gamma (\alpha )}}\,\left({\frac {1}{\sigma ^{2}}}\right)^{\alpha +1}e^{-{\frac {2\beta +\lambda (x-\mu )^{2}}{2\sigma ^{2}}}}}
In probability theory and statistics , the normal-inverse-gamma distribution (or Gaussian-inverse-gamma distribution ) is a four-parameter family of multivariate continuous probability distributions . It is the conjugate prior of a normal distribution with unknown mean and variance .
Definition
Suppose
x
|
σ
2
,
μ
,
λ
∼
N
(
μ
,
σ
2
/
λ
)
{\displaystyle x|\sigma ^{2},\mu ,\lambda \sim \mathrm {N} (\mu ,\sigma ^{2}/\lambda )\,\!}
has a normal distribution with mean
μ
{\displaystyle \mu }
and variance
σ
2
/
λ
{\displaystyle \sigma ^{2}/\lambda }
, where
σ
2
|
α
,
β
∼
Γ
−
1
(
α
,
β
)
{\displaystyle \sigma ^{2}|\alpha ,\beta \sim \Gamma ^{-1}(\alpha ,\beta )\!}
has an inverse gamma distribution . Then
(
x
,
σ
2
)
{\displaystyle (x,\sigma ^{2})}
has a normal-inverse-gamma distribution, denoted as
(
x
,
σ
2
)
∼
N-
Γ
−
1
(
μ
,
λ
,
α
,
β
)
.
{\displaystyle (x,\sigma ^{2})\sim {\text{N-}}\Gamma ^{-1}(\mu ,\lambda ,\alpha ,\beta )\!.}
(
NIG
{\displaystyle {\text{NIG}}}
is also used instead of
N-
Γ
−
1
.
{\displaystyle {\text{N-}}\Gamma ^{-1}.}
)
In a multivariate form of the normal-inverse-gamma distribution,
x
|
σ
2
,
μ
,
V
−
1
∼
N
(
μ
,
σ
2
V
−
1
)
{\displaystyle \mathbf {x} |\sigma ^{2},{\boldsymbol {\mu }},\mathbf {V} ^{-1}\sim \mathrm {N} ({\boldsymbol {\mu }},\sigma ^{2}\mathbf {V} ^{-1})\,\!}
-- that is, conditional on
σ
2
{\displaystyle \sigma ^{2}}
,
x
{\displaystyle \mathbf {x} }
is a
k
×
1
{\displaystyle k\times 1}
random vector that follows the multivariate normal distribution with mean
μ
{\displaystyle {\boldsymbol {\mu }}}
and covariance
σ
2
V
−
1
{\displaystyle \sigma ^{2}\mathbf {V} ^{-1}}
-- while, as in the univariate case,
σ
2
|
α
,
β
∼
Γ
−
1
(
α
,
β
)
{\displaystyle \sigma ^{2}|\alpha ,\beta \sim \Gamma ^{-1}(\alpha ,\beta )\!}
.
Characterization
Probability density function
f
(
x
,
σ
2
|
μ
,
λ
,
α
,
β
)
=
λ
σ
2
π
β
α
Γ
(
α
)
(
1
σ
2
)
α
+
1
exp
(
−
2
β
+
λ
(
x
−
μ
)
2
2
σ
2
)
{\displaystyle f(x,\sigma ^{2}|\mu ,\lambda ,\alpha ,\beta )={\frac {\sqrt {\lambda }}{\sigma {\sqrt {2\pi }}}}\,{\frac {\beta ^{\alpha }}{\Gamma (\alpha )}}\,\left({\frac {1}{\sigma ^{2}}}\right)^{\alpha +1}\exp \left(-{\frac {2\beta +\lambda (x-\mu )^{2}}{2\sigma ^{2}}}\right)}
For the multivariate form where
x
{\displaystyle \mathbf {x} }
is a
k
×
1
{\displaystyle k\times 1}
random vector,
f
(
x
,
σ
2
|
μ
,
V
−
1
,
α
,
β
)
=
|
V
|
−
1
/
2
(
2
π
)
−
k
/
2
β
α
Γ
(
α
)
(
1
σ
2
)
k
/
2
+
α
+
1
exp
(
−
2
β
+
(
x
−
μ
)
′
V
−
1
(
x
−
μ
)
2
σ
2
)
.
{\displaystyle f(\mathbf {x} ,\sigma ^{2}|\mu ,\mathbf {V} ^{-1},\alpha ,\beta )=|\mathbf {V} |^{-1/2}{(2\pi )^{-k/2}}\,{\frac {\beta ^{\alpha }}{\Gamma (\alpha )}}\,\left({\frac {1}{\sigma ^{2}}}\right)^{k/2+\alpha +1}\exp \left(-{\frac {2\beta +(\mathbf {x} -{\boldsymbol {\mu }})'\mathbf {V} ^{-1}(\mathbf {x} -{\boldsymbol {\mu }})}{2\sigma ^{2}}}\right).}
where
|
V
|
{\displaystyle |\mathbf {V} |}
is the determinant of the
k
×
k
{\displaystyle k\times k}
matrix
V
{\displaystyle \mathbf {V} }
. Note how this last equation reduces to the first form if
k
=
1
{\displaystyle k=1}
so that
x
,
V
,
μ
{\displaystyle \mathbf {x} ,\mathbf {V} ,{\boldsymbol {\mu }}}
are scalars .
Alternative parameterization
It is also possible to let
γ
=
1
/
λ
{\displaystyle \gamma =1/\lambda }
in which case the pdf becomes
f
(
x
,
σ
2
|
μ
,
γ
,
α
,
β
)
=
1
σ
2
π
γ
β
α
Γ
(
α
)
(
1
σ
2
)
α
+
1
exp
(
−
2
γ
β
+
(
x
−
μ
)
2
2
γ
σ
2
)
{\displaystyle f(x,\sigma ^{2}|\mu ,\gamma ,\alpha ,\beta )={\frac {1}{\sigma {\sqrt {2\pi \gamma }}}}\,{\frac {\beta ^{\alpha }}{\Gamma (\alpha )}}\,\left({\frac {1}{\sigma ^{2}}}\right)^{\alpha +1}\exp \left(-{\frac {2\gamma \beta +(x-\mu )^{2}}{2\gamma \sigma ^{2}}}\right)}
In the multivariate form, the corresponding change would be to regard the covariance matrix
V
{\displaystyle \mathbf {V} }
instead of its inverse
V
−
1
{\displaystyle \mathbf {V} ^{-1}}
as a parameter.
Cumulative distribution function
F
(
x
,
σ
2
|
μ
,
λ
,
α
,
β
)
=
e
−
β
σ
2
(
β
σ
2
)
α
(
erf
(
λ
(
x
−
μ
)
2
σ
)
+
1
)
2
σ
2
Γ
(
α
)
{\displaystyle F(x,\sigma ^{2}|\mu ,\lambda ,\alpha ,\beta )={\frac {e^{-{\frac {\beta }{\sigma ^{2}}}}\left({\frac {\beta }{\sigma ^{2}}}\right)^{\alpha }\left({\text{erf}}\left({\frac {{\sqrt {\lambda }}(x-\mu )}{{\sqrt {2}}\sigma }}\right)+1\right)}{2\sigma ^{2}\Gamma (\alpha )}}}
Differential equation
The probability density function of the normal-inverse-gamma distribution is a solution to the following differential equation :
{
σ
2
f
′
(
x
)
+
λ
f
(
x
)
(
x
−
μ
)
=
0
,
f
(
0
)
=
λ
β
α
(
1
σ
2
)
α
−
1
e
−
2
β
−
λ
μ
2
2
σ
2
2
π
σ
Γ
(
α
)
}
{\displaystyle \left\{{\begin{array}{l}\sigma ^{2}f'(x)+\lambda f(x)(x-\mu )=0,\\f(0)={\frac {{\sqrt {\lambda }}\beta ^{\alpha }\left({\frac {1}{\sigma ^{2}}}\right)^{\alpha -1}e^{\frac {-2\beta -\lambda \mu ^{2}}{2\sigma ^{2}}}}{{\sqrt {2\pi }}\sigma \Gamma (\alpha )}}\end{array}}\right\}}
Properties
Marginal distributions
Given
(
x
,
σ
2
)
∼
N-
Γ
−
1
(
μ
,
λ
,
α
,
β
)
.
{\displaystyle (x,\sigma ^{2})\sim {\text{N-}}\Gamma ^{-1}(\mu ,\lambda ,\alpha ,\beta )\!.}
as above,
σ
2
{\displaystyle \sigma ^{2}}
by itself follows an inverse gamma distribution :
σ
2
∼
Γ
−
1
(
α
,
β
)
{\displaystyle \sigma ^{2}\sim \Gamma ^{-1}(\alpha ,\beta )\!}
while
α
λ
β
(
x
−
μ
)
{\displaystyle {\sqrt {\frac {\alpha \lambda }{\beta }}}(x-\mu )}
follows a t distribution with
2
α
{\displaystyle 2\alpha }
degrees of freedom.
In the multivariate case, the marginal distribution of
x
{\displaystyle \mathbf {x} }
is a multivariate t distribution :
x
∼
t
2
α
(
μ
,
β
α
V
−
1
)
{\displaystyle \mathbf {x} \sim t_{2\alpha }({\boldsymbol {\mu }},{\frac {\beta }{\alpha }}\mathbf {V} ^{-1})\!}
Summation
Scaling
Exponential family
Kullback-Leibler divergence
Maximum likelihood estimation
This section is empty. You can help by
adding to it .
(July 2010 )
Posterior distribution of the parameters
See the articles on normal-gamma distribution and conjugate prior .
Interpretation of the parameters
See the articles on normal-gamma distribution and conjugate prior .
Generating normal-inverse-gamma random variates
Generation of random variates is straightforward:
Sample
σ
2
{\displaystyle \sigma ^{2}}
from an inverse gamma distribution with parameters
α
{\displaystyle \alpha }
and
β
{\displaystyle \beta }
Sample
x
{\displaystyle x}
from a normal distribution with mean
μ
{\displaystyle \mu }
and variance
σ
2
/
λ
{\displaystyle \sigma ^{2}/\lambda }
The normal-gamma distribution is the same distribution parameterized by precision rather than variance
A generalization of this distribution which allows for a multivariate mean and a completely unknown positive-definite covariance matrix
σ
2
V
{\displaystyle \sigma ^{2}\mathbf {V} }
(whereas in the multivariate inverse-gamma distribution the covariance matrix is regarded as known up to the scale factor
σ
2
{\displaystyle \sigma ^{2}}
) is the normal-inverse-Wishart distribution
References
Denison, David G. T. ; Holmes, Christopher C.; Mallick, Bani K.; Smith, Adrian F. M. (2002) Bayesian Methods for Nonlinear Classification and Regression , Wiley. ISBN 0471490369
Koch, Karl-Rudolf (2007) Introduction to Bayesian Statistics (2nd Edition), Springer. ISBN 354072723X
Discrete univariate
with finite support with infinite support
Continuous univariate
supported on a bounded interval supported on a semi-infinite interval supported on the whole real line with support whose type varies
Mixed univariate
Multivariate (joint) Directional Degenerate and singular Families