TITLE: How to Make a PDF 'Look' Uniform?
QUESTION [6 upvotes]: Let $X$ be a normally-distributed random variable with mean zero and variance $\sigma^2$: $X \sim N(0,\sigma^2)$. Let $Y$ be a mapping from $X$ onto the interval $(0,1)$ using the sigmoid function: $Y=\text{sig}(X)=\frac{1}{1+e^{-X}}$.
It can be shown that $Y$ has the following probability density function:
$
f_Y (y) = \frac{1}{y(1-y)} \frac{1}{\sqrt{2 \pi \sigma^2}} \exp{\left(-\frac{\left(\ln\frac{y}{1-y}\right)^2}{2\sigma^2}\right)}
$
My question is: for what value of $\sigma$ is $f_y (y)$ the flattest? (i.e., is the most similar to a uniform distribution over $(0,1)$).
Is a closed-form solution to this problem possible?
PS: I am leaving the definition of "the flattest" open, because I am OK with any one that makes sense. For instance, a simple one could be the one that minimizes the integral of $\left[f_Y(y)-1\right]^2$ over $(0,1)$.

REPLY [3 votes]: Since the standard deviation of a standard logistic distribution is $\pi/\sqrt{3} \approx  1.8138$, I would have guessed that it would have been a good answer.
But empirically something like $\sigma=1.6638$ seems to produce a cumulative distribution function close to that of a uniform distribution on the unit interval. Here "close" is the integral of the square of the vertical gap.
In the following graph, the green line uses $\sigma=\pi/\sqrt{3}$ and the blueline uses $\sigma=1.6638$, while the red line is straight, i.e. the cumulative distribution function of a uniform distribution on the unit interval.