1
$\begingroup$

Is there a (general) closed form available for the following expression?

$$\mathbb{E}\left[e^{x^{T}Ax}\right]$$ Where: $$x=\left\{ x_{1},x_{2},...,x_{N}\right\} \sim\mathcal{N}\left(0,\varSigma_{N}\right)$$ With the following symmetric matrices: $$\varSigma_{N}=\left(\begin{array}{cccc} \sigma_{11} & \sigma_{21} & \ldots & \sigma_{N1}\\ \sigma_{21} & \sigma_{22} & \ldots & \sigma_{N2}\\ \vdots & \vdots & \ddots & \vdots\\ \sigma_{N1} & \sigma_{N2} & \ldots & \sigma_{NN} \end{array}\right)$$ $$A=\left(\begin{array}{cccc} a_{11} & a_{21} & \ldots & a_{N1}\\ a_{21} & a_{22} & \ldots & a_{N2}\\ \vdots & \vdots & \ddots & \vdots\\ a_{N1} & a_{N2} & \ldots & a_{NN} \end{array}\right)$$

$\endgroup$
  • $\begingroup$ Are the matrices diagonal? $\endgroup$ – Fabian Jul 5 '16 at 7:47
  • $\begingroup$ Unfortunately not ( $\endgroup$ – Breugem Jul 5 '16 at 7:54
  • $\begingroup$ Ok, so they are symmetric. $\endgroup$ – Fabian Jul 5 '16 at 7:55
  • $\begingroup$ yes that's correct! $\endgroup$ – Breugem Jul 5 '16 at 8:01
3
$\begingroup$

This can be solved using the general solution of the Gaussian integral $$ \int\!d^nx\,\exp\Bigl(-\frac12 x^T A x\Bigr) = \sqrt{\frac{(2\pi)^n}{\det A}}.$$

In your case, you we have that $$\mathbb{E}\left[e^{x^{T}Ax}\right] = \sqrt{\frac{1}{(2\pi)^n \det \Sigma}} \int\!d^nx \exp\Bigl(-\frac{1}{2} x^T \Sigma^{-1} x\Bigr) e^{x^T A x}=\sqrt{\frac{1}{(2\pi)^n \det \Sigma}} \int\!d^nx \exp\Bigl(-\frac{1}{2} x^T (\Sigma^{-1} -2 A) x\Bigr) .$$

The expectation value is convergent, if $\Sigma^{-1} -2 A$ is a positive definite matrix. In this case, we obtain the result $$\mathbb{E}\left[e^{x^{T}Ax}\right] = \sqrt{\frac{1}{\det \Sigma\,\det(\Sigma^{-1}- 2 A)}} = \frac{1}{\sqrt{\det( I- 2 \Sigma A)}}\,.$$

$\endgroup$
  • $\begingroup$ This helps a lot! I needed this because Mathematica does handle these kind of functions well. Your shortcut provides me with great speedup! $\endgroup$ – Breugem Jul 5 '16 at 8:56
  • $\begingroup$ Thanks a lot! May I ask if there is a way to compute $$\mathbb{E}\left[e^{x^{T}Ax+b^{T}x+c}\right]$$ as efficiently? Note that c is a constant and:$$b=\left\{ b_{1},..,b_{N}\right\} $$ $\endgroup$ – Breugem Jul 5 '16 at 9:05
  • 1
    $\begingroup$ @Breugem: the trick is called "completing the square". One obtains the result: $$\mathbb{E}\left[ e^{x^T A x + b^T x + c} \right] = \det{}^{-1/2}(I-2 A \Sigma^{-1}) \exp(c-1/4 b^T A^{-1} b).$$ Of course $A^{-1}$ should exist. $\endgroup$ – Fabian Jul 5 '16 at 9:38
  • $\begingroup$ very useful! Thanks! $\endgroup$ – Breugem Jul 5 '16 at 12:06
  • 1
    $\begingroup$ @Breugem: you are right, I somehow took $\Sigma$ to be the inverse of the variance. I will correct the post. Sorry for the confusion. $\endgroup$ – Fabian Jul 5 '16 at 16:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.