Template:Short description Template:Probability distribution{2^{(np)/2}|{\mathbf V}|^{n/2}\Gamma_p(\frac n 2)} </math>

| cdf        =
| mean       =<math>\operatorname{E}[\mathbf {\mathbf X}]=n{\mathbf V}</math>|
| median     =
| mode       =Template:Math for Template:Math
| variance   =<math>\operatorname{Var}(\mathbf{X}_{ij}) = n \left (v_{ij}^2+v_{ii}v_{jj} \right )</math>
| skewness   =
| kurtosis   =
| entropy    =see below
| mgf        =
| char       =<math>\Theta \mapsto \left|{\mathbf I} - 2i\,{\mathbf\Theta}{\mathbf V}\right|^{-\frac{n}{2}}</math>

}}

In statistics, the Wishart distribution is a generalization of the gamma distribution to multiple dimensions. It is named in honor of John Wishart, who first formulated the distribution in 1928.<ref name=Wishart>Template:Cite journal</ref> Other names include Wishart ensemble (in random matrix theory, probability distributions over matrices are usually called "ensembles"), or Wishart–Laguerre ensemble (since its eigenvalue distribution involve Laguerre polynomials), or LOE, LUE, LSE (in analogy with GOE, GUE, GSE).<ref>Template:Citation</ref>

It is a family of probability distributions defined over symmetric, positive-definite random matrices (i.e. matrix-valued random variables). These distributions are of great importance in the estimation of covariance matrices in multivariate statistics. In Bayesian statistics, the Wishart distribution is the conjugate prior of the inverse covariance-matrix of a multivariate-normal random vector.<ref>Template:Cite journal</ref>

DefinitionEdit

Suppose Template:Mvar is a Template:Math matrix, each column of which is independently drawn from a [[multivariate normal distribution|Template:Mvar-variate normal distribution]] with zero mean:

<math>G = (g_i^1,\dots,g_i^n) \sim \mathcal{N}_p(0,V).</math>

Then the Wishart distribution is the probability distribution of the Template:Math random matrix <ref>Template:Cite book</ref>

<math>S= G G^T = \sum_{i=1}^n g_{i}g_{i}^T</math>

known as the scatter matrix. One indicates that Template:Mvar has that probability distribution by writing

<math>S\sim W_p(V,n).</math>

The positive integer Template:Mvar is the number of degrees of freedom. Sometimes this is written Template:Math. For Template:Math the matrix Template:Mvar is invertible with probability Template:Math if Template:Mvar is invertible.

If Template:Math then this distribution is a chi-squared distribution with Template:Mvar degrees of freedom.

OccurrenceEdit

The Wishart distribution arises as the distribution of the sample covariance matrix for a sample from a multivariate normal distribution. It occurs frequently in likelihood-ratio tests in multivariate statistical analysis. It also arises in the spectral theory of random matricesTemplate:Citation needed and in multidimensional Bayesian analysis.<ref>Template:Cite book</ref> It is also encountered in wireless communications, while analyzing the performance of Rayleigh fading MIMO wireless channels .<ref>Template:Cite journal</ref>

Probability density functionEdit

File:Spectral density of Wishart-Laguerre ensemble (8, 15).png
Spectral density of Wishart-Laguerre ensemble with dimensions (8, 15). A reconstruction of Figure 1 of <ref>Template:Cite journal</ref>.

The Wishart distribution can be characterized by its probability density function as follows:

Let Template:Math be a Template:Math symmetric matrix of random variables that is positive semi-definite. Let Template:Math be a (fixed) symmetric positive definite matrix of size Template:Math.

Then, if Template:Math, Template:Math has a Wishart distribution with Template:Mvar degrees of freedom if it has the probability density function

<math> f_{\mathbf X} (\mathbf X) = \frac{1}{2^{np/2} \left|{\mathbf V}\right|^{n/2} \Gamma_p\left(\frac {n}{2}\right ) }{\left|\mathbf{X}\right|}^{(n-p-1)/2} e^{-\frac{1}{2}\operatorname{tr}({\mathbf V}^{-1}\mathbf{X})}</math>

where <math>\left|{\mathbf X}\right|</math> is the determinant of <math>\mathbf X</math> and Template:Math is the multivariate gamma function defined as

