Inverse-Wishart distribution

{{short description|Probability distribution}}

{{Probability distribution |

name =Inverse-Wishart|

type =density|

pdf_image =|

cdf_image =|

notation = \mathcal{W}^{-1}({\mathbf\Psi},\nu)|

parameters = \nu > p-1 degrees of freedom (real)
\mathbf{\Psi} > 0, p\times p scale matrix (pos. def.)|

support =\mathbf{X} is p × p positive definite|

pdf =\frac{\left|\mathbf\Psi\right|^{\nu/2}}{2^{\nu p/2}\Gamma_p(\frac{\nu}{2})} \left|\mathbf{X}\right|^{-(\nu+p+1)/2}e^{-\frac{1}{2}\operatorname{tr}(\mathbf\Psi\mathbf{X}^{-1})}

|

cdf =|

mean = \frac{\mathbf{\Psi}}{\nu - p - 1}For \nu > p + 1|

median =|

mode = \frac{\mathbf{\Psi}}{\nu + p + 1}{{Cite book

| author = A. O'Hagan, and J. J. Forster

| title = Kendall's Advanced Theory of Statistics: Bayesian Inference

| volume = 2B

| edition = 2

| publisher = Arnold

| year = 2004

| isbn = 978-0-340-80752-1

}}{{rp|406}}|

variance =see below|

skewness =|

kurtosis =|

entropy =|

mgf =|

char =|

}}

In statistics, the inverse Wishart distribution, also called the inverted Wishart distribution, is a probability distribution defined on real-valued positive-definite matrices. In Bayesian statistics it is used as the conjugate prior for the covariance matrix of a multivariate normal distribution.

We say \mathbf{X} follows an inverse Wishart distribution, denoted as \mathbf{X}\sim \mathcal{W}^{-1}(\mathbf\Psi,\nu), if its inverse \mathbf{X}^{-1} has a Wishart distribution \mathcal{W}(\mathbf \Psi^{-1}, \nu) . Important identities have been derived for the inverse-Wishart distribution.{{cite journal|last1=Haff|first1=LR|title=An identity for the Wishart distribution with applications|journal=Journal of Multivariate Analysis|date=1979|volume=9|issue=4|pages=531–544|doi=10.1016/0047-259x(79)90056-3|doi-access=}}

Density

The probability density function of the inverse Wishart is:{{Cite book|title=Bayesian Data Analysis, Third Edition|last1=Gelman|first1=Andrew|last2=Carlin|first2=John B.|last3=Stern|first3=Hal S.|last4=Dunson|first4=David B.|last5=Vehtari|first5=Aki|last6=Rubin|first6=Donald B.|date=2013-11-01|publisher=Chapman and Hall/CRC|isbn=9781439840955|edition=3rd|location=Boca Raton|language=en}}

:

f_{\mathbf X}({\mathbf X}; {\mathbf \Psi}, \nu) = \frac{\left|{\mathbf\Psi}\right|^{\nu/2}}{2^{\nu p/2}\Gamma_p(\frac \nu 2)} \left|\mathbf{X}\right|^{-(\nu+p+1)/2} e^{-\frac{1}{2}\operatorname{tr}(\mathbf\Psi\mathbf{X}^{-1})}

where \mathbf{X} and {\mathbf\Psi} are p\times p positive definite matrices, | \cdot | is the determinant, and \Gamma_p(\cdot) is the multivariate gamma function.

Theorems

=Distribution of the inverse of a Wishart-distributed matrix=

If {\mathbf X}\sim \mathcal{W}({\mathbf\Sigma},\nu) and {\mathbf\Sigma} is of size p \times p, then \mathbf{A}={\mathbf X}^{-1} has an inverse Wishart distribution \mathbf{A}\sim \mathcal{W}^{-1}({\mathbf\Sigma}^{-1},\nu) .{{Cite book

| author = Kanti V. Mardia, J. T. Kent and J. M. Bibby

| title = Multivariate Analysis

| publisher = Academic Press

| year = 1979

| isbn = 978-0-12-471250-8

}}

