Inverse-Wishart distribution
Notation | [math]\displaystyle{ \mathcal{W}^{-1}({\mathbf\Psi},\nu) }[/math] | ||
---|---|---|---|
Parameters |
[math]\displaystyle{ \nu \gt p-1 }[/math] degrees of freedom (real) [math]\displaystyle{ \mathbf{\Psi} \gt 0 }[/math], [math]\displaystyle{ p\times p }[/math] scale matrix (pos. def.) | ||
Support | [math]\displaystyle{ \mathbf{X} }[/math] is p × p positive definite | ||
[math]\displaystyle{ \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})} }[/math]
| |||
Mean | [math]\displaystyle{ \frac{\mathbf{\Psi}}{\nu - p - 1} }[/math]For [math]\displaystyle{ \nu \gt p + 1 }[/math] | ||
Mode | [math]\displaystyle{ \frac{\mathbf{\Psi}}{\nu + p + 1} }[/math][1]:406 | ||
Variance | see below |
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 [math]\displaystyle{ \mathbf{X} }[/math] follows an inverse Wishart distribution, denoted as [math]\displaystyle{ \mathbf{X}\sim \mathcal{W}^{-1}(\mathbf\Psi,\nu) }[/math], if its inverse [math]\displaystyle{ \mathbf{X}^{-1} }[/math] has a Wishart distribution [math]\displaystyle{ \mathcal{W}(\mathbf \Psi^{-1}, \nu) }[/math]. Important identities have been derived for the inverse-Wishart distribution.[2]
Density
The probability density function of the inverse Wishart is:[3]
- [math]\displaystyle{ 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})} }[/math]
where [math]\displaystyle{ \mathbf{X} }[/math] and [math]\displaystyle{ {\mathbf\Psi} }[/math] are [math]\displaystyle{ p\times p }[/math] positive definite matrices, [math]\displaystyle{ | \cdot | }[/math] is the determinant, and Γp(·) is the multivariate gamma function.
Theorems
Distribution of the inverse of a Wishart-distributed matrix
If [math]\displaystyle{ {\mathbf X}\sim \mathcal{W}({\mathbf\Sigma},\nu) }[/math] and [math]\displaystyle{ {\mathbf\Sigma} }[/math] is of size [math]\displaystyle{ p \times p }[/math], then [math]\displaystyle{ \mathbf{A}={\mathbf X}^{-1} }[/math] has an inverse Wishart distribution [math]\displaystyle{ \mathbf{A}\sim \mathcal{W}^{-1}({\mathbf\Sigma}^{-1},\nu) }[/math] .[4]
Marginal and conditional distributions from an inverse Wishart-distributed matrix
Suppose [math]\displaystyle{ {\mathbf A}\sim \mathcal{W}^{-1}({\mathbf\Psi},\nu) }[/math] has an inverse Wishart distribution. Partition the matrices [math]\displaystyle{ {\mathbf A} }[/math] and [math]\displaystyle{ {\mathbf\Psi} }[/math] conformably with each other
- [math]\displaystyle{ {\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} }[/math]
where [math]\displaystyle{ {\mathbf A_{ij}} }[/math] and [math]\displaystyle{ {\mathbf \Psi_{ij}} }[/math] are [math]\displaystyle{ p_{i}\times p_{j} }[/math] matrices, then we have
- [math]\displaystyle{ \mathbf A_{11} }[/math] is independent of [math]\displaystyle{ \mathbf A_{11}^{-1} \mathbf A_{12} }[/math] and [math]\displaystyle{ {\mathbf A}_{22\cdot 1} }[/math], where [math]\displaystyle{ {\mathbf A_{22\cdot 1}} = {\mathbf A}_{22} - {\mathbf A}_{21}{\mathbf A}_{11}^{-1}{\mathbf A}_{12} }[/math] is the Schur complement of [math]\displaystyle{ {\mathbf A_{11} } }[/math] in [math]\displaystyle{ {\mathbf A} }[/math];
- [math]\displaystyle{ {\mathbf A_{11} } \sim \mathcal{W}^{-1}({\mathbf \Psi_{11} }, \nu-p_{2}) }[/math];
- [math]\displaystyle{ {\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}) }[/math], where [math]\displaystyle{ MN_{p\times q}(\cdot,\cdot) }[/math] is a matrix normal distribution;
- [math]\displaystyle{ {\mathbf A}_{22\cdot 1} \sim \mathcal{W}^{-1}({\mathbf \Psi}_{22\cdot 1}, \nu) }[/math], where [math]\displaystyle{ {\mathbf \Psi_{22\cdot 1}} = {\mathbf \Psi}_{22} - {\mathbf \Psi}_{21}{\mathbf \Psi}_{11}^{-1}{\mathbf \Psi}_{12} }[/math];
Conjugate distribution
Suppose we wish to make inference about a covariance matrix [math]\displaystyle{ {\mathbf{\Sigma}} }[/math] whose prior [math]\displaystyle{ {p(\mathbf{\Sigma})} }[/math] has a [math]\displaystyle{ \mathcal{W}^{-1}({\mathbf\Psi},\nu) }[/math] distribution. If the observations [math]\displaystyle{ \mathbf{X}=[\mathbf{x}_1,\ldots,\mathbf{x}_n] }[/math] are independent p-variate Gaussian variables drawn from a [math]\displaystyle{ N(\mathbf{0},{\mathbf \Sigma}) }[/math] distribution, then the conditional distribution [math]\displaystyle{ {p(\mathbf{\Sigma}\mid\mathbf{X})} }[/math] has a [math]\displaystyle{ \mathcal{W}^{-1}({\mathbf A}+{\mathbf\Psi},n+\nu) }[/math] distribution, where [math]\displaystyle{ {\mathbf{A}}=\mathbf{X}\mathbf{X}^T }[/math].
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 [math]\displaystyle{ \mathbf{\Sigma} }[/math], using the formula [math]\displaystyle{ p(x) = \frac{ p(x | \Sigma) p(\Sigma)}{p(\Sigma | x)} }[/math] and the linear algebra identity [math]\displaystyle{ v^T \Omega v = \text{tr}( \Omega v v^T) }[/math]:
- [math]\displaystyle{ 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})} }[/math]
(this is useful because the variance matrix [math]\displaystyle{ \mathbf{\Sigma} }[/math] is not known in practice, but because [math]\displaystyle{ {\mathbf\Psi} }[/math] is known a priori, and [math]\displaystyle{ {\mathbf A} }[/math] 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.[5]
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 [math]\displaystyle{ W \sim \mathcal{W}(\mathbf \Psi^{-1}, \nu) }[/math] with [math]\displaystyle{ \nu \ge p }[/math] and [math]\displaystyle{ X \doteq W^{-1} }[/math], so that [math]\displaystyle{ X \sim \mathcal{W}^{-1}(\mathbf \Psi, \nu) }[/math].
The mean:[4]:85
- [math]\displaystyle{ \operatorname E(\mathbf X) = \frac{\mathbf\Psi}{\nu-p-1}. }[/math]
The variance of each element of [math]\displaystyle{ \mathbf{X} }[/math]:
- [math]\displaystyle{ \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)} }[/math]
The variance of the diagonal uses the same formula as above with [math]\displaystyle{ i=j }[/math], which simplifies to:
- [math]\displaystyle{ \operatorname{Var}(x_{ii}) = \frac{2\psi_{ii}^2}{(\nu-p-1)^2(\nu-p-3)}. }[/math]
The covariance of elements of [math]\displaystyle{ \mathbf{X} }[/math] are given by:
- [math]\displaystyle{ \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)} }[/math]
The same results are expressed in Kronecker product form by von Rosen[6] as follows:
- [math]\displaystyle{ \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} }[/math]
where
- [math]\displaystyle{ \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} }[/math]
- [math]\displaystyle{ K_{pp} \text{ is a } p^2 \times p^2 }[/math] commutation matrix
- [math]\displaystyle{ \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 ). }[/math]
There appears to be a typo in the paper whereby the coefficient of [math]\displaystyle{ K_{pp} \Psi \otimes \Psi }[/math] is given as [math]\displaystyle{ c_1 }[/math] rather than [math]\displaystyle{ c_2 }[/math], and that the expression for the mean square inverse Wishart, corollary 3.1, should read
- [math]\displaystyle{ \mathbf{E} \left [ W^{-1} W^{-1} \right ] = (c_1+c_2) \Sigma^{-1} \Sigma^{-1} + c_2 \Sigma^{-1} \mathbf{tr}(\Sigma^{-1}). }[/math]
To show how the interacting terms become sparse when the covariance is diagonal, let [math]\displaystyle{ \Psi = \mathbf I_{3 \times 3} }[/math] and introduce some arbitrary parameters [math]\displaystyle{ u, v, w }[/math]:
- [math]\displaystyle{ \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. }[/math]
where [math]\displaystyle{ \mathrm{vec} }[/math] denotes the matrix vectorization operator. Then the second moment matrix becomes
- [math]\displaystyle{ \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} }[/math]
which is non-zero only when involving the correlations of diagonal elements of [math]\displaystyle{ W^{-1} }[/math], all other elements are mutually uncorrelated, though not necessarily statistically independent. The variances of the Wishart product are also obtained by Cook et al.[7] in the singular case and, by extension, to the full rank case.
Muirhead[8] shows in Theorem 3.2.5 that if [math]\displaystyle{ A }[/math] is distributed as [math]\displaystyle{ \mathcal{W}_m (n,\Sigma ) }[/math] and [math]\displaystyle{ V }[/math] is a random vector, independent of [math]\displaystyle{ A }[/math], then [math]\displaystyle{ \frac { V^T \Sigma^{-1} V }{ V^T A^{-1} V } \sim \chi^2_{n-m+1} }[/math] and it follows that [math]\displaystyle{ \frac { V^T A^{-1} V }{ V^T \Sigma^{-1} V } }[/math] follows an Inverse-chi-squared distribution. Setting [math]\displaystyle{ V= (1,\,0, \cdots ,0)^T }[/math] the marginal distribution of the leading diagonal element is thus
- [math]\displaystyle{ \frac { [ A^{-1} ]_{1,1} }{ [ \Sigma^{-1}]_{1,1} } \sim \text{Inv-}\chi^2( n-m+1) = \frac{2^{-k/2}}{\Gamma(k/2)} x^{-k/2-1} e^{-1/(2 x)}, \;\; k = n-m+1 }[/math]
and by rotating [math]\displaystyle{ V }[/math] end-around a similar result applies to all diagonal elements [math]\displaystyle{ [ A^{-1} ]_{i,i} }[/math].
A corresponding result in the complex Wishart case was shown by Brennan and Reed[9] and the uncorrelated inverse complex Wishart [math]\displaystyle{ \mathcal{W_C}^{-1}(\mathbf{I},\nu,p) }[/math] was shown by Shaman[10] to have diagonal statistical structure in which the leading diagonal elements are correlated, while all other element are uncorrelated.
Related distributions
- A univariate specialization of the inverse-Wishart distribution is the inverse-gamma distribution. With [math]\displaystyle{ p=1 }[/math] (i.e. univariate) and [math]\displaystyle{ \alpha = \nu/2 }[/math], [math]\displaystyle{ \beta = \mathbf{\Psi}/2 }[/math] and [math]\displaystyle{ x=\mathbf{X} }[/math] the probability density function of the inverse-Wishart distribution becomes matrix
- [math]\displaystyle{ p(x\mid\alpha, \beta) = \frac{\beta^\alpha\, x^{-\alpha-1} \exp(-\beta/x)}{\Gamma_1(\alpha)}. }[/math]
- i.e., the inverse-gamma distribution, where [math]\displaystyle{ \Gamma_1(\cdot) }[/math] is the ordinary Gamma function.
- The Inverse Wishart distribution is a special case of the inverse matrix gamma distribution when the shape parameter [math]\displaystyle{ \alpha = \frac{\nu}{2} }[/math] and the scale parameter [math]\displaystyle{ \beta =2 }[/math].
- Another generalization has been termed the generalized inverse Wishart distribution, [math]\displaystyle{ \mathcal{GW}^{-1} }[/math]. A [math]\displaystyle{ p \times p }[/math] positive definite matrix [math]\displaystyle{ \mathbf{X} }[/math] is said to be distributed as [math]\displaystyle{ \mathcal{GW}^{-1}(\mathbf{\Psi},\nu,\mathbf{S}) }[/math] if [math]\displaystyle{ \mathbf{Y} = \mathbf{X}^{1/2}\mathbf{S}^{-1}\mathbf{X}^{1/2} }[/math] is distributed as [math]\displaystyle{ \mathcal{W}^{-1}(\mathbf{\Psi},\nu) }[/math]. Here [math]\displaystyle{ \mathbf{X}^{1/2} }[/math] denotes the symmetric matrix square root of [math]\displaystyle{ \mathbf{X} }[/math], the parameters [math]\displaystyle{ \mathbf{\Psi},\mathbf{S} }[/math] are [math]\displaystyle{ p \times p }[/math] positive definite matrices, and the parameter [math]\displaystyle{ \nu }[/math] is a positive scalar larger than [math]\displaystyle{ 2p }[/math]. Note that when [math]\displaystyle{ \mathbf{S} }[/math] is equal to an identity matrix, [math]\displaystyle{ \mathcal{GW}^{-1}(\mathbf{\Psi},\nu,\mathbf{S}) = \mathcal{W}^{-1}(\mathbf{\Psi},\nu) }[/math]. This generalized inverse Wishart distribution has been applied to estimating the distributions of multivariate autoregressive processes.[11]
- 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, [math]\displaystyle{ \mathcal{\Psi} = \mathbf{I}, \text{ and } \mathcal{\Phi} }[/math] is an arbitrary orthogonal matrix, replacement of [math]\displaystyle{ \mathbf{X} }[/math] by [math]\displaystyle{ {\Phi} \mathbf{X} \mathcal{\Phi}^T }[/math] does not change the pdf of [math]\displaystyle{ \mathbf{X} }[/math] so [math]\displaystyle{ \mathcal{W}^{-1}(\mathbf{I},\nu,p) }[/math] belongs to the family of spherically invariant random processes (SIRPs) in some sense.[clarification needed]
- Thus, an arbitrary p-vector [math]\displaystyle{ V }[/math] with [math]\displaystyle{ l_2 }[/math] length [math]\displaystyle{ V^TV = 1 }[/math] can be rotated into the vector [math]\displaystyle{ \mathbf{\Phi}V = [1 \; 0 \; 0 \cdots]^T }[/math] without changing the pdf of [math]\displaystyle{ V^T \mathbf{X} V }[/math], moreover [math]\displaystyle{ \mathbf{\Phi} }[/math] can be a permutation matrix which exchanges diagonal elements. It follows that the diagonal elements of [math]\displaystyle{ \mathbf{X} }[/math] are identically inverse chi squared distributed, with pdf [math]\displaystyle{ f_{x_{11}} }[/math] 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,[12] where it is expressed in the inverse form [math]\displaystyle{ \frac{V^T \mathbf{\Psi} V}{V^T \mathbf {X} V} \sim \chi^2_{\nu-p+1} }[/math].
See also
- Inverse matrix gamma distribution
- Matrix normal distribution
- Wishart distribution
- Complex inverse Wishart distribution
References
- ↑ A. O'Hagan, and J. J. Forster (2004). Kendall's Advanced Theory of Statistics: Bayesian Inference. 2B (2 ed.). Arnold. ISBN 978-0-340-80752-1.
- ↑ Haff, LR (1979). "An identity for the Wishart distribution with applications". Journal of Multivariate Analysis 9 (4): 531–544. doi:10.1016/0047-259x(79)90056-3.
- ↑ Gelman, Andrew; Carlin, John B.; Stern, Hal S.; Dunson, David B.; Vehtari, Aki; Rubin, Donald B. (2013-11-01) (in en). Bayesian Data Analysis, Third Edition (3rd ed.). Boca Raton: Chapman and Hall/CRC. ISBN 9781439840955.
- ↑ 4.0 4.1 Kanti V. Mardia, J. T. Kent and J. M. Bibby (1979). Multivariate Analysis. Academic Press. ISBN 978-0-12-471250-8.
- ↑ Shahrokh Esfahani, Mohammad; Dougherty, Edward (2014). "Incorporation of Biological Pathway Knowledge in the Construction of Priors for Optimal Bayesian Classification". IEEE Transactions on Bioinformatics and Computational Biology 11 (1): 202–218. doi:10.1109/tcbb.2013.143. PMID 26355519.
- ↑ Rosen, Dietrich von (1988). "Moments for the Inverted Wishart Distribution". Scand. J. Stat. 15: 97–109.
- ↑ Cook, R D; Forzani, Liliana (August 2019). "On the mean and variance of the generalized inverse of a singular Wishart matrix". Electronic Journal of Statistics 5. doi:10.4324/9780429344633. ISBN 9780429344633. https://www.researchgate.net/publication/254211710.
- ↑ Muirhead, Robb (1982) (in English). Aspects of Multivariate Statistical Theory. USA: Wiley. pp. 98. ISBN 0-471-76985-1.
- ↑ Brennan, L E; Reed, I S (January 1982). "An Adaptive Array Signal Processing Algorithm for Communications". IEEE Transactions on Aerospace and Electronic Systems 18 (1): 120–130. doi:10.1109/TAES.1982.309212. Bibcode: 1982ITAES..18..124B.
- ↑ Shaman, Paul (1980). "The Inverted Complex Wishart Distribution and Its Application to Spectral Estimation". Journal of Multivariate Analysis 10: 51–59. doi:10.1016/0047-259X(80)90081-0. https://core.ac.uk/download/pdf/82734186.pdf.
- ↑ Triantafyllopoulos, K. (2011). "Real-time covariance estimation for the local level model". Journal of Time Series Analysis 32 (2): 93–107. doi:10.1111/j.1467-9892.2010.00686.x.
- ↑ Bodnar, T.; Mazur, S.; Podgórski, K. (January 2015). "Singular Inverse Wishart Distribution with Application to Portfolio Theory". Department of Statistics, Lund University (Working Papers in Statistics; Nr. 2): 1–17. https://journals.lub.lu.se/stat/article/download/15033/13602/.
Original source: https://en.wikipedia.org/wiki/Inverse-Wishart distribution.
Read more |