Normal-inverse-Wishart distribution

From testwiki
Jump to navigation Jump to search

Template:Short description Template:Probability distribution In probability theory and statistics, the normal-inverse-Wishart distribution (or Gaussian-inverse-Wishart distribution) is a multivariate four-parameter family of continuous probability distributions. It is the conjugate prior of a multivariate normal distribution with an unknown mean and covariance matrix (the inverse of the precision matrix).[1]

Definition

Suppose

𝝁|𝝁0,Ξ»,πšΊβˆΌπ’©(𝝁|𝝁0,1λ𝚺)

has a multivariate normal distribution with mean 𝝁0 and covariance matrix 1λ𝚺, where

𝚺|𝚿,Ξ½βˆΌπ’²βˆ’1(𝚺|𝚿,Ξ½)

has an inverse Wishart distribution. Then (𝝁,𝚺) has a normal-inverse-Wishart distribution, denoted as

(𝝁,𝚺)∼NIW(𝝁0,λ,𝚿,ν).

Characterization

Probability density function

f(𝝁,𝚺|𝝁0,Ξ»,𝚿,Ξ½)=𝒩(𝝁|𝝁0,1λ𝚺)π’²βˆ’1(𝚺|𝚿,Ξ½)

The full version of the PDF is as follows:[2]

f(𝝁,𝚺|𝝁0,Ξ»,𝚿,Ξ½)=Ξ»D/2|𝚿|Ξ½/2|𝚺|βˆ’Ξ½+D+22(2Ο€)D/22Ξ½D2Ξ“D(Ξ½2)exp{βˆ’12Tr(πšΏπšΊβˆ’1)βˆ’Ξ»2(πβˆ’π0)TπšΊβˆ’1(πβˆ’π0)}

Here Ξ“D[β‹…] is the multivariate gamma function and Tr(𝚿) is the Trace of the given matrix.

Properties

Scaling

Marginal distributions

By construction, the marginal distribution over 𝚺 is an inverse Wishart distribution, and the conditional distribution over 𝝁 given 𝚺 is a multivariate normal distribution. The marginal distribution over 𝝁 is a multivariate t-distribution.

Posterior distribution of the parameters

Suppose the sampling density is a multivariate normal distribution

π’šπ’Š|𝝁,πšΊβˆΌπ’©p(𝝁,𝚺)

where π’š is an nΓ—p matrix and π’šπ’Š (of length p) is row i of the matrix .

With the mean and covariance matrix of the sampling distribution is unknown, we can place a Normal-Inverse-Wishart prior on the mean and covariance parameters jointly

(𝝁,𝚺)∼NIW(𝝁0,λ,𝚿,ν).

The resulting posterior distribution for the mean and covariance matrix will also be a Normal-Inverse-Wishart

(𝝁,𝚺|y)∼NIW(𝝁n,λn,𝚿n,νn),

where

𝝁n=λ𝝁0+nπ’šΒ―Ξ»+n
Ξ»n=Ξ»+n
Ξ½n=Ξ½+n
𝚿n=𝚿+𝑺+Ξ»nΞ»+n(π’šΒ―βˆ’π0)(π’šΒ―βˆ’π0)TΒ Β Β with  𝑺=βˆ‘i=1n(π’šπ’Šβˆ’π’šΒ―)(π’šπ’Šβˆ’π’šΒ―)T.


To sample from the joint posterior of (𝝁,𝚺), one simply draws samples from 𝚺|π’šβˆΌπ’²βˆ’1(𝚿n,Ξ½n), then draw 𝝁|𝚺,π’šβˆΌπ’©p(𝝁n,𝚺/Ξ»n). To draw from the posterior predictive of a new observation, draw π’š~|𝝁,𝚺,π’šβˆΌπ’©p(𝝁,𝚺) , given the already drawn values of 𝝁 and 𝚺.[3]

Generating normal-inverse-Wishart random variates

Generation of random variates is straightforward:

  1. Sample 𝚺 from an inverse Wishart distribution with parameters 𝚿 and ν
  2. Sample 𝝁 from a multivariate normal distribution with mean 𝝁0 and variance 1π€πšΊ

Notes

Template:Reflist

References

  • Bishop, Christopher M. (2006). Pattern Recognition and Machine Learning. Springer Science+Business Media.
  • Murphy, Kevin P. (2007). "Conjugate Bayesian analysis of the Gaussian distribution."

Template:ProbDistributions

  1. ↑ Murphy, Kevin P. (2007). "Conjugate Bayesian analysis of the Gaussian distribution."
  2. ↑ Simon J.D. Prince(June 2012). Computer Vision: Models, Learning, and Inference. Cambridge University Press. 3.8: "Normal inverse Wishart distribution".
  3. ↑ Gelman, Andrew, et al. Bayesian data analysis. Vol. 2, p.73. Boca Raton, FL, USA: Chapman & Hall/CRC, 2014.