=Marginal and conditional distributions from an inverse Wishart-distributed matrix=

Suppose {\mathbf A}\sim \mathcal{W}^{-1}({\mathbf\Psi},\nu) 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

  1. \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} ;
  2. {\mathbf A_{11} } \sim \mathcal{W}^{-1}({\mathbf \Psi_{11} }, \nu-p_{2}) ;
  3. {\mathbf A}_{11}^{-1} {\mathbf A}_{12} \mid {\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;

  1. {\mathbf A}_{22\cdot 1} \sim \mathcal{W}^{-1}({\mathbf \Psi}_{22\cdot 1}, \nu) , where {\mathbf \Psi_{22\cdot 1}} = {\mathbf \Psi}_{22} - {\mathbf \Psi}_{21}{\mathbf \Psi}_{11}^{-1}{\mathbf \Psi}_{12};

=Conjugate distribution=

Suppose we wish to make inference about a covariance matrix {\mathbf{\Sigma}} whose prior {p(\mathbf{\Sigma})} has a \mathcal{W}^{-1}({\mathbf\Psi},\nu) 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}\mid\mathbf{X})} has a \mathcal{W}^{-1}({\mathbf A}+{\mathbf\Psi},n+\nu) distribution, where {\mathbf{A}}=\mathbf{X}\mathbf{X}^T.

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

Due to its conjugacy to the multivariate Gaussian, it is possible to marginalize out (integrate out) the Gaussian's parameter \mathbf{\Sigma}, using the formula p(x) = \frac{ p(x | \Sigma) p(\Sigma)}{p(\Sigma | x)} and the linear algebra identity v^T \Omega v = \text{tr}( \Omega v v^T) :

: f_{\mathbf X\,\mid\,\Psi,\nu} (\mathbf x) = \int f_{\mathbf X\,\mid\,\mathbf\Sigma\,=\,\sigma}(\mathbf x) f_{\mathbf\Sigma\,\mid\,\mathbf\Psi,\nu} (\sigma)\,d\sigma = \frac{|\mathbf{\Psi}|^{\nu/2} \Gamma_p\left(\frac{\nu+n}{2}\right)}{\pi^{np/2}|\mathbf{\Psi}+\mathbf{A}|^{(\nu+n)/2} \Gamma_p(\frac{\nu}{2})}

(this is useful because the variance matrix \mathbf{\Sigma} is not known in practice, but because {\mathbf\Psi} is known a priori, and {\mathbf A} can be obtained from the data, the right hand side can be evaluated directly). The inverse-Wishart distribution as a prior can be constructed via existing transferred prior knowledge.{{cite journal|last1=Shahrokh Esfahani|first1=Mohammad|last2=Dougherty|first2=Edward|title=Incorporation of Biological Pathway Knowledge in the Construction of Priors for Optimal Bayesian Classification|journal= IEEE/ACM Transactions on Computational Biology and Bioinformatics|date=2014|volume=11|issue=1|pages=202–218|doi=10.1109/tcbb.2013.143|pmid=26355519|s2cid=10096507 }}

=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.

Let W \sim \mathcal{W}(\mathbf \Psi^{-1}, \nu) with \nu \ge p and X \doteq W^{-1}, so that X \sim \mathcal{W}^{-1}(\mathbf \Psi, \nu).

The mean, for \nu\geq p+2:{{rp|91}}

: \operatorname E(\mathbf X) = \frac{\mathbf\Psi}{\nu-p-1}.

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

:

\operatorname{Var}(x_{ij}) = \frac{(\nu-p+1)\psi_{ij}^2 + (\nu-p-1)\psi_{ii}\psi_{jj}}

{(\nu-p)(\nu-p-1)^2(\nu-p-3)}

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

:

\operatorname{Var}(x_{ii}) = \frac{2\psi_{ii}^2}{(\nu-p-1)^2(\nu-p-3)}.

The covariance of elements of \mathbf{X} are given by:

