Suppose we have a random variable $X$ with an unknown distribution, but known first $N$ moments $\left\{ E [ X^n] \right\}_{n=1}^N$. We are asked to calculate the value of \begin{equation} E \left[ | X - a | \right] \end{equation} where $X > 0$ a.s. and $a>0$.
My idea to attack this problem is as follows:
An integral representation of the square root function is $$ \sqrt{x} = \frac{1}{2 \sqrt\pi} \int_0^\infty \, \frac{1 - e^{-zx} }{ z^{3/2} } \, dz $$ The expectation of the absolute value can be written as \begin{equation} \label{expabs} E \left[ | X - a | \right] = \frac{1}{2 \sqrt\pi} \int_0^\infty \, \frac{1 - E \left[ e^{-z(X - a)^2 } \right] }{ z^{3/2} } \, dz \end{equation}
Now \begin{equation} e^{-z(X - a)^2} = e^{ - (a\sqrt z)^2} e^{ - (X\sqrt z)^2 + 2(a\sqrt z)(X\sqrt z)} \end{equation} We recognize $ e^{ - (X\sqrt z)^2 + 2(a\sqrt z)(X\sqrt z)}$ as the generating function of Hermite polynomials. That is, \begin{equation} \label{Hgen} e^{ - (X\sqrt z)^2 + 2(a\sqrt z)(X\sqrt z)} = \sum_{n=0}^{\infty} \frac{ H_n(a\sqrt z) }{ n!} (X\sqrt z)^n \end{equation} where the Hermite polynomials $H_n(x)$ are given by \begin{equation} H_n(y) = \sum_{k=0}^{ \lfloor n/2 \rfloor } \frac{ (-1)^k n! }{ k! (n-2k)! } (2y)^{n-2k} \end{equation} and $\lfloor \cdot \rfloor$ denotes the floor function.
Thus we can, in principle, calculate the expectation $E \left[ | X - a | \right]$ because \begin{align} E \left[ e^{-z(X - a)^2 } \right] &= e^{ - (a\sqrt z)^2} \sum_{n=0}^{\infty} \frac{ H_n(a\sqrt z) }{ n!} E \left[ (X\sqrt z)^n \right] \nonumber \\ &\approx e^{ - (a\sqrt z)^2} \sum_{n=0}^{N} \frac{ H_n(a\sqrt z) }{ n!} E \left[ (X\sqrt z)^n \right] \end{align}
My question:
- Is the above derivation free of error(s)?
- What are the necessary condition(s) for the above series, or a truncated to finite N-terms, in terms of Hermite polynomials to converge?