<math>\Gamma_p \left (\frac n 2 \right )= \pi^{p(p-1)/4}\prod_{j=1}^p \Gamma\left( \frac{n}{2} - \frac{j-1}{2} \right ).</math>

The density above is not the joint density of all the <math>p^2</math> elements of the random matrix Template:Math (such Template:Nowrap density does not exist because of the symmetry constrains <math>X_{ij}=X_{ji}</math>), it is rather the joint density of <math>p(p+1)/2</math> elements <math>X_{ij}</math> for <math>i\le j</math> (,<ref name=Wishart /> page 38). Also, the density formula above applies only to positive definite matrices <math>\mathbf x;</math> for other matrices the density is equal to zero.

Spectral densityEdit

The joint-eigenvalue density for the eigenvalues <math>\lambda_1,\dots , \lambda_p\ge 0</math> of a random matrix <math> \mathbf{X}\sim W_p(\mathbf{I},n)</math> is,<ref>Template:Cite book</ref><ref name="Anderson" />

<math>c_{n,p}e^{-\frac{1}{2}\sum_i\lambda_i}\prod \lambda_i^{(n-p-1)/2}\prod_{i<j}|\lambda_i-\lambda_j|</math>

where <math>c_{n,p}</math> is a constant.

In fact the above definition can be extended to any real Template:Math. If Template:Math, then the Wishart no longer has a density—instead it represents a singular distribution that takes values in a lower-dimension subspace of the space of Template:Math matrices.<ref name="Uhlig1994">Template:Cite journal</ref>

Use in Bayesian statisticsEdit

In Bayesian statistics, in the context of the multivariate normal distribution, the Wishart distribution is the conjugate prior to the precision matrix Template:Math, where Template:Math is the covariance matrix.<ref name="bishop"/>Template:Rp<ref>Template:Cite book</ref>

Choice of parametersEdit

The least informative, proper Wishart prior is obtained by setting Template:Math.Template:Citation needed

A common choice for V leverages the fact that the mean of X ~Wp(V, n) is nV. Then V is chosen so that nV equals an initial guess for X. For instance, when estimating a precision matrix Σ−1 ~ Wp(V, n) a reasonable choice for V would be n−1Σ0−1, where Σ0 is some prior estimate for the covariance matrix Σ.

PropertiesEdit

Log-expectationEdit

The following formula plays a role in variational Bayes derivations for Bayes networks involving the Wishart distribution. From equation (2.63),<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

<math>\operatorname{E}[\, \ln\left|\mathbf{X}\right|\, ] = \psi_p\left(\frac n 2\right) + p \, \ln(2) + \ln|\mathbf{V}|</math>

where <math>\psi_p</math> is the multivariate digamma function (the derivative of the log of the multivariate gamma function).

Log-varianceEdit

The following variance computation could be of help in Bayesian statistics:

<math>\operatorname{Var}\left[\, \ln\left|\mathbf{X}\right| \,\right]=\sum_{i=1}^p \psi_1\left(\frac{n+1-i} 2\right)</math>

where <math>\psi_1</math> is the trigamma function. This comes up when computing the Fisher information of the Wishart random variable.

EntropyEdit

The information entropy of the distribution has the following formula:<ref name="bishop"/>Template:Rp

<math>\operatorname{H}\left[\, \mathbf{X} \,\right] = -\ln \left( B(\mathbf{V},n) \right) -\frac{n-p-1}{2} \operatorname{E}\left[\, \ln\left|\mathbf{X}\right|\,\right] + \frac{np}{2}</math>

where Template:Math is the normalizing constant of the distribution:

<math>B(\mathbf{V},n) = \frac{1}{\left|\mathbf{V}\right|^{n/2} 2^{np/2}\Gamma_p\left(\frac n 2 \right)}.</math>

This can be expanded as follows:

<math>

