# expected value of multiplication of matrices

I start with background and then ask my question, background is a brief description of wishart distribution.

Background

The Wishart distribution with $$\nu$$ degrees of freedom and positive definite $$p \times p$$ scale matrix $$V$$, $$\mathcal{W}_p(\nu,V)$$, has the pdf

$$p(S\mid V,\nu) = \frac{|S|^{(\nu - p - 1)/2}}{2^{\nu p/2}|V|^{\nu/2}\Gamma_p(\nu/2)} \exp(-\frac{1}{2}\text{tr}(V^{-1}S))$$

Draws from this distribution will be $$p \times p$$ positive semidefinite matrices so long as $$\nu > p$$, with expectation $$\mathbb{E}[S]= \nu V$$ and variance $$\operatorname{Var}[S_{ij}] = \nu(V_{ij}^2 + V_{ii}V_{jj})$$.

If $$\nu$$ is integer valued, we can write a Wishart random variable as a sum of outer products of $$\nu$$ i.i.d multivariate Gaussian random variables:

$$S = \sum_{i=1}^{\nu} \mathbb{u}_i \mathbb{u}_i^\top \sim \mathcal{W}_p(\nu,V), \text{ where } \mathbb{u}_i \sim \mathcal{N}(0,V).$$

Question

Suppose $$A$$ is a symmetric $$n\times n$$ constant matrix and $$S$$ is a $$n\times n$$ matrix distributed from $$W(v,V)$$, I want to compute:

$$\operatorname E[S^TAS]$$

• is $A$ symmetric? (that makes a big difference) – Carlo Beenakker Feb 18 '16 at 13:00
• yes , $A$ is symmetric – sahar Feb 18 '16 at 13:01
• A pdf is always with respect to some measure. Which measure in this case? How can one integrate? Is it just $$\int p(s) \prod_{i,\,j} ds_{i,j}$$ over the whole space of positive-definite matrices $s$, where $s_{i,j}$ is the $i,j$ entry in $s$? That would mean Lebesgue measure $ds_{i,j}$ on each entry, and the bounds of integration would be --- complicated. This needs some explanation. $\qquad$ – Michael Hardy Feb 7 at 21:41

Diagonalize $A=O^T \Lambda O$ with orthogonal $O$ and diagonal $\Lambda={\rm diag}\,(a_1,a_2,\ldots a_n)$, and redefine $\tilde{S}=OS$, with $\tilde{S}$ Wishart distributed with a transformed scale matrix $\tilde{V}=OV$. So you seek $$E[S^T AS]_{ij}=E[\tilde{S}^T E\tilde{S}]_{ij}=\sum_{k=1}^n a_k E[\tilde{S}_{ki}\tilde{S}_{kj}]$$ which can readily be worked out further; for $i=j$ one has $$E[S^T AS]_{ii}=\sum_{k=1}^n a_k\left[(\nu+\nu^2) \tilde{V}_{ki}^2+\nu\tilde{V}_{kk}\tilde{V}_{ii}\right]$$