# Explicit solution for the expectation of inverse of the exponential of normal random variable

Let $$A$$, $$B$$ and $$C$$ be some constants, and let $$N$$ be a random variable with standard normal distribution.

Question: is there an explicit solution to $$\mathbb{E}\left[\frac{1}{A+B e^{C N}}\right]?$$

If $$A=0$$, then the answer is $$\frac{e^{\frac{C^2}{2}}}{B}$$ which follows from the moment generating function. But if $$A\neq 0$$, using the density function of $$N$$, $$\mathbb{E}\left[\frac{1}{A+B e^{C N}}\right]=\int_{\mathbb{R}}\frac{1}{A+B e^{C x}}\cdot \frac{e^{-x^2/2}}{\sqrt{2 \pi}}dx$$ would lead nowhere.

• Maybe can refer to this stats.stackexchange.com/questions/331751/… which direct to the Johnson's SB Distribution en.wikipedia.org/wiki/…
– BGM
May 7 at 11:45
• Much appreciated, the random variable $\frac{1}{A+B e^{CN}}$ follows logit normal distribution and its mean does not have an analytical solution. May 11 at 1:26

For what it is worth, when $$A=B$$, you have a closed form solution. Consider $$A=B=1$$ to keep it simple:

\begin{align*} \frac{\partial}{\partial C} \int_{-\infty}^{\infty} \frac{\exp(-\frac{x^2}{2})}{1+\exp(Cx)}dx = \int_{-\infty}^{\infty} \frac{-x\exp(-\frac{x^2}{2})e^{Cx}}{(1+\exp(Cx))^2}dx = \int_{-\infty}^{\infty} \frac{-x\exp(-\frac{x^2}{2})}{\big(e^{-Cx/2}+e^{Cx/2}\big)^2}dx = 0 \end{align*} with the last equality due to the integrand being an odd (absolutely integrable) function.

When $$C$$ goes to $$-\infty$$, you find (with the dominated convergence theorem) that the common value is $$\int_{0}^{\infty} \exp(-\frac{x^2}{2})dx = \sqrt{\frac{\pi}{2}}$$. Hence: $$\int_{-\infty}^{\infty} \frac{\exp(-\frac{x^2}{2})}{1+\exp(Cx)}dx = \sqrt{\frac{\pi}{2}}$$

• This is exactly correct, but I was using a different technique, since $\int_{-a}^{a} f(x) dx =\int_{-a}^{a} \frac{f(x)+f(-x)}{2} dx$. May 15 at 14:07
• You are exactly right and your answer's the shortest one as well (it would benefit from making explicit that the first equality comes from a change of variable $y=-x$ and then taking the average of the two, equal, integrals) May 15 at 17:45

You could expand the reciprocated expression as a geometric series $$\frac{ 1}{ 1+ m e^x}= \sum_k (-1)^k m^k e^{kx}$$ and integrate termwise.

• By this approach, we have $\mathbb{E}[\frac{1}{1+Ae^{Bx}}]=1+\sum_{i\geq 1}(-1)^iA^i e^{B^2i^2/2}$ which still doesn't have a closed form. Apr 30 at 9:04
• Worse, this series diverges! May 4 at 18:54

For $$A=B \ne 0$$: There is a solution, based on symmetry.

$$\int_{\mathbb{R}}\frac{1}{A+A e^{C x}}\cdot \frac{e^{-x^2/2}}{\sqrt{2 \pi}}dx = \frac1{2A} \int_{\mathbb{R}}\left(\frac{1}{1+e^{C x}}+ \frac{1}{1+e^{-C x}} \right)\cdot \frac{e^{-x^2/2}}{\sqrt{2 \pi}}dx = \frac1{2A} \int_{\mathbb{R}} \frac{e^{-x^2/2}}{\sqrt{2 \pi}}dx = \frac1{2A}$$

For $$A \ne B$$, I guess there is no closed-form solution, since my Mathematica just gave up on the integral. But of course, you can try some numerical integration, if you are facing a real-world problem.

• The first equality does not hold because $\frac{1}{1+e^{Cx}}\neq \frac{1}{2}(\frac{1}{1+e^{Cx}}+\frac{1}{1+e^{-Cx}})=\frac{1}{2}$. May 11 at 1:31
• @Amira It holds, because substituting $x$ to $-x$ does not change the value of integral. May 12 at 1:04