# Validate Wikipedia formula for Wishart conditioned on a conjugate prior

In the Wikipedia entry for "Inverse-Wishart distribution" (current revision) there is a formula for a Wishart distribution conditioned on a conjugate prior ( $$\Psi,\nu$$) in which the original Wishart scale matrix $$\Sigma$$ has been integrated out to yield the conditional distribution

$$p(X\mid\Psi,\nu) = \frac { |\Psi|^{\nu/2}\Gamma_p( \frac {\nu + n}{2})}{\pi^{np/2} |\Psi+X^TX|^{(\nu+n)/2} \Gamma_p (\frac{\nu}{2})}$$
where $$A_{n\times n}$$ is the observed data $$X^TX$$.

This doesn't appear to be a valid Wishart distribution - which I think should be something more like

$$p(X) = \frac { |\Psi|^{\nu/2}\Gamma_p( \frac {\nu + n}{2})}{\pi^{np/2} |\Psi+A|^{(\nu+n)/2} \Gamma_p (\frac{\nu}{2})} \exp \Big [-\operatorname{tr} \Big ((\Psi +\Sigma)^{-1}A \Big) \Big].$$ So am I misunderstanding this and the formula is a partial result for illustration purposes only?

The distribution shown is not a Wishart distribution, it is a multivariate t-distribution. This is the marginal distribution of $$X$$ after integrating the covariance matrix out of the Gaussian sampling model. The expression may not be correct (I haven't checked carefully, but it doesn't look quite right). A good reference for the derivation is section 1.4.3 of the book Markov Chain Monte Carlo: Stochastic Simulation for Bayesian Inference by Gamerman and Lopes.
• The density given appears to have a typo (not clear if it intends to integrate over the prior or the posterior), but it is closer than it looks after applying the matrix determinant lemma to $|A + \Psi|$, to get $(1 + X^t \Psi^{-1} X)|\Psi|$, which is the more familiar t-distribution form. May 9, 2019 at 15:13