[Math] expected value of multiplication of matrices

pr.probabilityprobability distributions

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]
$$

Best Answer

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 \Lambda \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]$$

Related Question