\begin{align} \operatorname{H}\left[\, \mathbf{X}\, \right] & = \frac{n}{2} \ln \left|\mathbf{V}\right| +\frac{n p}{2} \ln 2 + \ln \Gamma_p \left(\frac{n}{2} \right) - \frac{n-p-1}{2} \operatorname{E}\left[\, \ln\left|\mathbf{X}\right|\, \right] + \frac{n p}{2} \\[8pt] &= \frac{n}{2} \ln\left|\mathbf{V}\right| + \frac{n p}{2} \ln 2 + \ln\Gamma_p\left(\frac{n}{2} \right) - \frac{n-p-1} 2 \left( \psi_p \left(\frac{n}{2}\right) + p\ln 2 + \ln\left|\mathbf{V}\right|\right) + \frac{n p}{2} \\[8pt] &= \frac{n}{2} \ln\left|\mathbf{V}\right| + \frac{n p}{2} \ln 2 + \ln\Gamma_p\left(\frac n 2\right)

- \frac{n-p-1}{2} \psi_p\left(\frac n 2 \right) - \frac{n-p-1} 2 \left(p\ln 2 +\ln\left|\mathbf{V}\right| \right) + \frac{n p}{2} \\[8pt]

&= \frac{p+1}{2} \ln\left|\mathbf{V}\right| + \frac1 2 p(p+1) \ln 2 + \ln\Gamma_p\left(\frac n 2\right) - \frac{n-p-1}{2} \psi_p\left(\frac n 2 \right) + \frac{n p}{2} \end{align} </math>

Cross-entropyEdit

The cross-entropy of two Wishart distributions <math>p_0</math> with parameters <math>n_0, V_0</math> and <math>p_1</math> with parameters <math>n_1, V_1</math> is

<math>\begin{align}

H(p_0, p_1) &= \operatorname{E}_{p_0}[\, -\log p_1\, ]\\[8pt] &= \operatorname{E}_{p_0} \left[\, -\log \frac{\left|\mathbf{X}\right|^{(n_1 - p_1 - 1)/2} e^{-\operatorname{tr}(\mathbf{V}_1^{-1} \mathbf{X})/2}}{2^{n_1 p_1/2} \left|\mathbf{V}_1\right|^{n_1/2} \Gamma_{p_1}\left(\tfrac{n_1}{2}\right)} \right]\\[8pt] &= \tfrac{n_1 p_1} 2 \log 2 + \tfrac{n_1} 2 \log \left|\mathbf{V}_1\right| + \log \Gamma_{p_1}(\tfrac{n_1} 2) - \tfrac{n_1 - p_1 - 1} 2 \operatorname{E}_{p_0}\left[\, \log\left|\mathbf{X}\right|\, \right] + \tfrac{1}{2}\operatorname{E}_{p_0}\left[\, \operatorname{tr}\left(\,\mathbf{V}_1^{-1}\mathbf{X}\,\right) \, \right] \\[8pt] &= \tfrac{n_1 p_1}{2} \log 2 + \tfrac{n_1} 2 \log \left|\mathbf{V}_1\right| + \log \Gamma_{p_1}(\tfrac{n_1}{2}) - \tfrac{n_1 - p_1 - 1}{2} \left( \psi_{p_0}(\tfrac{n_0} 2) + p_0 \log 2 + \log \left|\mathbf{V}_0\right|\right)+ \tfrac{1}{2} \operatorname{tr}\left(\, \mathbf{V}_1^{-1} n_0 \mathbf{V}_0\, \right) \\[8pt] &=-\tfrac{n_1}{2} \log \left|\, \mathbf{V}_1^{-1} \mathbf{V}_0\, \right| + \tfrac{p_1+1} 2 \log \left|\mathbf{V}_0\right| + \tfrac{n_0} 2 \operatorname{tr}\left(\, \mathbf{V}_1^{-1} \mathbf{V}_0\right)+ \log \Gamma_{p_1}\left(\tfrac{n_1}{2}\right) - \tfrac{n_1 - p_1 - 1}{2} \psi_{p_0}(\tfrac{n_0}{2}) + \tfrac{n_1(p_1 - p_0)+p_0(p_1+1)}{2} \log 2 \end{align}</math>

Note that when <math>p_0=p_1</math> and <math>n_0=n_1</math> we recover the entropy.

KL-divergenceEdit

The Kullback–Leibler divergence of <math>p_1</math> from <math>p_0</math> is

<math>

