I have this univariate (scalar) case in which I have a Gaussian distribution $q(x)$ that is defined as follows: $$q(x) \equiv \mathcal{N}(x;\mu,\sigma^2) = \frac{1}{\sqrt{2\pi\sigma^2}}\exp\left(-\frac{1}{2}\frac{(x-\mu)^2}{\sigma^2}\right) = \frac{1}{z}\exp\left(-\epsilon(x)\right)$$ The last bit of this definition is for ease of notation in some derivations. Now there's this integral for which I can show it equals $\frac{1}{2}$ because of the definition of variance: $$-\int q(x)\epsilon(x)dx = -\frac{1}{2\sigma^2}\underbrace{\int q(x)(x-\mu)^2dx}_{=\sigma^2} = \frac{1}{2}$$ Now I want to do the same for the multivariate case, for the same integral. I have the definition of the Gaussian distribution as follows: $$ q(\mathbf{x}) \equiv \mathcal{N}(\mathbf{x};\mathbf{\mu},\Sigma) = (2\pi)^{-\frac{n}{2}}|\Sigma|^{-1}\exp\left(-\frac{1}{2}(\mathbf{x}-\mathbf{\mu})^T)\Sigma^{-1}(\mathbf{x}-\mathbf{\mu})\right)$$ So in this case $z=\left((2\pi)^n|\Sigma|\right)^{\frac{1}{2}}$ and $\epsilon(\mathbf{x})=\frac{1}{2}(\mathbf{x}-\mathbf{\mu})^T)\Sigma^{-1}(\mathbf{x}-\mathbf{\mu})$. I want to evaluate the same integral $-\int q(\mathbf{x})\epsilon(\mathbf{x})d\mathbf{x}$ but I'm not sure how. I have this: $$-\int q(\mathbf{x})\epsilon(\mathbf{x})d\mathbf{x} = -\int q(\mathbf{x})\frac{1}{2}(\mathbf{x}-\mathbf{\mu})^T\Sigma^{-1}(\mathbf{x}-\mathbf{\mu})d\mathbf{x}$$ My question is therefore one of the following, I think, or both:
- What is the equivalent of $\sigma^2=\int q(x)(x-\mu)^2dx$ for the multivariate case?
- How do I take $\Sigma^{-1}$ out of the integral in my multivariate integral expression? It's a constant so in that sense I think it could be taken out of the equation but then where does it sit such that the matrix algebra fits? I hope you understand this question. If I can take the matrix $\Sigma^{-1}$ out I'll have the product of a vector transposed with a vector left, which will be scalar. I'm just not sure how this works. Hope you can help.
PS I'm also unsure about the tags of this question. Please do correct me if they're wrong.