Inverse-Wishart distribution

From Wikipedia, the free encyclopedia

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.

Contents

[edit] Theorems

[edit] 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.[1]

[edit] 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} \mathbf{A}_{11} & \mathbf{A}_{12} \\ \mathbf{A}_{21} & \mathbf{A}_{22} \end{bmatrix}, \;
    {\mathbf{\Psi}} = \begin{bmatrix} \mathbf{\Psi}_{11} & \mathbf{\Psi}_{12} \\ \mathbf{\Psi}_{21} & \mathbf{\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} is the Schur complement of  {\mathbf A_{11} } in  {\mathbf A} ;

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)

[edit] Conjugate distribution

Suppose we wish to make inference about a covariance matrix {\mathbf{\Sigma}} whose prior {p(\mathbf{\Sigma})} has a W^{-1}({\mathbf\Psi},m) distribution. If the observations \mathbf{X}=[\mathbf{x}_1,\ldots,\mathbf{x}_n] are independent p-variate gaussian variables drawn from a N(\mathbf{0},{\mathbf \Sigma}) distribution, then the conditional distribution {p(\mathbf{\Sigma}|\mathbf{X})} has a W^{-1}({\mathbf A}+{\mathbf\Psi},n+m) distribution, where {\mathbf{A}}=\mathbf{X}\mathbf{X}^T is n times the sample covariance matrix.

Because the prior and posterior distributions are the same family, we say the inverse Wishart distribution is conjugate to the multivariate Gaussian.

[edit] Moments

The following is based on Press, S. J. (1982) "Applied Multivariate Analysis", 2nd ed. (Dover Publications, New York), after reparameterizing the degree of freedom to be consistent with the p.d.f. definition above.

The mean:


E(\mathbf B) = \frac{\mathbf\Psi}{m-p-1}.

The variance of each element of \mathbf{B}:


\mbox{var}(b_{ij}) = \frac{(m-p+1)\psi_{ij}^2 + (m-p-1)\psi_{ii}\psi_{jj}}
{(m-p)(m-p-1)^2(m-p-3)}

The variance of the diagonal uses the same formula as above with i = j, which simplifies to:


\mbox{var}(b_{ii}) = \frac{2\psi_{ii}^2}{(m-p-1)^2(m-p-3)}.

[edit] Related distributions

A univariate specialization of the inverse-Wishart distribution is the inverse-gamma distribution. With p = 1 (i.e. univariate) and α = 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.

[edit] See also

[edit] References

  1. ^ Kanti V. Mardia, J. T. Kent and J. M. Bibby (1979). Multivariate Analysis. Academic Press. ISBN 0-12-471250-9.