Expected value of a function of a standard normal random variable.

149 Views Asked by At

Let $X\sim N(0,1)$ and $Y = x^n e^{-tx}$ for $n=1,2,3,\ldots$. Find $\mathbb E[Y]$.

I tried to compute the integral $$ \mathbb E[Y] = \mathbb E[{X^ne^{-tX}}] = \int_{-\infty}^\infty x^2 e^{tx}\cdot\frac1{2\sqrt \pi} e^{-x^2/2}\ \mathsf dx $$

and Mathematica gave

$$ \frac{2^{\frac{n}{2}-\frac{1}{2}} \left(\frac{\left((-1)^n+1\right) \Gamma \left(\frac{n+1}{2}\right) \, _1F_1\left(\frac{n+1}{2};\frac{1}{2};\frac{t^2}{2}\right)}{\sqrt{2}}-\left((-1)^n-1\right) t \Gamma \left(\frac{n}{2}+1\right) \, _1F_1\left(\frac{n}{2}+1;\frac{3}{2};\frac{t^2}{2}\right)\right)}{\sqrt{\pi }} $$

which to me is completely baffling, as presumably this is a computation that could be done by hand. I do not know how to compute the integral by hand, though, so perhaps there is a simpler expression for $\mathbb E[Y]$ that Mathmatica could not find for some reason? Could someone try integrating this (by hand would be great, of course) or with another CAS to see if this is an issue with Mathematica?

1

There are 1 best solutions below

0
On BEST ANSWER

Let $$ f_n=e^{-\frac{t^2}{2}}\mathsf{E}X^ne^{tX}=\int_{-\infty}^\infty \frac{x^n}{\sqrt{2\pi}} e^{-\frac{(x-t)^2}{2}}\,dx=\mathsf{E}Z^n, $$ where $Z\sim N(t,1)$. A general formula for the expectation of $Z^n$ is $$ \mathsf{E}Z^n=(-i\sqrt{2})^n U\!\left(-\frac{n}{2},\frac{1}{2},-\frac{t^2}{2}\right), $$ where $U$ is Tricomi's confluent hypergeometric function.


Integrating by parts (with $u(x)=\exp(-(x-t)^2/2)$), one obtains the following recursion: $$ f_n=\int_{-\infty}^\infty\frac{x^{n+1}(x-t)}{\sqrt{2\pi}(n+1)}e^{-\frac{(x-t)^2}{2}}\,dx=\frac{f_{n+2}-tf_{n+1}}{n+1}. $$ Consequently, $f_n=tf_{n-1}+(n-1)f_{n-2}$ with $f_0=1$ and $f_1=t$. Using this recursion: \begin{align} f_2&=t^2+1, \\ f_3&=t^3+3t, \\ f_4&=t^4+6t^2+3, \\ f_5&=t^5+10t^3+15t, \ldots \end{align}


Alternatively, using the moment generating function $M_Z$, the moments of $Z$ can be computed as follows: $$ \mathsf{E}Z^n=\frac{d^n}{dr^n}M_Z(r)\mid_{r=0}=\frac{d^n}{dr^n}e^{rt+\frac{r^2}{2}}\mid_{r=0}. $$