:

\operatorname{Cov}(x_{ij},x_{k\ell}) = \frac{2\psi_{ij}\psi_{k\ell} + (\nu-p-1) (\psi_{ik}\psi_{j\ell} + \psi_{i\ell} \psi_{kj})}{(\nu-p)(\nu-p-1)^2(\nu-p-3)}

The same results are expressed in Kronecker product form by von Rosen{{Cite journal|last=Rosen|first=Dietrich von|date=1988|title=Moments for the Inverted Wishart Distribution|journal=Scand. J. Stat.|volume=15|pages=97–109|jstor=}} as follows:

:

\begin{align}

\mathbf{E} \left ( W^{-1} \otimes W^{-1} \right ) & = c_1 \Psi \otimes \Psi

+ c_2 Vec (\Psi) Vec (\Psi)^T + c_2 K_{pp} \Psi \otimes \Psi \\

\mathbf{Cov}_\otimes \left ( W^{-1} ,W^{-1} \right ) & = (c_1 - c_3 ) \Psi \otimes \Psi

+ c_2 Vec (\Psi) Vec (\Psi)^T + c_2 K_{pp} \Psi \otimes \Psi

\end{align}

where

:

\begin{align}

c_2 & = \left [ (\nu-p)(\nu-p-1)(\nu-p-3) \right ]^{-1} \\

c_1 & = (\nu-p-2) c_2 \\

c_3 & = (\nu -p-1)^{-2},

\end{align}

:K_{pp} \text{ is a } p^2 \times p^2 commutation matrix

:

\mathbf{Cov}_\otimes \left ( W^{-1},W^{-1} \right ) = \mathbf{E} \left ( W^{-1} \otimes W^{-1} \right ) - \mathbf{E} \left ( W^{-1} \right ) \otimes \mathbf{E} \left ( W^{-1} \right ).

There appears to be a typo in the paper whereby the coefficient of K_{pp} \Psi \otimes \Psi is given as c_1 rather than c_2, and that the expression for the mean square inverse Wishart, corollary 3.1, should read

:

\mathbf{E} \left [ W^{-1} W^{-1} \right ] = (c_1+c_2) \Sigma^{-1} \Sigma^{-1} + c_2 \Sigma^{-1} \mathbf{tr}(\Sigma^{-1}).

To show how the interacting terms become sparse when the covariance is diagonal, let \Psi = \mathbf I_{3 \times 3} and introduce some arbitrary parameters u, v, w :

:

\mathbf{E} \left ( W^{-1} \otimes W^{-1} \right ) = u \Psi \otimes \Psi

+ v \, \mathrm{vec}(\Psi) \, \mathrm{vec}(\Psi)^T + w K_{pp} \Psi \otimes \Psi.

where \mathrm{vec} denotes the matrix vectorization operator. Then the second moment matrix becomes

:

\mathbf{E} \left ( W^{-1} \otimes W^{-1} \right ) = \begin{bmatrix}

u+v+w & \cdot & \cdot & \cdot & v & \cdot & \cdot & \cdot & v \\

\cdot & u & \cdot & w & \cdot & \cdot & \cdot & \cdot & \cdot \\

\cdot & \cdot & u & \cdot & \cdot & \cdot & w & \cdot & \cdot \\

\cdot & w & \cdot & u & \cdot & \cdot & \cdot & \cdot & \cdot \\

v & \cdot & \cdot & \cdot & u+v+w & \cdot & \cdot & \cdot & v \\

\cdot & \cdot & \cdot & \cdot & \cdot & u & \cdot & w & \cdot \\

\cdot & \cdot & w & \cdot & \cdot & \cdot & u & \cdot & \cdot \\

\cdot & \cdot & \cdot & \cdot & \cdot & w & \cdot & u & \cdot \\

v & \cdot & \cdot & \cdot & v & \cdot & \cdot & \cdot & u+v+w \\

\end{bmatrix}

