Using a multivariate normal distribution I've (numerically) computed the expectation value of $x^Tx$:
$$ <x^Tx> = \frac{1}{\sqrt{(2\pi)^k|Z|)}}\int_{\mathbb{R}^k} x^Tx \exp(-\frac{1}{2}x^TZ^{-1}x) \mathrm{ d}^k x $$
Now it turns out, if I divide this by the sum of the singular values of $Z$ then the answer is equal (up to floating point precision) to 1.
$$ \frac{<x^Tx>}{ \sum \sigma_i } = 1 $$
Anyone knows if this is always the case for multivariate normal distributions? Is there a proof?
Solved it, was simpler than I thought - since $Z$ is positive definite, then the sum of the singular values is equal to the trace of $Z$.
We know: $$ Z = <x x^T> $$ thus, the components of $Z$ are $$ Z_{ij} = <x_i x_j> $$ and $$ \sum Z_{ii} = \sum <x_i^2>= \left<\sum x_i^2\right> = <x^Tx> $$