Английская Википедия:Inverse-Wishart distribution
Шаблон:Short description Шаблон:Probability distribution{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>
- <math>\Gamma_p</math> is the multivariate gamma function
- <math>\operatorname{tr}</math> is the trace function
|
cdf =| mean = <math>\frac{\mathbf{\Psi}}{\nu - p - 1}</math>For <math>\nu > p + 1</math>| median =| mode = <math>\frac{\mathbf{\Psi}}{\nu + p + 1}</math>[1]Шаблон:Rp| 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 <math>\mathbf{X}</math> follows an inverse Wishart distribution, denoted as <math> \mathbf{X}\sim \mathcal{W}^{-1}(\mathbf\Psi,\nu)</math>, if its inverse <math> \mathbf{X}^{-1}</math> has a Wishart distribution <math> \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>
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>\mathbf{X}</math> and <math>{\mathbf\Psi}</math> are <math>p\times p</math> positive definite matrices, <math>| \cdot |</math> is the determinant, and Γp(·) is the multivariate gamma function.
Theorems
Distribution of the inverse of a Wishart-distributed matrix
If <math>{\mathbf X}\sim \mathcal{W}({\mathbf\Sigma},\nu)</math> and <math>{\mathbf\Sigma}</math> is of size <math>p \times p</math>, then <math>\mathbf{A}={\mathbf X}^{-1}</math> has an inverse Wishart distribution <math>\mathbf{A}\sim \mathcal{W}^{-1}({\mathbf\Sigma}^{-1},\nu)</math> .[4]
Marginal and conditional distributions from an inverse Wishart-distributed matrix
Suppose <math>{\mathbf A}\sim \mathcal{W}^{-1}({\mathbf\Psi},\nu)</math> has an inverse Wishart distribution. Partition the matrices <math> {\mathbf A} </math> and <math> {\mathbf\Psi} </math> conformably with each other
- <math>
{\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>{\mathbf A_{ij}}</math> and <math>{\mathbf \Psi_{ij}} </math> are <math> p_{i}\times p_{j}</math> matrices, then we have
- <math> \mathbf A_{11} </math> is independent of <math> \mathbf A_{11}^{-1} \mathbf A_{12} </math> and <math> {\mathbf A}_{22\cdot 1} </math>, where <math>{\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> {\mathbf A_{11} } </math> in <math> {\mathbf A} </math>;
- <math> {\mathbf A_{11} } \sim \mathcal{W}^{-1}({\mathbf \Psi_{11} }, \nu-p_{2}) </math>;
- <math> {\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> MN_{p\times q}(\cdot,\cdot) </math> is a matrix normal distribution;
- <math> {\mathbf A}_{22\cdot 1} \sim \mathcal{W}^{-1}({\mathbf \Psi}_{22\cdot 1}, \nu) </math>, where <math>{\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>{\mathbf{\Sigma}}</math> whose prior <math>{p(\mathbf{\Sigma})}</math> has a <math>\mathcal{W}^{-1}({\mathbf\Psi},\nu)</math> distribution. If the observations <math>\mathbf{X}=[\mathbf{x}_1,\ldots,\mathbf{x}_n]</math> are independent p-variate Gaussian variables drawn from a <math>N(\mathbf{0},{\mathbf \Sigma})</math> distribution, then the conditional distribution <math>{p(\mathbf{\Sigma}\mid\mathbf{X})}</math> has a <math>\mathcal{W}^{-1}({\mathbf A}+{\mathbf\Psi},n+\nu)</math> distribution, where <math>{\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>\mathbf{\Sigma}</math>, using the formula <math> p(x) = \frac{ p(x | \Sigma) p(\Sigma)}{p(\Sigma | x)} </math> and the linear algebra identity <math> v^T \Omega v = \text{tr}( \Omega v v^T) </math>:
- <math>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>\mathbf{\Sigma}</math> is not known in practice, but because <math>{\mathbf\Psi}</math> is known a priori, and <math>{\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> W \sim \mathcal{W}(\mathbf \Psi^{-1}, \nu) </math> with <math> \nu \ge p </math> and <math> X \doteq W^{-1}</math>, so that <math> X \sim \mathcal{W}^{-1}(\mathbf \Psi, \nu)</math>.
- <math> \operatorname E(\mathbf X) = \frac{\mathbf\Psi}{\nu-p-1}.</math>
The variance of each element of <math>\mathbf{X}</math>:
- <math>
\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>i=j</math>, which simplifies to:
- <math>
\operatorname{Var}(x_{ii}) = \frac{2\psi_{ii}^2}{(\nu-p-1)^2(\nu-p-3)}. </math>
The covariance of elements of <math>\mathbf{X}</math> are given by:
- <math>
\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>
\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>
\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>K_{pp} \text{ is a } p^2 \times p^2 </math> commutation matrix
- <math>
\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> K_{pp} \Psi \otimes \Psi </math> is given as <math> c_1 </math> rather than <math> c_2</math>, and that the expression for the mean square inverse Wishart, corollary 3.1, should read
- <math>
\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> \Psi = \mathbf I_{3 \times 3} </math> and introduce some arbitrary parameters <math> u, v, w </math>:
- <math>
\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>\mathrm{vec}</math> denotes the matrix vectorization operator. Then the second moment matrix becomes
- <math>
\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> 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.8 that if <math> A^{p \times p} </math> is distributed as <math> \mathcal{W}_p (\nu,\Sigma ) </math> and <math> V </math> is an arbitrary vector, independent of <math> A </math> then <math> V^T A V \sim \mathcal{ W }_1(\nu, A^T \Sigma A) </math> and <math> \frac { V^T A V }{ V^T \Sigma V } \sim \chi^2_{\nu-1} </math>, one degree of freedom being relinquished by estimation of the sample mean in the latter. Similarly, Bodnar et.al. further find that <math> \frac { V^T A^{-1} V }{ V^T \Sigma^{-1} V } \sim \text{Inv-}\chi^2_{\nu - p + 1} </math> and setting <math> V= (1,\,0, \cdots ,0)^T </math> the marginal distribution of the leading diagonal element is thus
- <math> \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 </math>
and by rotating <math> V </math> end-around a similar result applies to all diagonal elements <math> [ 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> \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>p=1</math> (i.e. univariate) and <math>\alpha = \nu/2</math>, <math>\beta = \mathbf{\Psi}/2</math> and <math>x=\mathbf{X}</math> the probability density function of the inverse-Wishart distribution becomes matrix
- <math>
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>\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> \alpha = \frac{\nu}{2} </math> and the scale parameter <math> \beta =2 </math>.
- Another generalization has been termed the generalized inverse Wishart distribution, <math>\mathcal{GW}^{-1}</math>. A <math> p \times p</math> positive definite matrix <math>\mathbf{X}</math> is said to be distributed as <math>\mathcal{GW}^{-1}(\mathbf{\Psi},\nu,\mathbf{S})</math> if <math>\mathbf{Y} = \mathbf{X}^{1/2}\mathbf{S}^{-1}\mathbf{X}^{1/2}</math> is distributed as <math>\mathcal{W}^{-1}(\mathbf{\Psi},\nu)</math>. Here <math>\mathbf{X}^{1/2}</math> denotes the symmetric matrix square root of <math>\mathbf{X}</math>, the parameters <math>\mathbf{\Psi},\mathbf{S}</math> are <math> p \times p</math> positive definite matrices, and the parameter <math>\nu</math> is a positive scalar larger than <math>2p</math>. Note that when <math>\mathbf{S}</math> is equal to an identity matrix, <math>\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> \mathcal{\Psi} = \mathbf{I}, \text{ and } \mathcal{\Phi} </math> is an arbitrary orthogonal matrix, replacement of <math> \mathbf{X} </math> by <math> {\Phi} \mathbf{X} \mathcal{\Phi}^T </math> does not change the pdf of <math> \mathbf{X} </math> so <math> \mathcal{W}^{-1}(\mathbf{I},\nu,p) </math> belongs to the family of spherically invariant random processes (SIRPs) in some sense.Шаблон:Clarify
- Thus, an arbitrary p-vector <math> V </math> with <math>l_2</math> length <math>V^TV = 1</math> can be rotated into the vector <math> \mathbf{\Phi}V = [1 \; 0 \; 0 \cdots]^T </math> without changing the pdf of <math> V^T \mathbf{X} V </math>, moreover <math> \mathbf{\Phi} </math> can be a permutation matrix which exchanges diagonal elements. It follows that the diagonal elements of <math> \mathbf{X} </math> are identically inverse chi squared distributed, with pdf <math> 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> \frac{V^T \mathbf{\Psi} V}{V^T \mathbf {X} V} \sim \chi^2_{\nu-p+1} </math>.
- As is the case with the Wishart distribution linear transformations of the distribution yield a modified inverse Wishart distribution. If <math> \mathbf{X^{p \times p }} \sim \mathcal{W}^{-1}_p\left({\mathbf \Psi}, \nu \right).</math> and <math> {\mathbf \Theta}^{p \times p} </math> are full rank matrices then[13] <math>\mathbf{\Theta}\mathbf{X}{\mathbf \Theta}^T \sim \mathcal{W}^{-1}_p\left({\mathbf \Theta}{\mathbf \Psi } {\mathbf \Theta}^T, \nu \right).</math>
- If <math> \mathbf{X^{p \times p }} \sim \mathcal{W}^{-1}_p\left({\mathbf \Psi}, \nu \right).</math> and <math> {\mathbf \Theta} ^{ m \times p } </math> is <math> m \times p , \; \; m < p </math> of full rank '<math> m </math> then[13] <math>\mathbf{\Theta}\mathbf{X}{\mathbf \Theta}^T \sim \mathcal{W}^{-1}_m \left({\mathbf \Theta}{\mathbf \Psi } {\mathbf \Theta}^T, \nu \right).</math>
See also
- Inverse matrix gamma distribution
- Matrix normal distribution
- Wishart distribution
- Complex inverse Wishart distribution
References