Gaussian expected inner product with respect to fixed matrix

303 Views Asked by At

Suppose $R\in\mathbb{R}^{p\times p}$ is a a fixed matrix (it can be asymmetric, non-positive definite, and so on). Then, I would like to find a formula for the expectation $$\mathbb{E}_{x\sim N_p(0,V)}[x^T R x].$$ Here, $N_p(0,V)$ is the Gaussian distribution over $\mathbb{R}^p$ with mean $0$ and covariance $V$. Is there a closed-form formula for this value?

This question is a stepping stone to this more involved question.

1

There are 1 best solutions below

0
On BEST ANSWER

$E_x(x^TRx)=\sum_{ij}r_{ij}E_x(x_ix_j)=\sum_{ij}r_{ij}v_{ji}=trace(RV)$.