Inverse-Wishart distribution

In statistics, the inverse Wishart distribution, also called the inverted Wishart distribution, is a probability density function defined on matrices. In Bayesian statistics it is used as the conjugate for the covariance matrix of a multivariate normal distribution.

We say $${\mathbf B}$$ follows an inverse Wishart distribution, denoted as $$ \mathbf{B}\sim W^{-1}({\mathbf\Psi},m)$$, if its probability density function is written as follows:



\frac{ \left|{\mathbf\Psi}\right|^{m/2}\left|B\right|^{-(m+p+1)/2}e^{-\mathrm{trace}({\mathbf\Psi}{\mathbf B}^{-1})/2} }{ 2^{mp/2}\Gamma_p(m/2)}, $$

where $${\mathbf B}$$ is a $$p\times p$$ matrix. The matrix $${\mathbf\Psi}$$ is assumed to be positive definite.

Distribution of the inverse of a Wishart-distributed matrix
If $${\mathbf A}\sim W({\mathbf\Sigma},m)$$ and $${\mathbf\Sigma}$$ is $$p*p$$, then $${\mathbf B}={\mathbf A}^{-1}$$ has an inverse Wishart distribution $${\mathbf B}\sim W^{-1}({\mathbf\Sigma}^{-1},m)$$ with probability density function:

p(\mathbf{B}|\mathbf{\Psi},m) = \frac{ \left|{\mathbf\Psi}\right|^{m/2}\left|\mathbf{B}\right|^{-(m+p+1)/2}\exp\left({-\mathrm{tr}({\mathbf\Psi}{\mathbf B}^{-1})/2}\right) }{ 2^{mp/2}\Gamma_p(m/2)} $$. where $$\mathbf{\Psi} = \mathbf{\Sigma}^{-1}$$ and $$\Gamma_p(\cdot)$$ is the multivariate gamma function.

Marginal and conditional distributions from an inverse Wishart-distributed matrix
Suppose $${\mathbf A}\sim W^{-1}({\mathbf\Psi},m)$$ has an inverse Wishart distribution. Partition the matrices $$ {\mathbf A} $$ and $$ {\mathbf\Psi} $$ conformably with each other

{\mathbf A} = \begin{bmatrix} A_{11} & A_{12} \\ A_{21} & A_{22} \end{bmatrix}, \; {\mathbf \Psi} = \begin{bmatrix} \Psi_{11} & \Psi_{12} \\ \Psi_{21} & \Psi_{22} \end{bmatrix} $$ where $${\mathbf A_{ij}}$$ and $${\mathbf \Psi_{ij}} $$ are $$ p_{i}\times p_{j}$$ matrices, then we have

i) $$ {\mathbf A_{11} } $$ is independent of $$ {\mathbf A}_{11}^{-1}{\mathbf A}_{12} $$ and $$ {\mathbf A}_{22\cdot 1} $$, where $${\mathbf A_{22\cdot 1}} = {\mathbf A}_{22} - {\mathbf A}_{21}{\mathbf A}_{11}^{-1}{\mathbf A}_{12}$$;

ii) $$ {\mathbf A_{11} } \sim W^{-1}({\mathbf \Psi_{11} }, m-p_{2}) $$;

iii) $$ {\mathbf A}_{11}^{-1} {\mathbf A}_{12}| {\mathbf A}_{22\cdot 1} \sim MN_{p_{1}\times p_{2}} ( {\mathbf \Psi}_{11}^{-1} {\mathbf \Psi}_{12}, {\mathbf A}_{22\cdot 1} \otimes  {\mathbf \Psi}_{11}^{-1}) $$, where $$ MN_{p\times q}(\cdot,\cdot) $$ is a matrix normal distribution;

iv) $$ {\mathbf A}_{22\cdot 1} \sim W^{-1}({\mathbf \Psi}_{22\cdot 1}, m) $$

Conjugate distribution
If $${\mathbf A}\sim W({\mathbf\Sigma},n)$$ and $${\mathbf\Sigma}$$ has the a priori distribution $$W^{-1}({\mathbf\Psi},m)$$ then the conditional distribution of $${\mathbf\Sigma}$$ is $$W^{-1}({\mathbf A}+{\mathbf\Psi},n+m)$$.

Expectation
If $${\mathbf A}\sim W({\mathbf\Sigma},n)$$, then



{\mathcal E}({\mathbf A}^{-1}) = \frac{{\mathbf\Sigma}^{-1}}{n-p-1}.$$

Related distributions
A univariate specialization of the inverse-Wishart distribution is the inverse-gamma distribution. With $$p=1$$ (i.e. univariate) and $$\alpha = m/2$$, $$\beta = \mathbf{\Psi}/2$$ and $$x=\mathbf{B}$$ the probability density function of the inverse-Wishart distribution becomes


 * $$p(x|\alpha, \beta) = \frac{\beta^\alpha\, x^{-\alpha-1} \exp(-\beta/x)}{\Gamma_1(\alpha)}.$$

i.e., the inverse-gamma distribution, where $$\Gamma_1(\cdot)$$ is the ordinary Gamma function.

A generalization is the normal-inverse-Wishart distribution.