\begin{align} D_{KL}(p_0 \| p_1) & = H(p_0, p_1) - H(p_0) \\[6pt]

& =-\frac{n_1} 2 \log |\mathbf{V}_1^{-1} \mathbf{V}_0|  + \frac{n_0}{2}(\operatorname{tr}(\mathbf{V}_1^{-1} \mathbf{V}_0) - p)+ \log \frac{\Gamma_p\left(\frac{n_1} 2 \right)}{\Gamma_p\left(\frac{n_0} 2 \right)} + \tfrac{n_0 - n_1 } 2 \psi_p\left(\frac{n_0} 2\right)

\end{align} </math>

Characteristic functionEdit

The characteristic function of the Wishart distribution is

<math>\Theta \mapsto \operatorname{E}\left[ \, \exp\left( \,i \operatorname{tr}\left(\,\mathbf{X}{\mathbf\Theta}\,\right)\,\right)\, \right] = \left|\, 1 - 2i\, {\mathbf\Theta}\,{\mathbf V}\, \right|^{-n/2} </math>

where Template:Math denotes expectation. (Here Template:Math is any matrix with the same dimensions as Template:Math, Template:Math indicates the identity matrix, and Template:Mvar is a square root of Template:Math).<ref name="Anderson">Template:Cite book</ref> Properly interpreting this formula requires a little care, because noninteger complex powers are multivalued; when Template:Mvar is noninteger, the correct branch must be determined via analytic continuation.<ref>Template:Cite arXiv</ref>

TheoremEdit

If a Template:Math random matrix Template:Math has a Wishart distribution with Template:Mvar degrees of freedom and variance matrix Template:Math — write <math>\mathbf{X}\sim\mathcal{W}_p({\mathbf V},m)</math> — and Template:Math is a Template:Math matrix of rank Template:Mvar, then <ref name="rao">Template:Cite book</ref>

<math>\mathbf{C}\mathbf{X}{\mathbf C}^T \sim \mathcal{W}_q\left({\mathbf C}{\mathbf V}{\mathbf C}^T,m\right).</math>

Corollary 1Edit

If Template:Math is a nonzero Template:Math constant vector, then:<ref name="rao"/>

<math>\sigma_z^{-2} \, {\mathbf z}^T\mathbf{X}{\mathbf z} \sim \chi_m^2.</math>

In this case, <math>\chi_m^2</math> is the chi-squared distribution and <math>\sigma_z^2={\mathbf z}^T{\mathbf V}{\mathbf z}</math> (note that <math>\sigma_z^2</math> is a constant; it is positive because Template:Math is positive definite).

Corollary 2Edit

Consider the case where Template:Math (that is, the Template:Mvar-th element is one and all others zero). Then corollary 1 above shows that

<math>\sigma_{jj}^{-1} \, w_{jj}\sim \chi^2_m</math>

gives the marginal distribution of each of the elements on the matrix's diagonal.

George Seber points out that the Wishart distribution is not called the “multivariate chi-squared distribution” because the marginal distribution of the off-diagonal elements is not chi-squared. Seber prefers to reserve the term multivariate for the case when all univariate marginals belong to the same family.<ref>Template:Cite book</ref>

Estimator of the multivariate normal distributionEdit

The Wishart distribution is the sampling distribution of the maximum-likelihood estimator (MLE) of the covariance matrix of a multivariate normal distribution.<ref>Template:Cite book</ref> A derivation of the MLE uses the spectral theorem.

Bartlett decompositionEdit

The Bartlett decomposition of a matrix Template:Math from a Template:Mvar-variate Wishart distribution with scale matrix Template:Math and Template:Mvar degrees of freedom is the factorization:

<math>\mathbf{X} = {\textbf L}{\textbf A}{\textbf A}^T{\textbf L}^T,</math>

where Template:Math is the Cholesky factor of Template:Math, and:

<math>\mathbf A = \begin{pmatrix}

c_1 & 0 & 0 & \cdots & 0\\ n_{21} & c_2 &0 & \cdots& 0 \\ n_{31} & n_{32} & c_3 & \cdots & 0\\ \vdots & \vdots & \vdots &\ddots & \vdots \\ n_{p1} & n_{p2} & n_{p3} &\cdots & c_p \end{pmatrix}</math>

