Skip to main content
2 of 5
added 126 characters in body
Iosif Pinelis
  • 127.7k
  • 8
  • 107
  • 229

Letting $I:=\mathbf I$, $a:=\mathbf xi$, $b:=\mathbf xj$, $N:=(4M+I)^{1/2}$, $c_1:=a^\top Ma+b^\top Mb$, $m:=2N^{-1}M(a+b)$, $c_2:=m^\top m/2=2(a+b)^\top M(4M+I)^{-1}M(a+b)$, completing the squares, using the substitutions $z=Ny$ and $y-m=v$, using the formula $$\int_{\mathbb R^n}e^{-v^\top v/2}\,dv=(2\pi)^{n/2},$$ and doing a bit of algebra, we see that the expectation in question is $$(2\pi)^{n/2}\frac{e^{c_2-c_1}}{\det(4M+I)^{1/2}}(N^{-1}mm^\top N^{-1}+ab^\top-am^\top N^{-1}-N^{-1}mb^\top).$$ Here one can get rid of $N$ by noting that $N^{-1}m=2(4M+I)^{-1}M(a+b)$ and hence $m^\top N^{-1}=2(a+b)^\top M(4M+I)^{-1}$.

Iosif Pinelis
  • 127.7k
  • 8
  • 107
  • 229