Expected value of log sigmoid function to a normal distribution

367 Views Asked by At

Is there an analytical solution for the expected value of log sigmoid function to a normal distribution. This corresponds to the following integral:

$$ \int_{-\infty}^{+\infty} \log\left(\frac{1}{1+\exp(-x)}\right) \frac{1}{\sqrt{2\pi\sigma^2}} \exp\left(-\frac{(x-\mu)^2}{2\sigma^2}\right) dx $$

I checked with Wolfram|Alpha, but didn't get any answer.

1

There are 1 best solutions below

1
On

One possible approach is below.

Your integral is $$ \begin{split} I &= \frac{-1}{\sqrt{2\pi\sigma^2}} \int_{-\infty}^{+\infty} \log\left(1+\exp(-x)\right) \exp\left(-\frac{(x-\mu)^2}{2\sigma^2}\right) dx \\ &= \frac{-1}{\sqrt{2\pi}} \int_{-\infty}^{+\infty} \log\left(1+e^{-\mu - \sigma u}\right) e^{-u^2/2} du \end{split} $$ and now expand $\ln(1+y)$ into Taylor series, and integrate term-by-term. Not sure If you can find a closed form expression for the final result, but you may have a good chance.

A possibly good approximation is to cut off the Taylor series after a couple of terms and integrate by parts what you can in the result.