where <math>c_i^2 \sim \chi^2_{n-i+1}</math> and Template:Math independently.<ref>Template:Cite book</ref> This provides a useful method for obtaining random samples from a Wishart distribution.<ref>Template:Cite journal</ref>

Marginal distribution of matrix elementsEdit

Let Template:Math be a Template:Math variance matrix characterized by correlation coefficient Template:Math and Template:Math its lower Cholesky factor:

<math>\mathbf{V} = \begin{pmatrix}

\sigma_1^2 & \rho \sigma_1 \sigma_2 \\ \rho \sigma_1 \sigma_2 & \sigma_2^2 \end{pmatrix}, \qquad \mathbf{L} = \begin{pmatrix} \sigma_1 & 0 \\ \rho \sigma_2 & \sqrt{1-\rho^2} \sigma_2 \end{pmatrix}</math>

Multiplying through the Bartlett decomposition above, we find that a random sample from the Template:Math Wishart distribution is

<math>\mathbf{X} = \begin{pmatrix}

\sigma_1^2 c_1^2 & \sigma_1 \sigma_2 \left (\rho c_1^2 + \sqrt{1-\rho^2} c_1 n_{21} \right ) \\ \sigma_1 \sigma_2 \left (\rho c_1^2 + \sqrt{1-\rho^2} c_1 n_{21} \right ) & \sigma_2^2 \left(\left (1-\rho^2 \right ) c_2^2 + \left (\sqrt{1-\rho^2} n_{21} + \rho c_1 \right )^2 \right) \end{pmatrix}</math>

The diagonal elements, most evidently in the first element, follow the Template:Math distribution with Template:Mvar degrees of freedom (scaled by Template:Math) as expected. The off-diagonal element is less familiar but can be identified as a normal variance-mean mixture where the mixing density is a Template:Math distribution. The corresponding marginal probability density for the off-diagonal element is therefore the variance-gamma distribution

<math>f(x_{12}) = \frac{\left | x_{12} \right |^{\frac{n-1}{2}}}{\Gamma\left(\frac{n}{2}\right) \sqrt{2^{n-1} \pi \left (1-\rho^2 \right ) \left (\sigma_1 \sigma_2 \right )^{n+1}}} \cdot K_{\frac{n-1}{2}} \left(\frac{\left |x_{12} \right |}{\sigma_1 \sigma_2 \left (1-\rho^2 \right )}\right) \exp{\left(\frac{\rho x_{12}}{\sigma_1 \sigma_2 (1-\rho^2)}\right)}</math>

where Template:Math is the modified Bessel function of the second kind.<ref>Template:Cite journal</ref> Similar results may be found for higher dimensions. In general, if <math>X</math> follows a Wishart distribution with parameters, <math>\Sigma, n</math>, then for <math> i \neq j </math>, the off-diagonal elements

<math> X_{ij} \sim \text{VG}(n, \Sigma_{ij}, (\Sigma_{ii} \Sigma_{jj} - \Sigma_{ij}^2)^{1/2}, 0)</math>. <ref>Template:Cite arXiv</ref>

It is also possible to write down the moment-generating function even in the noncentral case (essentially the nth power of Craig (1936)<ref>Template:Cite journal</ref> equation 10) although the probability density becomes an infinite sum of Bessel functions.

The range of the shape parameterEdit

It can be shown <ref>Template:Cite journal</ref> that the Wishart distribution can be defined if and only if the shape parameter Template:Math belongs to the set

<math>\Lambda_p:=\{0,\ldots,p-1\}\cup \left(p-1,\infty\right).</math>

This set is named after Simon Gindikin, who introduced it<ref>Template:Cite journal</ref> in the 1970s in the context of gamma distributions on homogeneous cones. However, for the new parameters in the discrete spectrum of the Gindikin ensemble, namely,

<math>\Lambda_p^*:=\{0, \ldots, p-1\},</math>

the corresponding Wishart distribution has no Lebesgue density.

Relationships to other distributionsEdit

See alsoEdit

Template:Colbegin

Template:Colend

ReferencesEdit

Template:Reflist

External linksEdit

Template:ProbDistributions