which is non-zero only when involving the correlations of diagonal elements of W^{-1} , all other elements are mutually uncorrelated, though not necessarily statistically independent. The variances of the Wishart product are also obtained by Cook et al.{{Cite journal|last1=Cook|first1=R D|last2=Forzani|first2=Liliana|author2-link= Liliana Forzani |editor-first1=Brian |editor-last1=Cook |date=August 2019|title=On the mean and variance of the generalized inverse of a singular Wishart matrix|url=https://www.researchgate.net/publication/254211710|journal=Electronic Journal of Statistics|volume=5|doi=10.4324/9780429344633 |isbn=9780429344633 |s2cid=146200569 }} in the singular case and, by extension, to the full rank case.

Muirhead{{Cite book |last=Muirhead |first=Robb |title=Aspects of Multivariate Statistical Theory |publisher=Wiley |year=1982 |isbn=0-471-76985-1 |location=USA |pages=93 |language=English}} shows in Theorem 3.2.8 that if A^{p \times p} is distributed as \mathcal{W}_p (\nu,\Sigma ) and V is an arbitrary vector, independent of A then V^T A V \sim \mathcal{ W }_1(\nu, A^T \Sigma A) and \frac { V^T A V }{ V^T \Sigma V } \sim \chi^2_{\nu-1} , one degree of freedom being relinquished by estimation of the sample mean in the latter. Similarly, Bodnar et.al. further find that \frac { V^T A^{-1} V }{ V^T \Sigma^{-1} V } \sim \text{Inv-}\chi^2_{\nu - p + 1} and setting V= (1,\,0, \cdots ,0)^T the marginal distribution of the leading diagonal element is thus

: \frac { [ A^{-1} ]_{1,1} }{ [ \Sigma^{-1}]_{1,1} } \sim \frac{2^{-k/2}}{\Gamma(k/2)} x^{-k/2-1} e^{-1/(2 x)}, \;\; k = \nu - p + 1

and by rotating V end-around a similar result applies to all diagonal elements [ A^{-1} ]_{i,i} .

A corresponding result in the complex Wishart case was shown by Brennan and Reed{{Cite journal|last1=Brennan|first1=L E|last2=Reed|first2=I S|date=January 1982|title=An Adaptive Array Signal Processing Algorithm for Communications|journal= IEEE Transactions on Aerospace and Electronic Systems|volume=18 |issue=1|pages=120–130|doi=10.1109/TAES.1982.309212 |bibcode=1982ITAES..18..124B |s2cid=45721922 }} and the uncorrelated inverse complex Wishart \mathcal{W_C}^{-1}(\mathbf{I},\nu,p) was shown by Shaman{{Cite journal |last=Shaman |first=Paul |date=1980 |title=The Inverted Complex Wishart Distribution and Its Application to Spectral Estimation |url=https://core.ac.uk/download/pdf/82734186.pdf |journal=Journal of Multivariate Analysis |volume=10 |pages=51–59 |doi=10.1016/0047-259X(80)90081-0}} to have diagonal statistical structure in which the leading diagonal elements are correlated, while all other element are uncorrelated.

Related distributions

::

p(x\mid\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.

  • The Inverse Wishart distribution is a special case of the inverse matrix gamma distribution when the shape parameter \alpha = \frac{\nu}{2} and the scale parameter \beta =2 .
  • Another generalization has been termed the generalized inverse Wishart distribution, \mathcal{GW}^{-1}. A p \times p positive definite matrix \mathbf{X} is said to be distributed as \mathcal{GW}^{-1}(\mathbf{\Psi},\nu,\mathbf{S}) if \mathbf{Y} = \mathbf{X}^{1/2}\mathbf{S}^{-1}\mathbf{X}^{1/2} is distributed as \mathcal{W}^{-1}(\mathbf{\Psi},\nu). Here \mathbf{X}^{1/2} denotes the symmetric matrix square root of \mathbf{X}, the parameters \mathbf{\Psi},\mathbf{S} are p \times p positive definite matrices, and the parameter \nu is a positive scalar larger than 2p. Note that when \mathbf{S} is equal to an identity matrix, \mathcal{GW}^{-1}(\mathbf{\Psi},\nu,\mathbf{S}) = \mathcal{W}^{-1}(\mathbf{\Psi},\nu). This generalized inverse Wishart distribution has been applied to estimating the distributions of multivariate autoregressive processes.{{Cite journal | last1 = Triantafyllopoulos | first1 = K. | title = Real-time covariance estimation for the local level model | doi = 10.1111/j.1467-9892.2010.00686.x | journal = Journal of Time Series Analysis | volume = 32 | issue = 2 | pages = 93–107 | year = 2011 | arxiv = 1311.0634 | s2cid = 88512953 }}
  • A different type of generalization is the normal-inverse-Wishart distribution, essentially the product of a multivariate normal distribution with an inverse Wishart distribution.
  • When the scale matrix is an identity matrix, \mathcal{\Psi} = \mathbf{I}, and \mathcal{\Phi} is an arbitrary orthogonal matrix, replacement of \mathbf{X} by {\Phi} \mathbf{X} \mathcal{\Phi}^T does not change the pdf of \mathbf{X} so \mathcal{W}^{-1}(\mathbf{I},\nu,p) belongs to the family of spherically invariant random processes (SIRPs) in some sense.{{clarify|date=March 2022}}

: Thus, an arbitrary p-vector V with l_2 length V^TV = 1 can be rotated into the vector \mathbf{\Phi}V = [1 \; 0 \; 0 \cdots]^T without changing the pdf of V^T \mathbf{X} V , moreover \mathbf{\Phi} can be a permutation matrix which exchanges diagonal elements. It follows that the diagonal elements of \mathbf{X} are identically inverse chi squared distributed, with pdf f_{x_{11}} in the previous section though they are not mutually independent. The result is known in optimal portfolio statistics, as in Theorem 2 Corollary 1 of Bodnar et al,{{Cite journal|last1=Bodnar|first1=T.|last2=Mazur|first2=S.|last3=Podgórski|first3=K.|date=January 2015|title=Singular Inverse Wishart Distribution with Application to Portfolio Theory|url=https://journals.lub.lu.se/stat/article/download/15033/13602/|journal=Department of Statistics, Lund University|volume=(Working Papers in Statistics; Nr. 2)|pages=1–17}} where it is expressed in the inverse form \frac{V^T \mathbf{\Psi} V}{V^T \mathbf {X} V} \sim \chi^2_{\nu-p+1} .

  • As is the case with the Wishart distribution linear transformations of the distribution yield a modified inverse Wishart distribution. If \mathbf{X^{p \times p }} \sim \mathcal{W}^{-1}_p\left({\mathbf \Psi}, \nu \right). and {\mathbf \Theta}^{p \times p} are full rank matrices then{{Cite journal |last1=Bodnar |first1=T |last2=Mazur |first2=S |last3=Podgorski |first3=K |date=2015 |title=Singular Inverse Wishart Distribution with Application to Portfolio Theory |url=https://www.sciencedirect.com/science/article/pii/S0047259X15002353 |journal=Journal of Multivariate Analysis |volume=143 |pages=314–326|doi=10.1016/j.jmva.2015.09.021 }} \mathbf{\Theta}\mathbf{X}{\mathbf \Theta}^T \sim \mathcal{W}^{-1}_p\left({\mathbf \Theta}{\mathbf \Psi } {\mathbf \Theta}^T, \nu \right).
  • If \mathbf{X^{p \times p }} \sim \mathcal{W}^{-1}_p\left({\mathbf \Psi}, \nu \right). and {\mathbf \Theta} ^{ m \times p } is m \times p , \; \; m < p of full rank m then \mathbf{\Theta}\mathbf{X}{\mathbf \Theta}^T \sim \mathcal{W}^{-1}_m \left({\mathbf \Theta}{\mathbf \Psi } {\mathbf \Theta}^T, \nu \right).

See also

References