Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Given a random variable $x$ which is assumed to follow a Gaussian distribution $x \sim N( \mu, \sigma^2 )$ and $x$ is further known to be positive, I am interested in the following expectation value: $E\left[ \frac{1}{x} \right]$ .

In my case $\mu \gg 0$, which might allow to ignore that $x$ is always positive.

Does anyone knows about a collection of known expectation values under the normal distribution?

Many thanks in advance

share|improve this question
1  
What do you mean by $x$ is further known to positive? Is this a truncated normal distribution? –  Learner Mar 12 '13 at 10:40
2  
In any case $E[1/x]=\infty$ . –  Learner Mar 12 '13 at 10:42
1  
Yes, it does. I chose $\mu = 10$ and $\sigma = 1$. $E\left[ \frac{1}{x} \right]$ than converges to 0.1010 –  Matthias Mar 12 '13 at 13:30
1  
@Did: I was replying to "I doubt that", which was in response to Matthias saying to joriki that the mean converged. The mean of $\frac1x$ is going to be taken over all samples where $\frac1x$ does not overflow. This leaves out a small, symmetric interval around $x=0$. This corresponds to what happens when taking the principal value integral. The smaller we take the symmetric interval, the closer the expected value comes to $0.10103161564918598872=\frac{\sqrt{2\pi}}{2}e^{-50}\,\mathrm{erfi}(5\sqrt2)$. –  robjohn Mar 13 '13 at 0:35
2  
@Did: Matthias does not claim that $\mathrm{E}\left(\frac1{|x|}\right)$ converges, he says that his samples (I assume via simulation) indicate that $\mathrm{E}\left(\frac1{x}\right)$ converges (no absolute values). Now, it did bother me that he said he rejected $x<0$. However, I then considered that $\int_\epsilon^1\frac{\mathrm{d}x}{x}\lt11356$ where $\epsilon=2^{-16382}$, which is the smallest positive extended precision number, and $e^{-50}\lt2\times10^{-22}$. Thus, the extended precision contribution of the singularity would be less than $1\times10^{-18}$. So much for simulations. –  robjohn Mar 13 '13 at 15:35
show 16 more comments

1 Answer

We will use $$ \int_{-\infty}^\infty x^{2k}e^{-\frac{x^2}{2}}\,\mathrm{d}x=(2k-1)!!\sqrt\pi\tag{1} $$ If we take the principal value, we get the convergent series $$ \begin{align} &\mathrm{PV}\frac1{\sqrt{2\pi}\sigma}\int_{-\infty}^\infty\frac1xe^{\large-\frac{(x-\mu)^2}{2\sigma^2}}\,\mathrm{d}x\\ &=\frac1{\sqrt{2\pi}\sigma}\int_0^\infty\frac1x\left(e^{\large-\frac{(\mu-x)^2}{2\sigma^2}}-e^{\large-\frac{(\mu+x)^2}{2\sigma^2}}\right)\,\mathrm{d}x\\ &=\frac1{\sqrt{2\pi}\sigma}\int_{-\infty}^\infty\frac1x\sinh\left(\frac{\mu x}{\sigma^2}\right)e^{\large-\frac{\mu^2+x^2}{2\sigma^2}}\,\mathrm{d}x\\ &=\frac1{\sqrt{2\pi}\sigma}e^{\large-\frac{\mu^2}{2\sigma^2}}\int_{-\infty}^\infty\frac1x\sinh\left(\frac\mu\sigma x\right)e^{\large-\frac{x^2}{2}}\,\mathrm{d}x\tag{2}\\ &=e^{\large-\frac{\mu^2}{2\sigma^2}}\sum_{k=0}^\infty\frac{(2k-1)!!}{(2k+1)!}\frac{\mu^{2k+1}}{\sigma^{2k+2}}\tag{3} \end{align} $$ We can also get an asymptotic expansion from $(2)$ using stationary phase: $$ \begin{align} &\frac1{\sqrt{2\pi}\sigma}e^{\large-\frac{\mu^2}{2\sigma^2}}\int_{-\infty}^\infty\frac1x\sinh\left(\frac\mu\sigma x\right)e^{\large-\frac{x^2}{2}}\,\mathrm{d}x\\ &=\mathrm{PV}\frac1{\sqrt{2\pi}\sigma}\int_{-\infty}^\infty\frac12\left(\frac1{\frac\mu\sigma+x}+\frac1{\frac\mu\sigma-x}\right)e^{\large-\frac{x^2}{2}}\,\mathrm{d}x\\ &=\mathrm{PV}\frac1{\sqrt{2\pi}\mu}\int_{-\infty}^\infty\frac12\left(\frac1{1+\frac\sigma\mu x}+\frac1{1-\frac\sigma\mu x}\right)e^{\large-\frac{x^2}{2}}\,\mathrm{d}x\\ &\sim\frac1\mu\sum_{k=0}^\infty(2k-1)!!\frac{\sigma^{2k}}{\mu^{2k}}\tag{4} \end{align} $$ We can get a "closed form" in terms of $\mathrm{erfi}$ from $(2)$ $$ \begin{align} &\frac{\mathrm{d}}{\mathrm{d}\alpha}\frac1{\sqrt{2\pi}}\int_{-\infty}^\infty\frac1x\sinh\left(\alpha x\right)\,e^{\large-\frac{x^2}{2}}\,\mathrm{d}x\\ &=\frac1{\sqrt{2\pi}}\int_{-\infty}^\infty\cosh\left(\alpha x\right)\,e^{\large-\frac{x^2}{2}}\,\mathrm{d}x\\ &=e^{\large\frac{\alpha^2}{2}}\tag{5} \end{align} $$ Therefore, $$ \begin{align} \frac1{\sqrt{2\pi}}\int_{-\infty}^\infty\frac1x\sinh\left(\alpha x\right)\,e^{\large-\frac{x^2}{2}}\,\mathrm{d}x &=\int_0^\alpha e^{\large\frac{t^2}{2}}\,\mathrm{d}t\\ &=\frac{\sqrt2}i\int_0^{i\alpha/\sqrt2} e^{\large-t^2}\,\mathrm{d}t\\ &=\frac{\sqrt{2\pi}}{2}\,\mathrm{erfi}(\alpha/\sqrt2)\tag{6} \end{align} $$ and plugging $(6)$ into $(2)$ yields $$ \mathrm{PV}\frac1{\sqrt{2\pi}\sigma}\int_{-\infty}^\infty\frac1xe^{\large-\frac{(x-\mu)^2}{2\sigma^2}}\,\mathrm{d}x =\frac{\sqrt{2\pi}}{2\sigma}e^{\large-\frac{\mu^2}{2\sigma^2}}\mathrm{erfi}\left(\frac{\mu}{\sigma\sqrt2}\right)\tag{7} $$


Extended precision is not enough

It is mentioned in a comment that $x<0$ was rejected. This poses a theoretical problem. The computations above are carried out in principal value, that means that a small interval $[-\delta,\delta]$ is rejected, where $\delta\to0$. However, if $x\lt\delta$ is rejected, then, as $\delta\to0$, the the contribution to expected value from the singularity grows like $$ -\frac{\log(\delta)}{\sqrt{2\pi}}e^{-50}\tag{8} $$ Even using extended precision, where $\delta=2^{-16382}$, $(8)$ amounts to about $8.74\times10^{-19}$ which is pretty insignificant. However, as $\delta\to0$, $(8)\to\infty$.

Therefore, even extended precision arithmetic is insufficient to expose the problems with a simulation where $x\lt0$ is rejected.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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