1. ## expectation question

Hey,
I was wondering if anyone can help me evaluate:

E[exp{aR^2 + bRQ + cQ^2}], where R,Q~iN(0,1) and a,b,c are constants.
The mgfs for chi-squared distribution can't be used right because R^2 and RQ are not indepedent etc, so you can't split the expectations up? Is there another way? I also tried integration with the joint pdf of R and Q; but I'm not sure it's correct.

2. Originally Posted by littlepig
Hey,
I was wondering if anyone can help me evaluate:

E[exp{aR^2 + bRQ + cQ^2}], where R,Q~iN(0,1) and a,b,c are constants.
The mgfs for chi-squared distribution can't be used right because R^2 and RQ are not indepedent etc, so you can't split the expectations up? Is there another way? I also tried integration with the joint pdf of R and Q; but I'm not sure it's correct.
Of course this is correct. Moreover, it provides the answer. You're reduced to computing $\int_{\mathbb{R}}\int_{\mathbb{R}} e^{ar^2+brq+cq^2}e^{-\frac{r^2+q^2}{2}}\frac{dr\,dq}{2\pi}$.
The idea for the integration is to "complete the square" ; I mean, for instance, writing $r^2+r=\left(r+\frac{1}{2}\right)^2-\frac{1}{4}$ so that $\int e^{-(r^2+r)} dr = \int e^{-\left(r+\frac{1}{2}\right)^2}e^{-\frac{1}{4}}dr = e^{-\frac{1}{4}}\int e^{-t^2}dt$ (by letting $t=r+\frac{1}{2}$). You would have to do this exact kind of manipulation to integrate with respect to $r$, and then with respect to $q$. Give it a try.

You can write the exponent in the integral like:
$ar^2+brq+cq^2-\frac{1}{2}r^2-\frac{1}{2}q^2=-\frac{1}{2}\left( (1-2a)r^2-2bqr+(1-2c)q^2\right)$
$=-\frac{1}{2}\left((1-2a)\left(r-\frac{bq}{1-2a}\right)^2+\left(-\frac{b^2}{1-2a}+(1-2c)\right)q^2\right)$
and procede like I did (with more cumbersome constants...). And remember that, for positive $v$, one has $\int e^{-\frac{t^2}{2v}}dt = \sqrt{2\pi v}$. After a few lines, you should have a condition on $a,b,c$ for the integral to be finite, and the value of the integral.

But actually, I would do it in a slightly different way, more general and with more geometrical insight. On the other hand, I'll need some algebra you may not know yet... The idea is to rotate the basis so that the quadratic form $-\frac{1}{2}\left( (1-2a)r^2-2bqr+(1-2c)q^2\right)$ becomes $-\frac{1}{2}\left(\lambda x^2+\mu y^2\right)$, which is easy to integrate.
Given a symmetric $(n\times n)$-matrix $A$, I claim that $\int_{\mathbb{R}^n} e^{-\frac{1}{2}X^T A X}dX = \left(\frac{2\pi}{\det A}\right)^{n/2}$ and the integral is infinite if $A$ is nonpositive. This follows from the diagonalization of $A$ since the change of basis is a rotation ( $A$ is symmetric) and from the fact that $\int e^{-\frac{\lambda}{2}x^2}dx=\sqrt{\frac{2\pi}{\lambda} }$. I can give more details if anyone needs.
In the present case, $n=2$, and with $X={r\choose q}$, we have $E[e^{aR^2+bRQ+cQ^2}]=\int_{\mathbb{R}^n} e^{-\frac{1}{2}X^T A X}\frac{dX}{2\pi} = \frac{1}{\det A}$ for $A=\begin{pmatrix}1-2a & -b\\ -b&1-2c\end{pmatrix}$. We have $\det A=(1-2a)(1-2c)-b^2
$
. And $A$ is positive iff $1-2a>0$ and $(1-2a)(1-2c)-b^2>0$, i.e. iff $a<\frac{1}{2}$, $c<\frac{1}{2}$ and $|b|<\sqrt{(1-2a)(1-2c)}$.

Under these conditions, I finally get $
E[e^{aR^2+bRQ+cQ^2}]=\frac{1}{(1-2a)(1-2c)-b^2}$
.

I hope this helps; at least I enjoyed it...